* [Patch V1 1/2] spi: fsl-lpspi: fix indentation error @ 2017-01-04 9:38 Gao Pan [not found] ` <1483522697-6691-1-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Gao Pan @ 2017-01-04 9:38 UTC (permalink / raw) To: broonie-DgEjT+Ai2ygdnm+yROfE0A Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, pandy.gao-3arQi8VN3Tc This patch fixes the indentation error in spi-fsl-lpspi.c. Signed-off-by: Gao Pan <pandy.gao-3arQi8VN3Tc@public.gmane.org> --- drivers/spi/spi-fsl-lpspi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 52551f6..8ec8f55 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -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, }; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <1483522697-6691-1-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org>]
* [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support [not found] ` <1483522697-6691-1-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org> @ 2017-01-04 9:38 ` Gao Pan [not found] ` <1483522697-6691-2-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org> 2017-01-09 20:01 ` Applied "spi: fsl-lpspi: fix indentation error" to the spi tree Mark Brown 1 sibling, 1 reply; 7+ messages in thread From: Gao Pan @ 2017-01-04 9:38 UTC (permalink / raw) To: broonie-DgEjT+Ai2ygdnm+yROfE0A Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, pandy.gao-3arQi8VN3Tc 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. Signed-off-by: Gao Pan <pandy.gao-3arQi8VN3Tc@public.gmane.org> --- drivers/spi/spi-fsl-lpspi.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 8ec8f55..8557728 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -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, -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <1483522697-6691-2-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org>]
* Re: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support [not found] ` <1483522697-6691-2-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org> @ 2017-01-09 19:33 ` Mark Brown [not found] ` <20170109193350.aufenjuhtge5e3lu-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Mark Brown @ 2017-01-09 19:33 UTC (permalink / raw) To: Gao Pan; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 615 bytes --] On Wed, Jan 04, 2017 at 05:38:17PM +0800, Gao Pan wrote: > 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. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20170109193350.aufenjuhtge5e3lu-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>]
* RE: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support [not found] ` <20170109193350.aufenjuhtge5e3lu-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> @ 2017-01-17 7:03 ` Pandy Gao [not found] ` <AM4PR0401MB22737664A5030928464226C7F67C0-4rsfagO7TJw08dPJ0juu2Y3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Pandy Gao @ 2017-01-17 7:03 UTC (permalink / raw) To: Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA From: Mark Brown <mailto:broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sent: Tuesday, January 10, 2017 3:34 AM > To: Pandy Gao <pandy.gao-3arQi8VN3Tc@public.gmane.org> > Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Subject: Re: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support > > On Wed, Jan 04, 2017 at 05:38:17PM +0800, Gao Pan wrote: > > 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. 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <AM4PR0401MB22737664A5030928464226C7F67C0-4rsfagO7TJw08dPJ0juu2Y3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>]
* Re: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support [not found] ` <AM4PR0401MB22737664A5030928464226C7F67C0-4rsfagO7TJw08dPJ0juu2Y3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org> @ 2017-01-17 19:04 ` Mark Brown [not found] ` <20170117190407.p5ad3dz7ixqm4vz6-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Mark Brown @ 2017-01-17 19:04 UTC (permalink / raw) To: Pandy Gao; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 781 bytes --] On Tue, Jan 17, 2017 at 07:03:28AM +0000, Pandy Gao wrote: > > > 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. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20170117190407.p5ad3dz7ixqm4vz6-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>]
* RE: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support [not found] ` <20170117190407.p5ad3dz7ixqm4vz6-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> @ 2017-01-18 3:50 ` Pandy Gao 0 siblings, 0 replies; 7+ messages in thread From: Pandy Gao @ 2017-01-18 3:50 UTC (permalink / raw) To: Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA From: Mark Brown <mailto:broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sent: Wednesday, January 18, 2017 3:04 AM > To: Pandy Gao <pandy.gao-3arQi8VN3Tc@public.gmane.org> > Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Subject: Re: [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support > > On Tue, Jan 17, 2017 at 07:03:28AM +0000, Pandy Gao wrote: > > > > > 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. 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Applied "spi: fsl-lpspi: fix indentation error" to the spi tree [not found] ` <1483522697-6691-1-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org> 2017-01-04 9:38 ` [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support Gao Pan @ 2017-01-09 20:01 ` Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Mark Brown @ 2017-01-09 20:01 UTC (permalink / raw) To: Gao Pan Cc: Mark Brown, broonie-DgEjT+Ai2ygdnm+yROfE0A, linux-spi-u79uwXL29TY76Z2rM5mHXA, pandy.gao-3arQi8VN3Tc The 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 >From 102ecc471b9d2f41f10c586f077a0d8e853335f8 Mon Sep 17 00:00:00 2001 From: Gao Pan <pandy.gao-3arQi8VN3Tc@public.gmane.org> 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. Signed-off-by: Gao Pan <pandy.gao-3arQi8VN3Tc@public.gmane.org> Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> --- drivers/spi/spi-fsl-lpspi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 2b93bc605b91..cb3c73007ca1 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -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, }; -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-01-18 3:50 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-01-04 9:38 [Patch V1 1/2] spi: fsl-lpspi: fix indentation error Gao Pan [not found] ` <1483522697-6691-1-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org> 2017-01-04 9:38 ` [Patch V1 2/2] spi: fsl-lpspi: add VLLS mode support Gao Pan [not found] ` <1483522697-6691-2-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org> 2017-01-09 19:33 ` Mark Brown [not found] ` <20170109193350.aufenjuhtge5e3lu-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 2017-01-17 7:03 ` Pandy Gao [not found] ` <AM4PR0401MB22737664A5030928464226C7F67C0-4rsfagO7TJw08dPJ0juu2Y3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org> 2017-01-17 19:04 ` Mark Brown [not found] ` <20170117190407.p5ad3dz7ixqm4vz6-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 2017-01-18 3:50 ` Pandy Gao 2017-01-09 20:01 ` Applied "spi: fsl-lpspi: fix indentation error" to the spi tree Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).