spi: fsl-lpspi: fix indentation error
Subsystems (2)
PATCH 1/2 spi: fsl-lpspi: fix indentation error
This patch fixes the indentation error in spi-fsl-lpspi.c.
--- drivers/spi/spi-fsl-lpspi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/spi/spi-fsl-lpspi.c +3 -3
@@ -512,9 +512,9 @@ static int fsl_lpspi_remove(struct platform_device *pdev)static struct platform_driver fsl_lpspi_driver = { .driver = { - .name =DRIVER_NAME , - .of_match_table = fsl_lpspi_dt_ids, - }, + .name =DRIVER_NAME , + .of_match_table = fsl_lpspi_dt_ids, + }, .probe = fsl_lpspi_probe, .remove = fsl_lpspi_remove, };
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 spi: fsl-lpspi: add VLLS mode support
In reply to a message not in the archiveWhen system enters VLLS mode, module power is turned off. As a result, all registers are reset to HW default value. After exiting VLLS mode, registers are still in default mode. As a result, the pinctrl settings are incorrect, which will affect the module function.
The patch recovers the pinctrl setting when exit VLLS mode.
--- drivers/spi/spi-fsl-lpspi.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/spi/spi-fsl-lpspi.c +22 -0
@@ -510,10 +510,32 @@ static int fsl_lpspi_remove(struct platform_device *pdev)return 0 ; } +#ifdef CONFIG_PM_SLEEP +static int fsl_lpspi_suspend (struct device *dev) +{ +pinctrl_pm_select_sleep_state (dev); + +return 0 ; +} + +static int fsl_lpspi_resume (struct device *dev) +{ +pinctrl_pm_select_default_state (dev); + +return 0 ; +} + +static SIMPLE_DEV_PM_OPS(imx_lpspi_pm, fsl_lpspi_suspend, fsl_lpspi_resume); +#define IMX_LPSPI_PM (&imx_lpspi_pm) +#else +#define IMX_LPSPI_PM NULL +#endif +static struct platform_driver fsl_lpspi_driver = { .driver = { .name =DRIVER_NAME , .of_match_table = fsl_lpspi_dt_ids, + .pm =IMX_LPSPI_PM , }, .probe = fsl_lpspi_probe, .remove = fsl_lpspi_remove,
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support
In reply to a message not in the archiveQuoted 6 lines · Gao Pan
When system enters VLLS mode, module power is turned off. As a result, all registers are reset to HW default value. After exiting VLLS mode, registers are still in default mode. As a result, the pinctrl settings are incorrect, which will affect the module function.
The patch recovers the pinctrl setting when exit VLLS mode.
Why is this a change here and not in the pinctrl driver? It sounds like it's the pinctrl driver that's forgetting the settings and should be restoring them on resume but perhaps I'm missing something here.
Applied "spi: fsl-lpspi: fix indentation error" to the spi tree
In reply to a message not in the archiveThe patch
spi: fsl-lpspi: fix indentation error
has been applied to the spi tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
102ecc471b9d2f41f10c586f077a0d8e853335f8Mon Sep 17 00:00:00 2001
From: Gao Pan <[email protected]>
Date: Wed, 4 Jan 2017 17:38:16 +0800
Subject: [PATCH] spi: fsl-lpspi: fix indentation error
This patch fixes the indentation error in spi-fsl-lpspi.c.
--- drivers/spi/spi-fsl-lpspi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/spi/spi-fsl-lpspi.c +3 -3
@@ -512,9 +512,9 @@ static int fsl_lpspi_remove(struct platform_device *pdev)static struct platform_driver fsl_lpspi_driver = { .driver = { - .name =DRIVER_NAME , - .of_match_table = fsl_lpspi_dt_ids, - }, + .name =DRIVER_NAME , + .of_match_table = fsl_lpspi_dt_ids, + }, .probe = fsl_lpspi_probe, .remove = fsl_lpspi_remove, };
Signature · 6 lines
2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support
In reply to a message not in the archiveFrom: Mark Brown <mailto:[email protected]> Sent: Tuesday, January 10, 2017 3:34 AM
Quoted 11 lines
To: Pandy Gao <[email protected]>
Cc: [email protected]
Subject: Re: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode supportQuoted 1 line · Gao Pan
When system enters VLLS mode, module power is turned off. As a
result,
Quoted 4 lines
all registers are reset to HW default value. After exiting VLLS mode, registers are still in default mode. As a result, the pinctrl settings are incorrect, which will affect the module function.
Quoted 5 lines
Quoted 1 line
The patch recovers the pinctrl setting when exit VLLS mode.
Why is this a change here and not in the pinctrl driver? It sounds like it's the pinctrl driver that's forgetting the settings and should be restoring them on resume but perhaps I'm missing something here.
If the pinctrl driver restores the setting on resume, then all device node should be scanned, which is irregular.
Even though the pinctrl driver can handle all the child node of iomuxc, it's still difficult for the pinctrl driver to know which device node is disabled and which device node is okay. Moreover, there may be some pin conflicts among the child node of iomuxc.
So it's better to do the restore in spi driver other than the pinctrl driver.
Best Regards
Gao Pan
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support
In reply to a message not in the archiveQuoted 8 lines · Pandy Gao
Quoted 5 lines
Quoted 1 line
The patch recovers the pinctrl setting when exit VLLS mode.
Why is this a change here and not in the pinctrl driver? It sounds like it's the pinctrl driver that's forgetting the settings and should be restoring them on resume but perhaps I'm missing something here.
If the pinctrl driver restores the setting on resume, then all device node should be scanned, which is irregular.
What would restoring the configuration have to do with scanning the device tree? The changelog says this is just reapplying the same settings we started out with so it's just a case of restoring the state of the device after a runtime resume which is a perfectly normal thing for a driver to do.
RE: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support
In reply to a message not in the archiveFrom: Mark Brown <mailto:[email protected]> Sent: Wednesday, January 18, 2017 3:04 AM
Quoted 13 lines
To: Pandy Gao <[email protected]>
Cc: [email protected]
Subject: Re: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode supportQuoted 5 lines · Pandy Gao
Quoted 5 lines
Quoted 1 line
The patch recovers the pinctrl setting when exit VLLS mode.
Why is this a change here and not in the pinctrl driver? It sounds like it's the pinctrl driver that's forgetting the settings and should be restoring them on resume but perhaps I'm missing
something here.
Quoted 8 lines
Quoted 2 lines
If the pinctrl driver restores the setting on resume, then all device node should be scanned, which is irregular.
What would restoring the configuration have to do with scanning the device tree? The changelog says this is just reapplying the same settings we started out with so it's just a case of restoring the state of the device after a runtime resume which is a perfectly normal thing for a driver to do.
We can reapply the initial settings as the configurations defined in device node iomuxc in pinctrl driver. However, I think there are some limitations. For example, conflicts may exist between enet1grp and ecspi3grp, which is not easy for the pinctrl driver to find out.
&iomuxc {
pinctrl_ecspi3: ecspi3grp
{
...
};
pinctrl_enet1: enet1grp
{
...
};
}Best Regards
Gao Pan
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html