* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 14:34 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 14:34 UTC (permalink / raw) To: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas Cc: Anand Moon, linux-samsung-soc, linux-usb, linux-kernel, linux-arm-kernel Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP as to avoid them being build when not used. This also allows us to use the SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. Signed-off-by: Anand Moon <linux.amoon@gmail.com> --- drivers/usb/host/ehci-exynos.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 42e5b66..1899900 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int exynos_ehci_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -292,15 +292,13 @@ static int exynos_ehci_resume(struct device *dev) ehci_resume(hcd, false); return 0; } -#else -#define exynos_ehci_suspend NULL -#define exynos_ehci_resume NULL -#endif static const struct dev_pm_ops exynos_ehci_pm_ops = { - .suspend = exynos_ehci_suspend, - .resume = exynos_ehci_resume, + SET_SYSTEM_SLEEP_PM_OPS(exynos_ehci_suspend, exynos_ehci_resume) }; +#endif /* CONFIG_PM_SLEEP */ + +#define DEV_PM_OPS IS_ENABLED(CONFIG_PM_SLEEP) ? &exynos_ehci_pm_ops : NULL #ifdef CONFIG_OF static const struct of_device_id exynos_ehci_match[] = { @@ -317,7 +315,7 @@ static struct platform_driver exynos_ehci_driver = { .shutdown = usb_hcd_platform_shutdown, .driver = { .name = "exynos-ehci", - .pm = &exynos_ehci_pm_ops, + .pm = DEV_PM_OPS, .of_match_table = of_match_ptr(exynos_ehci_match), } }; -- 2.7.4 ^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 14:34 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 14:34 UTC (permalink / raw) To: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas Cc: linux-usb, linux-arm-kernel, linux-samsung-soc, linux-kernel, Anand Moon Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP as to avoid them being build when not used. This also allows us to use the SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. Signed-off-by: Anand Moon <linux.amoon@gmail.com> --- drivers/usb/host/ehci-exynos.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 42e5b66..1899900 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int exynos_ehci_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -292,15 +292,13 @@ static int exynos_ehci_resume(struct device *dev) ehci_resume(hcd, false); return 0; } -#else -#define exynos_ehci_suspend NULL -#define exynos_ehci_resume NULL -#endif static const struct dev_pm_ops exynos_ehci_pm_ops = { - .suspend = exynos_ehci_suspend, - .resume = exynos_ehci_resume, + SET_SYSTEM_SLEEP_PM_OPS(exynos_ehci_suspend, exynos_ehci_resume) }; +#endif /* CONFIG_PM_SLEEP */ + +#define DEV_PM_OPS IS_ENABLED(CONFIG_PM_SLEEP) ? &exynos_ehci_pm_ops : NULL #ifdef CONFIG_OF static const struct of_device_id exynos_ehci_match[] = { @@ -317,7 +315,7 @@ static struct platform_driver exynos_ehci_driver = { .shutdown = usb_hcd_platform_shutdown, .driver = { .name = "exynos-ehci", - .pm = &exynos_ehci_pm_ops, + .pm = DEV_PM_OPS, .of_match_table = of_match_ptr(exynos_ehci_match), } }; -- 2.7.4 ^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 14:34 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 14:34 UTC (permalink / raw) To: linux-arm-kernel Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP as to avoid them being build when not used. This also allows us to use the SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. Signed-off-by: Anand Moon <linux.amoon@gmail.com> --- drivers/usb/host/ehci-exynos.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 42e5b66..1899900 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int exynos_ehci_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -292,15 +292,13 @@ static int exynos_ehci_resume(struct device *dev) ehci_resume(hcd, false); return 0; } -#else -#define exynos_ehci_suspend NULL -#define exynos_ehci_resume NULL -#endif static const struct dev_pm_ops exynos_ehci_pm_ops = { - .suspend = exynos_ehci_suspend, - .resume = exynos_ehci_resume, + SET_SYSTEM_SLEEP_PM_OPS(exynos_ehci_suspend, exynos_ehci_resume) }; +#endif /* CONFIG_PM_SLEEP */ + +#define DEV_PM_OPS IS_ENABLED(CONFIG_PM_SLEEP) ? &exynos_ehci_pm_ops : NULL #ifdef CONFIG_OF static const struct of_device_id exynos_ehci_match[] = { @@ -317,7 +315,7 @@ static struct platform_driver exynos_ehci_driver = { .shutdown = usb_hcd_platform_shutdown, .driver = { .name = "exynos-ehci", - .pm = &exynos_ehci_pm_ops, + .pm = DEV_PM_OPS, .of_match_table = of_match_ptr(exynos_ehci_match), } }; -- 2.7.4 ^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 2/2] host: ohci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 14:34 ` Anand Moon (?) @ 2016-10-09 14:34 ` Anand Moon -1 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 14:34 UTC (permalink / raw) To: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas Cc: Anand Moon, linux-samsung-soc, linux-usb, linux-kernel, linux-arm-kernel Move the ohci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP as to avoid them being build when not used. This also allows us to use the SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. Signed-off-by: Anand Moon <linux.amoon@gmail.com> --- drivers/usb/host/ohci-exynos.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 2cd105b..1764baa 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -219,7 +219,7 @@ static void exynos_ohci_shutdown(struct platform_device *pdev) hcd->driver->shutdown(hcd); } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int exynos_ohci_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -256,18 +256,16 @@ static int exynos_ohci_resume(struct device *dev) return 0; } -#else -#define exynos_ohci_suspend NULL -#define exynos_ohci_resume NULL -#endif -static const struct ohci_driver_overrides exynos_overrides __initconst = { - .extra_priv_size = sizeof(struct exynos_ohci_hcd), +static const struct dev_pm_ops exynos_ohci_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(exynos_ohci_suspend, exynos_ohci_resume) }; +#endif /* CONFIG_PM_SLEEP */ -static const struct dev_pm_ops exynos_ohci_pm_ops = { - .suspend = exynos_ohci_suspend, - .resume = exynos_ohci_resume, +#define DEV_PM_OPS IS_ENABLED(CONFIG_PM_SLEEP) ? &exynos_ohci_pm_ops : NULL + +static const struct ohci_driver_overrides exynos_overrides __initconst = { + .extra_priv_size = sizeof(struct exynos_ohci_hcd), }; #ifdef CONFIG_OF @@ -285,7 +283,7 @@ static struct platform_driver exynos_ohci_driver = { .shutdown = exynos_ohci_shutdown, .driver = { .name = "exynos-ohci", - .pm = &exynos_ohci_pm_ops, + .pm = DEV_PM_OPS, .of_match_table = of_match_ptr(exynos_ohci_match), } }; -- 2.7.4 ^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 2/2] host: ohci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 14:34 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 14:34 UTC (permalink / raw) To: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas Cc: linux-usb, linux-arm-kernel, linux-samsung-soc, linux-kernel, Anand Moon Move the ohci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP as to avoid them being build when not used. This also allows us to use the SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. Signed-off-by: Anand Moon <linux.amoon@gmail.com> --- drivers/usb/host/ohci-exynos.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 2cd105b..1764baa 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -219,7 +219,7 @@ static void exynos_ohci_shutdown(struct platform_device *pdev) hcd->driver->shutdown(hcd); } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int exynos_ohci_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -256,18 +256,16 @@ static int exynos_ohci_resume(struct device *dev) return 0; } -#else -#define exynos_ohci_suspend NULL -#define exynos_ohci_resume NULL -#endif -static const struct ohci_driver_overrides exynos_overrides __initconst = { - .extra_priv_size = sizeof(struct exynos_ohci_hcd), +static const struct dev_pm_ops exynos_ohci_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(exynos_ohci_suspend, exynos_ohci_resume) }; +#endif /* CONFIG_PM_SLEEP */ -static const struct dev_pm_ops exynos_ohci_pm_ops = { - .suspend = exynos_ohci_suspend, - .resume = exynos_ohci_resume, +#define DEV_PM_OPS IS_ENABLED(CONFIG_PM_SLEEP) ? &exynos_ohci_pm_ops : NULL + +static const struct ohci_driver_overrides exynos_overrides __initconst = { + .extra_priv_size = sizeof(struct exynos_ohci_hcd), }; #ifdef CONFIG_OF @@ -285,7 +283,7 @@ static struct platform_driver exynos_ohci_driver = { .shutdown = exynos_ohci_shutdown, .driver = { .name = "exynos-ohci", - .pm = &exynos_ohci_pm_ops, + .pm = DEV_PM_OPS, .of_match_table = of_match_ptr(exynos_ohci_match), } }; -- 2.7.4 ^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 2/2] host: ohci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 14:34 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 14:34 UTC (permalink / raw) To: linux-arm-kernel Move the ohci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP as to avoid them being build when not used. This also allows us to use the SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. Signed-off-by: Anand Moon <linux.amoon@gmail.com> --- drivers/usb/host/ohci-exynos.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 2cd105b..1764baa 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -219,7 +219,7 @@ static void exynos_ohci_shutdown(struct platform_device *pdev) hcd->driver->shutdown(hcd); } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int exynos_ohci_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -256,18 +256,16 @@ static int exynos_ohci_resume(struct device *dev) return 0; } -#else -#define exynos_ohci_suspend NULL -#define exynos_ohci_resume NULL -#endif -static const struct ohci_driver_overrides exynos_overrides __initconst = { - .extra_priv_size = sizeof(struct exynos_ohci_hcd), +static const struct dev_pm_ops exynos_ohci_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(exynos_ohci_suspend, exynos_ohci_resume) }; +#endif /* CONFIG_PM_SLEEP */ -static const struct dev_pm_ops exynos_ohci_pm_ops = { - .suspend = exynos_ohci_suspend, - .resume = exynos_ohci_resume, +#define DEV_PM_OPS IS_ENABLED(CONFIG_PM_SLEEP) ? &exynos_ohci_pm_ops : NULL + +static const struct ohci_driver_overrides exynos_overrides __initconst = { + .extra_priv_size = sizeof(struct exynos_ohci_hcd), }; #ifdef CONFIG_OF @@ -285,7 +283,7 @@ static struct platform_driver exynos_ohci_driver = { .shutdown = exynos_ohci_shutdown, .driver = { .name = "exynos-ohci", - .pm = &exynos_ohci_pm_ops, + .pm = DEV_PM_OPS, .of_match_table = of_match_ptr(exynos_ohci_match), } }; -- 2.7.4 ^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 14:34 ` Anand Moon @ 2016-10-09 16:34 ` Krzysztof Kozlowski -1 siblings, 0 replies; 30+ messages in thread From: Krzysztof Kozlowski @ 2016-10-09 16:34 UTC (permalink / raw) To: Anand Moon Cc: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas, linux-usb, linux-arm-kernel, linux-samsung-soc, linux-kernel On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > as to avoid them being build when not used. This also allows us to use the > SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > --- > drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > index 42e5b66..1899900 100644 > --- a/drivers/usb/host/ehci-exynos.c > +++ b/drivers/usb/host/ehci-exynos.c > @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > return 0; > } > > -#ifdef CONFIG_PM > +#ifdef CONFIG_PM_SLEEP Does not look like an equivalent change. How will it behave in a config with !SUSPEND && !HIBERNATE && PM? Best regards, Krzysztof > static int exynos_ehci_suspend(struct device *dev) > { > struct usb_hcd *hcd = dev_get_drvdata(dev); > @@ -292,15 +292,13 @@ static int exynos_ehci_resume(struct device *dev) > ehci_resume(hcd, false); > return 0; > } > -#else > -#define exynos_ehci_suspend NULL > -#define exynos_ehci_resume NULL > -#endif > > static const struct dev_pm_ops exynos_ehci_pm_ops = { > - .suspend = exynos_ehci_suspend, > - .resume = exynos_ehci_resume, > + SET_SYSTEM_SLEEP_PM_OPS(exynos_ehci_suspend, exynos_ehci_resume) > }; > +#endif /* CONFIG_PM_SLEEP */ > + > +#define DEV_PM_OPS IS_ENABLED(CONFIG_PM_SLEEP) ? &exynos_ehci_pm_ops : NULL > > #ifdef CONFIG_OF > static const struct of_device_id exynos_ehci_match[] = { > @@ -317,7 +315,7 @@ static struct platform_driver exynos_ehci_driver = { > .shutdown = usb_hcd_platform_shutdown, > .driver = { > .name = "exynos-ehci", > - .pm = &exynos_ehci_pm_ops, > + .pm = DEV_PM_OPS, > .of_match_table = of_match_ptr(exynos_ehci_match), > } > }; > -- > 2.7.4 > ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 16:34 ` Krzysztof Kozlowski 0 siblings, 0 replies; 30+ messages in thread From: Krzysztof Kozlowski @ 2016-10-09 16:34 UTC (permalink / raw) To: linux-arm-kernel On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > as to avoid them being build when not used. This also allows us to use the > SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > --- > drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > index 42e5b66..1899900 100644 > --- a/drivers/usb/host/ehci-exynos.c > +++ b/drivers/usb/host/ehci-exynos.c > @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > return 0; > } > > -#ifdef CONFIG_PM > +#ifdef CONFIG_PM_SLEEP Does not look like an equivalent change. How will it behave in a config with !SUSPEND && !HIBERNATE && PM? Best regards, Krzysztof > static int exynos_ehci_suspend(struct device *dev) > { > struct usb_hcd *hcd = dev_get_drvdata(dev); > @@ -292,15 +292,13 @@ static int exynos_ehci_resume(struct device *dev) > ehci_resume(hcd, false); > return 0; > } > -#else > -#define exynos_ehci_suspend NULL > -#define exynos_ehci_resume NULL > -#endif > > static const struct dev_pm_ops exynos_ehci_pm_ops = { > - .suspend = exynos_ehci_suspend, > - .resume = exynos_ehci_resume, > + SET_SYSTEM_SLEEP_PM_OPS(exynos_ehci_suspend, exynos_ehci_resume) > }; > +#endif /* CONFIG_PM_SLEEP */ > + > +#define DEV_PM_OPS IS_ENABLED(CONFIG_PM_SLEEP) ? &exynos_ehci_pm_ops : NULL > > #ifdef CONFIG_OF > static const struct of_device_id exynos_ehci_match[] = { > @@ -317,7 +315,7 @@ static struct platform_driver exynos_ehci_driver = { > .shutdown = usb_hcd_platform_shutdown, > .driver = { > .name = "exynos-ehci", > - .pm = &exynos_ehci_pm_ops, > + .pm = DEV_PM_OPS, > .of_match_table = of_match_ptr(exynos_ehci_match), > } > }; > -- > 2.7.4 > ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 16:34 ` Krzysztof Kozlowski @ 2016-10-09 17:15 ` Anand Moon -1 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 17:15 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, Linux USB Mailing List, linux-arm-kernel, linux-samsung-soc@vger.kernel.org, Linux Kernel Hi Krzysztof, On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> as to avoid them being build when not used. This also allows us to use the >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> --- >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> index 42e5b66..1899900 100644 >> --- a/drivers/usb/host/ehci-exynos.c >> +++ b/drivers/usb/host/ehci-exynos.c >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> return 0; >> } >> >> -#ifdef CONFIG_PM >> +#ifdef CONFIG_PM_SLEEP > > Does not look like an equivalent change. How will it behave in a config > with !SUSPEND && !HIBERNATE && PM? > [snip] I just wanted to update suspend and resume callback to use SET_SYSTEM_SLEEP_PM_OPS as they are define under CONFIG_PM_SLEEP so I update above to avoid compilation warning/error. http://lxr.free-electrons.com/source/include/linux/pm.h#L321 -Best Regards Anand Moon ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 17:15 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 17:15 UTC (permalink / raw) To: linux-arm-kernel Hi Krzysztof, On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> as to avoid them being build when not used. This also allows us to use the >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> --- >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> index 42e5b66..1899900 100644 >> --- a/drivers/usb/host/ehci-exynos.c >> +++ b/drivers/usb/host/ehci-exynos.c >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> return 0; >> } >> >> -#ifdef CONFIG_PM >> +#ifdef CONFIG_PM_SLEEP > > Does not look like an equivalent change. How will it behave in a config > with !SUSPEND && !HIBERNATE && PM? > [snip] I just wanted to update suspend and resume callback to use SET_SYSTEM_SLEEP_PM_OPS as they are define under CONFIG_PM_SLEEP so I update above to avoid compilation warning/error. http://lxr.free-electrons.com/source/include/linux/pm.h#L321 -Best Regards Anand Moon ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 17:15 ` Anand Moon @ 2016-10-09 17:27 ` Krzysztof Kozlowski -1 siblings, 0 replies; 30+ messages in thread From: Krzysztof Kozlowski @ 2016-10-09 17:27 UTC (permalink / raw) To: Anand Moon Cc: Krzysztof Kozlowski, Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, Linux USB Mailing List, linux-arm-kernel, linux-samsung-soc@vger.kernel.org, Linux Kernel On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: > Hi Krzysztof, > > On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > >> as to avoid them being build when not used. This also allows us to use the > >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > >> > >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> > >> --- > >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > >> 1 file changed, 6 insertions(+), 8 deletions(-) > >> > >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > >> index 42e5b66..1899900 100644 > >> --- a/drivers/usb/host/ehci-exynos.c > >> +++ b/drivers/usb/host/ehci-exynos.c > >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > >> return 0; > >> } > >> > >> -#ifdef CONFIG_PM > >> +#ifdef CONFIG_PM_SLEEP > > > > Does not look like an equivalent change. How will it behave in a config > > with !SUSPEND && !HIBERNATE && PM? > > > > [snip] > > I just wanted to update suspend and resume callback to use > SET_SYSTEM_SLEEP_PM_OPS > as they are define under CONFIG_PM_SLEEP so I update above to avoid > compilation warning/error. First of all you did not answer to my question, so let me rephrase into two: 1. Is the code equivalent? 2. What will be the output with !SUSPEND && !HIBERNATE && PM? You didn't mention compilation warning/error in message commit so I do not know what you are thinking about... Best regards, Krzysztof ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 17:27 ` Krzysztof Kozlowski 0 siblings, 0 replies; 30+ messages in thread From: Krzysztof Kozlowski @ 2016-10-09 17:27 UTC (permalink / raw) To: linux-arm-kernel On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: > Hi Krzysztof, > > On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > >> as to avoid them being build when not used. This also allows us to use the > >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > >> > >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> > >> --- > >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > >> 1 file changed, 6 insertions(+), 8 deletions(-) > >> > >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > >> index 42e5b66..1899900 100644 > >> --- a/drivers/usb/host/ehci-exynos.c > >> +++ b/drivers/usb/host/ehci-exynos.c > >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > >> return 0; > >> } > >> > >> -#ifdef CONFIG_PM > >> +#ifdef CONFIG_PM_SLEEP > > > > Does not look like an equivalent change. How will it behave in a config > > with !SUSPEND && !HIBERNATE && PM? > > > > [snip] > > I just wanted to update suspend and resume callback to use > SET_SYSTEM_SLEEP_PM_OPS > as they are define under CONFIG_PM_SLEEP so I update above to avoid > compilation warning/error. First of all you did not answer to my question, so let me rephrase into two: 1. Is the code equivalent? 2. What will be the output with !SUSPEND && !HIBERNATE && PM? You didn't mention compilation warning/error in message commit so I do not know what you are thinking about... Best regards, Krzysztof ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 17:27 ` Krzysztof Kozlowski @ 2016-10-09 18:27 ` Anand Moon -1 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 18:27 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, Linux USB Mailing List, linux-arm-kernel, linux-samsung-soc@vger.kernel.org, Linux Kernel hi Krzysztof, On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: >> Hi Krzysztof, >> >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> >> as to avoid them being build when not used. This also allows us to use the >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> >> --- >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> >> index 42e5b66..1899900 100644 >> >> --- a/drivers/usb/host/ehci-exynos.c >> >> +++ b/drivers/usb/host/ehci-exynos.c >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> >> return 0; >> >> } >> >> >> >> -#ifdef CONFIG_PM >> >> +#ifdef CONFIG_PM_SLEEP >> > >> > Does not look like an equivalent change. How will it behave in a config >> > with !SUSPEND && !HIBERNATE && PM? >> > >> >> [snip] >> >> I just wanted to update suspend and resume callback to use >> SET_SYSTEM_SLEEP_PM_OPS >> as they are define under CONFIG_PM_SLEEP so I update above to avoid >> compilation warning/error. > Apologize: for not understanding your question. > First of all you did not answer to my question, so let me rephrase into > two: > 1. Is the code equivalent? No CONFIG_PM and CONFIG_PM_SLEEP are different options. But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig CONFIG_PM_SLEEP=n or # CONFIG_PM_SLEEP is not set > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? # # Power management options # # CONFIG_SUSPEND is not set # CONFIG_HIBERNATION is not set # CONFIG_PM is not set When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. Best Regards -Anand Moon > > You didn't mention compilation warning/error in message commit so I do > not know what you are thinking about... > > Best regards, > Krzysztof ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 18:27 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 18:27 UTC (permalink / raw) To: linux-arm-kernel hi Krzysztof, On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: >> Hi Krzysztof, >> >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> >> as to avoid them being build when not used. This also allows us to use the >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> >> --- >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> >> index 42e5b66..1899900 100644 >> >> --- a/drivers/usb/host/ehci-exynos.c >> >> +++ b/drivers/usb/host/ehci-exynos.c >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> >> return 0; >> >> } >> >> >> >> -#ifdef CONFIG_PM >> >> +#ifdef CONFIG_PM_SLEEP >> > >> > Does not look like an equivalent change. How will it behave in a config >> > with !SUSPEND && !HIBERNATE && PM? >> > >> >> [snip] >> >> I just wanted to update suspend and resume callback to use >> SET_SYSTEM_SLEEP_PM_OPS >> as they are define under CONFIG_PM_SLEEP so I update above to avoid >> compilation warning/error. > Apologize: for not understanding your question. > First of all you did not answer to my question, so let me rephrase into > two: > 1. Is the code equivalent? No CONFIG_PM and CONFIG_PM_SLEEP are different options. But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig CONFIG_PM_SLEEP=n or # CONFIG_PM_SLEEP is not set > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? # # Power management options # # CONFIG_SUSPEND is not set # CONFIG_HIBERNATION is not set # CONFIG_PM is not set When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. Best Regards -Anand Moon > > You didn't mention compilation warning/error in message commit so I do > not know what you are thinking about... > > Best regards, > Krzysztof ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 18:27 ` Anand Moon (?) @ 2016-10-09 18:39 ` Krzysztof Kozlowski -1 siblings, 0 replies; 30+ messages in thread From: Krzysztof Kozlowski @ 2016-10-09 18:39 UTC (permalink / raw) To: Anand Moon Cc: linux-samsung-soc@vger.kernel.org, Greg Kroah-Hartman, Linux USB Mailing List, Linux Kernel, Krzysztof Kozlowski, Javier Martinez Canillas, Kukjin Kim, Alan Stern, linux-arm-kernel On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: > hi Krzysztof, > > On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: > >> Hi Krzysztof, > >> > >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: > >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > >> >> as to avoid them being build when not used. This also allows us to use the > >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > >> >> > >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> > >> >> --- > >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > >> >> 1 file changed, 6 insertions(+), 8 deletions(-) > >> >> > >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > >> >> index 42e5b66..1899900 100644 > >> >> --- a/drivers/usb/host/ehci-exynos.c > >> >> +++ b/drivers/usb/host/ehci-exynos.c > >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > >> >> return 0; > >> >> } > >> >> > >> >> -#ifdef CONFIG_PM > >> >> +#ifdef CONFIG_PM_SLEEP > >> > > >> > Does not look like an equivalent change. How will it behave in a config > >> > with !SUSPEND && !HIBERNATE && PM? > >> > > >> > >> [snip] > >> > >> I just wanted to update suspend and resume callback to use > >> SET_SYSTEM_SLEEP_PM_OPS > >> as they are define under CONFIG_PM_SLEEP so I update above to avoid > >> compilation warning/error. > > > Apologize: for not understanding your question. > > > First of all you did not answer to my question, so let me rephrase into > > two: > > 1. Is the code equivalent? > > No CONFIG_PM and CONFIG_PM_SLEEP are different options. > But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig So the code is not equivalent... > > CONFIG_PM_SLEEP=n or > # CONFIG_PM_SLEEP is not set > > > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? > > # > # Power management options > # > # CONFIG_SUSPEND is not set > # CONFIG_HIBERNATION is not set > # CONFIG_PM is not set > > When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set > CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. In my config, the CONFIG_PM was enabled thus the code changes the functionality... Maybe this was intented but I really don't get it from the commit message or from your explanations here. Krzysztof ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 18:39 ` Krzysztof Kozlowski 0 siblings, 0 replies; 30+ messages in thread From: Krzysztof Kozlowski @ 2016-10-09 18:39 UTC (permalink / raw) To: Anand Moon Cc: Krzysztof Kozlowski, Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, Linux USB Mailing List, linux-arm-kernel, linux-samsung-soc@vger.kernel.org, Linux Kernel On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: > hi Krzysztof, > > On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: > >> Hi Krzysztof, > >> > >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: > >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > >> >> as to avoid them being build when not used. This also allows us to use the > >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > >> >> > >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> > >> >> --- > >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > >> >> 1 file changed, 6 insertions(+), 8 deletions(-) > >> >> > >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > >> >> index 42e5b66..1899900 100644 > >> >> --- a/drivers/usb/host/ehci-exynos.c > >> >> +++ b/drivers/usb/host/ehci-exynos.c > >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > >> >> return 0; > >> >> } > >> >> > >> >> -#ifdef CONFIG_PM > >> >> +#ifdef CONFIG_PM_SLEEP > >> > > >> > Does not look like an equivalent change. How will it behave in a config > >> > with !SUSPEND && !HIBERNATE && PM? > >> > > >> > >> [snip] > >> > >> I just wanted to update suspend and resume callback to use > >> SET_SYSTEM_SLEEP_PM_OPS > >> as they are define under CONFIG_PM_SLEEP so I update above to avoid > >> compilation warning/error. > > > Apologize: for not understanding your question. > > > First of all you did not answer to my question, so let me rephrase into > > two: > > 1. Is the code equivalent? > > No CONFIG_PM and CONFIG_PM_SLEEP are different options. > But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig So the code is not equivalent... > > CONFIG_PM_SLEEP=n or > # CONFIG_PM_SLEEP is not set > > > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? > > # > # Power management options > # > # CONFIG_SUSPEND is not set > # CONFIG_HIBERNATION is not set > # CONFIG_PM is not set > > When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set > CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. In my config, the CONFIG_PM was enabled thus the code changes the functionality... Maybe this was intented but I really don't get it from the commit message or from your explanations here. Krzysztof ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 18:39 ` Krzysztof Kozlowski 0 siblings, 0 replies; 30+ messages in thread From: Krzysztof Kozlowski @ 2016-10-09 18:39 UTC (permalink / raw) To: linux-arm-kernel On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: > hi Krzysztof, > > On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: > >> Hi Krzysztof, > >> > >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: > >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > >> >> as to avoid them being build when not used. This also allows us to use the > >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > >> >> > >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> > >> >> --- > >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > >> >> 1 file changed, 6 insertions(+), 8 deletions(-) > >> >> > >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > >> >> index 42e5b66..1899900 100644 > >> >> --- a/drivers/usb/host/ehci-exynos.c > >> >> +++ b/drivers/usb/host/ehci-exynos.c > >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > >> >> return 0; > >> >> } > >> >> > >> >> -#ifdef CONFIG_PM > >> >> +#ifdef CONFIG_PM_SLEEP > >> > > >> > Does not look like an equivalent change. How will it behave in a config > >> > with !SUSPEND && !HIBERNATE && PM? > >> > > >> > >> [snip] > >> > >> I just wanted to update suspend and resume callback to use > >> SET_SYSTEM_SLEEP_PM_OPS > >> as they are define under CONFIG_PM_SLEEP so I update above to avoid > >> compilation warning/error. > > > Apologize: for not understanding your question. > > > First of all you did not answer to my question, so let me rephrase into > > two: > > 1. Is the code equivalent? > > No CONFIG_PM and CONFIG_PM_SLEEP are different options. > But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig So the code is not equivalent... > > CONFIG_PM_SLEEP=n or > # CONFIG_PM_SLEEP is not set > > > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? > > # > # Power management options > # > # CONFIG_SUSPEND is not set > # CONFIG_HIBERNATION is not set > # CONFIG_PM is not set > > When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set > CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. In my config, the CONFIG_PM was enabled thus the code changes the functionality... Maybe this was intented but I really don't get it from the commit message or from your explanations here. Krzysztof ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 18:39 ` Krzysztof Kozlowski (?) @ 2016-10-09 19:01 ` Anand Moon -1 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 19:01 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-samsung-soc@vger.kernel.org, Greg Kroah-Hartman, Linux USB Mailing List, Linux Kernel, Javier Martinez Canillas, Kukjin Kim, Alan Stern, linux-arm-kernel hi Krzysztof, On 10 October 2016 at 00:09, Krzysztof Kozlowski <krzk@kernel.org> wrote: > On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: >> hi Krzysztof, >> >> On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: >> >> Hi Krzysztof, >> >> >> >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> >> >> as to avoid them being build when not used. This also allows us to use the >> >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> >> >> >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> >> >> --- >> >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> >> >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> >> >> >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> >> >> index 42e5b66..1899900 100644 >> >> >> --- a/drivers/usb/host/ehci-exynos.c >> >> >> +++ b/drivers/usb/host/ehci-exynos.c >> >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> >> >> return 0; >> >> >> } >> >> >> >> >> >> -#ifdef CONFIG_PM >> >> >> +#ifdef CONFIG_PM_SLEEP >> >> > >> >> > Does not look like an equivalent change. How will it behave in a config >> >> > with !SUSPEND && !HIBERNATE && PM? >> >> > >> >> >> >> [snip] >> >> >> >> I just wanted to update suspend and resume callback to use >> >> SET_SYSTEM_SLEEP_PM_OPS >> >> as they are define under CONFIG_PM_SLEEP so I update above to avoid >> >> compilation warning/error. >> > >> Apologize: for not understanding your question. >> >> > First of all you did not answer to my question, so let me rephrase into >> > two: >> > 1. Is the code equivalent? >> >> No CONFIG_PM and CONFIG_PM_SLEEP are different options. >> But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig > > So the code is not equivalent... > >> >> CONFIG_PM_SLEEP=n or >> # CONFIG_PM_SLEEP is not set >> >> > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? >> >> # >> # Power management options >> # >> # CONFIG_SUSPEND is not set >> # CONFIG_HIBERNATION is not set >> # CONFIG_PM is not set >> >> When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set >> CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. > > In my config, the CONFIG_PM was enabled thus the code changes the > functionality... Maybe this was intented but I really don't get it from > the commit message or from your explanations here. > > Krzysztof Ok I will keep the changes to use CONFIG_PM, but use the SET_SYSTEM_SLEEP_PM_OPS option in V2 patch. Is that ok. -Best Regards -Anand Moon ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 19:01 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 19:01 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, Linux USB Mailing List, linux-arm-kernel, linux-samsung-soc@vger.kernel.org, Linux Kernel hi Krzysztof, On 10 October 2016 at 00:09, Krzysztof Kozlowski <krzk@kernel.org> wrote: > On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: >> hi Krzysztof, >> >> On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: >> >> Hi Krzysztof, >> >> >> >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> >> >> as to avoid them being build when not used. This also allows us to use the >> >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> >> >> >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> >> >> --- >> >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> >> >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> >> >> >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> >> >> index 42e5b66..1899900 100644 >> >> >> --- a/drivers/usb/host/ehci-exynos.c >> >> >> +++ b/drivers/usb/host/ehci-exynos.c >> >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> >> >> return 0; >> >> >> } >> >> >> >> >> >> -#ifdef CONFIG_PM >> >> >> +#ifdef CONFIG_PM_SLEEP >> >> > >> >> > Does not look like an equivalent change. How will it behave in a config >> >> > with !SUSPEND && !HIBERNATE && PM? >> >> > >> >> >> >> [snip] >> >> >> >> I just wanted to update suspend and resume callback to use >> >> SET_SYSTEM_SLEEP_PM_OPS >> >> as they are define under CONFIG_PM_SLEEP so I update above to avoid >> >> compilation warning/error. >> > >> Apologize: for not understanding your question. >> >> > First of all you did not answer to my question, so let me rephrase into >> > two: >> > 1. Is the code equivalent? >> >> No CONFIG_PM and CONFIG_PM_SLEEP are different options. >> But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig > > So the code is not equivalent... > >> >> CONFIG_PM_SLEEP=n or >> # CONFIG_PM_SLEEP is not set >> >> > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? >> >> # >> # Power management options >> # >> # CONFIG_SUSPEND is not set >> # CONFIG_HIBERNATION is not set >> # CONFIG_PM is not set >> >> When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set >> CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. > > In my config, the CONFIG_PM was enabled thus the code changes the > functionality... Maybe this was intented but I really don't get it from > the commit message or from your explanations here. > > Krzysztof Ok I will keep the changes to use CONFIG_PM, but use the SET_SYSTEM_SLEEP_PM_OPS option in V2 patch. Is that ok. -Best Regards -Anand Moon ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 19:01 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-09 19:01 UTC (permalink / raw) To: linux-arm-kernel hi Krzysztof, On 10 October 2016 at 00:09, Krzysztof Kozlowski <krzk@kernel.org> wrote: > On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: >> hi Krzysztof, >> >> On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: >> >> Hi Krzysztof, >> >> >> >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> >> >> as to avoid them being build when not used. This also allows us to use the >> >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> >> >> >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> >> >> --- >> >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> >> >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> >> >> >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> >> >> index 42e5b66..1899900 100644 >> >> >> --- a/drivers/usb/host/ehci-exynos.c >> >> >> +++ b/drivers/usb/host/ehci-exynos.c >> >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> >> >> return 0; >> >> >> } >> >> >> >> >> >> -#ifdef CONFIG_PM >> >> >> +#ifdef CONFIG_PM_SLEEP >> >> > >> >> > Does not look like an equivalent change. How will it behave in a config >> >> > with !SUSPEND && !HIBERNATE && PM? >> >> > >> >> >> >> [snip] >> >> >> >> I just wanted to update suspend and resume callback to use >> >> SET_SYSTEM_SLEEP_PM_OPS >> >> as they are define under CONFIG_PM_SLEEP so I update above to avoid >> >> compilation warning/error. >> > >> Apologize: for not understanding your question. >> >> > First of all you did not answer to my question, so let me rephrase into >> > two: >> > 1. Is the code equivalent? >> >> No CONFIG_PM and CONFIG_PM_SLEEP are different options. >> But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig > > So the code is not equivalent... > >> >> CONFIG_PM_SLEEP=n or >> # CONFIG_PM_SLEEP is not set >> >> > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? >> >> # >> # Power management options >> # >> # CONFIG_SUSPEND is not set >> # CONFIG_HIBERNATION is not set >> # CONFIG_PM is not set >> >> When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set >> CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. > > In my config, the CONFIG_PM was enabled thus the code changes the > functionality... Maybe this was intented but I really don't get it from > the commit message or from your explanations here. > > Krzysztof Ok I will keep the changes to use CONFIG_PM, but use the SET_SYSTEM_SLEEP_PM_OPS option in V2 patch. Is that ok. -Best Regards -Anand Moon ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 18:39 ` Krzysztof Kozlowski (?) @ 2016-10-19 16:43 ` Anand Moon -1 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-19 16:43 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, Linux USB Mailing List, linux-arm-kernel, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux Kernel Hi Krzysztof, On 10 October 2016 at 00:09, Krzysztof Kozlowski <krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote: > On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: >> hi Krzysztof, >> >> On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote: >> > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: >> >> Hi Krzysztof, >> >> >> >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote: >> >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> >> >> as to avoid them being build when not used. This also allows us to use the >> >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> >> >> >> >> Signed-off-by: Anand Moon <linux.amoon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >> >> --- >> >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> >> >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> >> >> >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> >> >> index 42e5b66..1899900 100644 >> >> >> --- a/drivers/usb/host/ehci-exynos.c >> >> >> +++ b/drivers/usb/host/ehci-exynos.c >> >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> >> >> return 0; >> >> >> } >> >> >> >> >> >> -#ifdef CONFIG_PM >> >> >> +#ifdef CONFIG_PM_SLEEP >> >> > >> >> > Does not look like an equivalent change. How will it behave in a config >> >> > with !SUSPEND && !HIBERNATE && PM? >> >> > >> >> >> >> [snip] >> >> >> >> I just wanted to update suspend and resume callback to use >> >> SET_SYSTEM_SLEEP_PM_OPS >> >> as they are define under CONFIG_PM_SLEEP so I update above to avoid >> >> compilation warning/error. >> > >> Apologize: for not understanding your question. >> >> > First of all you did not answer to my question, so let me rephrase into >> > two: >> > 1. Is the code equivalent? >> >> No CONFIG_PM and CONFIG_PM_SLEEP are different options. >> But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig > > So the code is not equivalent... I might be wrong, below is the kconfig option for PM_SLEEP Symbol: PM_SLEEP [=y] Type : boolean Defined at kernel/power/Kconfig Depends on: SUSPEND [=y] || HIBERNATE_CALLBACKS [=n] Selects: PM [=y] So we cannot set CONFIG_PM_SLEEP=n and CONFIG_PM=y I observed at many places were either CONFIG_PM or CONFIG_PM_SLEEP are used. So I would like to use SIMPLE_DEV_PM_OPS macro to set struct dev_pm_ops exynos_ohci_pm_ops to correct the code. Best Regards -Anand Moon > >> >> CONFIG_PM_SLEEP=n or >> # CONFIG_PM_SLEEP is not set >> >> > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? >> >> # >> # Power management options >> # >> # CONFIG_SUSPEND is not set >> # CONFIG_HIBERNATION is not set >> # CONFIG_PM is not set >> >> When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set >> CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. > > In my config, the CONFIG_PM was enabled thus the code changes the > functionality... Maybe this was intented but I really don't get it from > the commit message or from your explanations here. > > Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-19 16:43 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-19 16:43 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Alan Stern, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, Linux USB Mailing List, linux-arm-kernel, linux-samsung-soc@vger.kernel.org, Linux Kernel Hi Krzysztof, On 10 October 2016 at 00:09, Krzysztof Kozlowski <krzk@kernel.org> wrote: > On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: >> hi Krzysztof, >> >> On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: >> >> Hi Krzysztof, >> >> >> >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> >> >> as to avoid them being build when not used. This also allows us to use the >> >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> >> >> >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> >> >> --- >> >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> >> >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> >> >> >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> >> >> index 42e5b66..1899900 100644 >> >> >> --- a/drivers/usb/host/ehci-exynos.c >> >> >> +++ b/drivers/usb/host/ehci-exynos.c >> >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> >> >> return 0; >> >> >> } >> >> >> >> >> >> -#ifdef CONFIG_PM >> >> >> +#ifdef CONFIG_PM_SLEEP >> >> > >> >> > Does not look like an equivalent change. How will it behave in a config >> >> > with !SUSPEND && !HIBERNATE && PM? >> >> > >> >> >> >> [snip] >> >> >> >> I just wanted to update suspend and resume callback to use >> >> SET_SYSTEM_SLEEP_PM_OPS >> >> as they are define under CONFIG_PM_SLEEP so I update above to avoid >> >> compilation warning/error. >> > >> Apologize: for not understanding your question. >> >> > First of all you did not answer to my question, so let me rephrase into >> > two: >> > 1. Is the code equivalent? >> >> No CONFIG_PM and CONFIG_PM_SLEEP are different options. >> But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig > > So the code is not equivalent... I might be wrong, below is the kconfig option for PM_SLEEP Symbol: PM_SLEEP [=y] Type : boolean Defined at kernel/power/Kconfig Depends on: SUSPEND [=y] || HIBERNATE_CALLBACKS [=n] Selects: PM [=y] So we cannot set CONFIG_PM_SLEEP=n and CONFIG_PM=y I observed at many places were either CONFIG_PM or CONFIG_PM_SLEEP are used. So I would like to use SIMPLE_DEV_PM_OPS macro to set struct dev_pm_ops exynos_ohci_pm_ops to correct the code. Best Regards -Anand Moon > >> >> CONFIG_PM_SLEEP=n or >> # CONFIG_PM_SLEEP is not set >> >> > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? >> >> # >> # Power management options >> # >> # CONFIG_SUSPEND is not set >> # CONFIG_HIBERNATION is not set >> # CONFIG_PM is not set >> >> When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set >> CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. > > In my config, the CONFIG_PM was enabled thus the code changes the > functionality... Maybe this was intented but I really don't get it from > the commit message or from your explanations here. > > Krzysztof ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-19 16:43 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-19 16:43 UTC (permalink / raw) To: linux-arm-kernel Hi Krzysztof, On 10 October 2016 at 00:09, Krzysztof Kozlowski <krzk@kernel.org> wrote: > On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: >> hi Krzysztof, >> >> On 9 October 2016 at 22:57, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: >> >> Hi Krzysztof, >> >> >> >> On 9 October 2016 at 22:04, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> >> >> as to avoid them being build when not used. This also allows us to use the >> >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> >> >> >> >> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> >> >> --- >> >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> >> >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> >> >> >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> >> >> index 42e5b66..1899900 100644 >> >> >> --- a/drivers/usb/host/ehci-exynos.c >> >> >> +++ b/drivers/usb/host/ehci-exynos.c >> >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> >> >> return 0; >> >> >> } >> >> >> >> >> >> -#ifdef CONFIG_PM >> >> >> +#ifdef CONFIG_PM_SLEEP >> >> > >> >> > Does not look like an equivalent change. How will it behave in a config >> >> > with !SUSPEND && !HIBERNATE && PM? >> >> > >> >> >> >> [snip] >> >> >> >> I just wanted to update suspend and resume callback to use >> >> SET_SYSTEM_SLEEP_PM_OPS >> >> as they are define under CONFIG_PM_SLEEP so I update above to avoid >> >> compilation warning/error. >> > >> Apologize: for not understanding your question. >> >> > First of all you did not answer to my question, so let me rephrase into >> > two: >> > 1. Is the code equivalent? >> >> No CONFIG_PM and CONFIG_PM_SLEEP are different options. >> But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig > > So the code is not equivalent... I might be wrong, below is the kconfig option for PM_SLEEP Symbol: PM_SLEEP [=y] Type : boolean Defined at kernel/power/Kconfig Depends on: SUSPEND [=y] || HIBERNATE_CALLBACKS [=n] Selects: PM [=y] So we cannot set CONFIG_PM_SLEEP=n and CONFIG_PM=y I observed at many places were either CONFIG_PM or CONFIG_PM_SLEEP are used. So I would like to use SIMPLE_DEV_PM_OPS macro to set struct dev_pm_ops exynos_ohci_pm_ops to correct the code. Best Regards -Anand Moon > >> >> CONFIG_PM_SLEEP=n or >> # CONFIG_PM_SLEEP is not set >> >> > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? >> >> # >> # Power management options >> # >> # CONFIG_SUSPEND is not set >> # CONFIG_HIBERNATION is not set >> # CONFIG_PM is not set >> >> When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set >> CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. > > In my config, the CONFIG_PM was enabled thus the code changes the > functionality... Maybe this was intented but I really don't get it from > the commit message or from your explanations here. > > Krzysztof ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-19 16:43 ` Anand Moon @ 2016-10-19 17:34 ` Alan Stern -1 siblings, 0 replies; 30+ messages in thread From: Alan Stern @ 2016-10-19 17:34 UTC (permalink / raw) To: Anand Moon Cc: Krzysztof Kozlowski, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, Linux USB Mailing List, linux-arm-kernel, linux-samsung-soc@vger.kernel.org, Linux Kernel On Wed, 19 Oct 2016, Anand Moon wrote: > I might be wrong, below is the kconfig option for PM_SLEEP > > Symbol: PM_SLEEP [=y] > Type : boolean > Defined at kernel/power/Kconfig > Depends on: SUSPEND [=y] || HIBERNATE_CALLBACKS [=n] > Selects: PM [=y] > > So we cannot set CONFIG_PM_SLEEP=n and CONFIG_PM=y You have it backward. We cannot set CONFIG_PM_SLEEP=y and CONFIG_PM=n. But you can have CONFIG_PM_SLEEP=n and CONFIG_PM=y. Alan Stern > I observed at many places were either CONFIG_PM or CONFIG_PM_SLEEP are used. > > So I would like to use SIMPLE_DEV_PM_OPS macro to set struct > dev_pm_ops exynos_ohci_pm_ops to correct the code. > > Best Regards > -Anand Moon > > > > >> > >> CONFIG_PM_SLEEP=n or > >> # CONFIG_PM_SLEEP is not set > >> > >> > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? > >> > >> # > >> # Power management options > >> # > >> # CONFIG_SUSPEND is not set > >> # CONFIG_HIBERNATION is not set > >> # CONFIG_PM is not set > >> > >> When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set > >> CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. > > > > In my config, the CONFIG_PM was enabled thus the code changes the > > functionality... Maybe this was intented but I really don't get it from > > the commit message or from your explanations here. > > > > Krzysztof > > ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-19 17:34 ` Alan Stern 0 siblings, 0 replies; 30+ messages in thread From: Alan Stern @ 2016-10-19 17:34 UTC (permalink / raw) To: linux-arm-kernel On Wed, 19 Oct 2016, Anand Moon wrote: > I might be wrong, below is the kconfig option for PM_SLEEP > > Symbol: PM_SLEEP [=y] > Type : boolean > Defined at kernel/power/Kconfig > Depends on: SUSPEND [=y] || HIBERNATE_CALLBACKS [=n] > Selects: PM [=y] > > So we cannot set CONFIG_PM_SLEEP=n and CONFIG_PM=y You have it backward. We cannot set CONFIG_PM_SLEEP=y and CONFIG_PM=n. But you can have CONFIG_PM_SLEEP=n and CONFIG_PM=y. Alan Stern > I observed at many places were either CONFIG_PM or CONFIG_PM_SLEEP are used. > > So I would like to use SIMPLE_DEV_PM_OPS macro to set struct > dev_pm_ops exynos_ohci_pm_ops to correct the code. > > Best Regards > -Anand Moon > > > > >> > >> CONFIG_PM_SLEEP=n or > >> # CONFIG_PM_SLEEP is not set > >> > >> > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? > >> > >> # > >> # Power management options > >> # > >> # CONFIG_SUSPEND is not set > >> # CONFIG_HIBERNATION is not set > >> # CONFIG_PM is not set > >> > >> When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set > >> CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. > > > > In my config, the CONFIG_PM was enabled thus the code changes the > > functionality... Maybe this was intented but I really don't get it from > > the commit message or from your explanations here. > > > > Krzysztof > > ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 16:34 ` Krzysztof Kozlowski (?) @ 2016-10-09 21:17 ` Alan Stern -1 siblings, 0 replies; 30+ messages in thread From: Alan Stern @ 2016-10-09 21:17 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Anand Moon, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, linux-usb, linux-arm-kernel, linux-samsung-soc, linux-kernel On Sun, 9 Oct 2016, Krzysztof Kozlowski wrote: > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > > Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > > as to avoid them being build when not used. This also allows us to use the > > SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > > > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > > --- > > drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > > 1 file changed, 6 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > > index 42e5b66..1899900 100644 > > --- a/drivers/usb/host/ehci-exynos.c > > +++ b/drivers/usb/host/ehci-exynos.c > > @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > > return 0; > > } > > > > -#ifdef CONFIG_PM > > +#ifdef CONFIG_PM_SLEEP > > Does not look like an equivalent change. How will it behave in a config > with !SUSPEND && !HIBERNATE && PM? It's hard to say what Anand originally had in mind. To me, it looks like it will behave exactly the same as before, the only difference being that the object image will not contain unused exynos_ehci_suspend and exynos_ehci_resume routines. And the compiler won't issue a warning at build time that the routines are unused. Alan Stern ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 21:17 ` Alan Stern 0 siblings, 0 replies; 30+ messages in thread From: Alan Stern @ 2016-10-09 21:17 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Anand Moon, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, linux-usb, linux-arm-kernel, linux-samsung-soc, linux-kernel On Sun, 9 Oct 2016, Krzysztof Kozlowski wrote: > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > > Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > > as to avoid them being build when not used. This also allows us to use the > > SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > > > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > > --- > > drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > > 1 file changed, 6 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > > index 42e5b66..1899900 100644 > > --- a/drivers/usb/host/ehci-exynos.c > > +++ b/drivers/usb/host/ehci-exynos.c > > @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > > return 0; > > } > > > > -#ifdef CONFIG_PM > > +#ifdef CONFIG_PM_SLEEP > > Does not look like an equivalent change. How will it behave in a config > with !SUSPEND && !HIBERNATE && PM? It's hard to say what Anand originally had in mind. To me, it looks like it will behave exactly the same as before, the only difference being that the object image will not contain unused exynos_ehci_suspend and exynos_ehci_resume routines. And the compiler won't issue a warning at build time that the routines are unused. Alan Stern ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-09 21:17 ` Alan Stern 0 siblings, 0 replies; 30+ messages in thread From: Alan Stern @ 2016-10-09 21:17 UTC (permalink / raw) To: linux-arm-kernel On Sun, 9 Oct 2016, Krzysztof Kozlowski wrote: > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: > > Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP > > as to avoid them being build when not used. This also allows us to use the > > SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. > > > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > > --- > > drivers/usb/host/ehci-exynos.c | 14 ++++++-------- > > 1 file changed, 6 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > > index 42e5b66..1899900 100644 > > --- a/drivers/usb/host/ehci-exynos.c > > +++ b/drivers/usb/host/ehci-exynos.c > > @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) > > return 0; > > } > > > > -#ifdef CONFIG_PM > > +#ifdef CONFIG_PM_SLEEP > > Does not look like an equivalent change. How will it behave in a config > with !SUSPEND && !HIBERNATE && PM? It's hard to say what Anand originally had in mind. To me, it looks like it will behave exactly the same as before, the only difference being that the object image will not contain unused exynos_ehci_suspend and exynos_ehci_resume routines. And the compiler won't issue a warning at build time that the routines are unused. Alan Stern ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS 2016-10-09 21:17 ` Alan Stern @ 2016-10-10 14:16 ` Anand Moon -1 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-10 14:16 UTC (permalink / raw) To: Alan Stern Cc: Krzysztof Kozlowski, Greg Kroah-Hartman, Kukjin Kim, Javier Martinez Canillas, Linux USB Mailing List, linux-arm-kernel, linux-samsung-soc@vger.kernel.org, Linux Kernel hi Alan/Krzysztof, On 10 October 2016 at 02:47, Alan Stern <stern@rowland.harvard.edu> wrote: > On Sun, 9 Oct 2016, Krzysztof Kozlowski wrote: > >> On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> > Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> > as to avoid them being build when not used. This also allows us to use the >> > SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> > >> > Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> > --- >> > drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> > 1 file changed, 6 insertions(+), 8 deletions(-) >> > >> > diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> > index 42e5b66..1899900 100644 >> > --- a/drivers/usb/host/ehci-exynos.c >> > +++ b/drivers/usb/host/ehci-exynos.c >> > @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> > return 0; >> > } >> > >> > -#ifdef CONFIG_PM >> > +#ifdef CONFIG_PM_SLEEP >> >> Does not look like an equivalent change. How will it behave in a config >> with !SUSPEND && !HIBERNATE && PM? > > It's hard to say what Anand originally had in mind. To me, it looks > like it will behave exactly the same as before, the only difference > being that the object image will not contain unused exynos_ehci_suspend > and exynos_ehci_resume routines. And the compiler won't issue a > warning at build time that the routines are unused. > > Alan Stern > Thanks for looking into this closely. I will just send one line changes to use SET_SYSTEM_SLEEP_PM_OPS with better commit logs, if you people agree with this. Best Regards -Anand Moon ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS @ 2016-10-10 14:16 ` Anand Moon 0 siblings, 0 replies; 30+ messages in thread From: Anand Moon @ 2016-10-10 14:16 UTC (permalink / raw) To: linux-arm-kernel hi Alan/Krzysztof, On 10 October 2016 at 02:47, Alan Stern <stern@rowland.harvard.edu> wrote: > On Sun, 9 Oct 2016, Krzysztof Kozlowski wrote: > >> On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> > Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> > as to avoid them being build when not used. This also allows us to use the >> > SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> > >> > Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> > --- >> > drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> > 1 file changed, 6 insertions(+), 8 deletions(-) >> > >> > diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> > index 42e5b66..1899900 100644 >> > --- a/drivers/usb/host/ehci-exynos.c >> > +++ b/drivers/usb/host/ehci-exynos.c >> > @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> > return 0; >> > } >> > >> > -#ifdef CONFIG_PM >> > +#ifdef CONFIG_PM_SLEEP >> >> Does not look like an equivalent change. How will it behave in a config >> with !SUSPEND && !HIBERNATE && PM? > > It's hard to say what Anand originally had in mind. To me, it looks > like it will behave exactly the same as before, the only difference > being that the object image will not contain unused exynos_ehci_suspend > and exynos_ehci_resume routines. And the compiler won't issue a > warning at build time that the routines are unused. > > Alan Stern > Thanks for looking into this closely. I will just send one line changes to use SET_SYSTEM_SLEEP_PM_OPS with better commit logs, if you people agree with this. Best Regards -Anand Moon ^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2016-10-19 17:34 UTC | newest] Thread overview: 30+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-09 14:34 [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS Anand Moon 2016-10-09 14:34 ` Anand Moon 2016-10-09 14:34 ` Anand Moon 2016-10-09 14:34 ` [PATCH 2/2] host: ohci-exynos: " Anand Moon 2016-10-09 14:34 ` Anand Moon 2016-10-09 14:34 ` Anand Moon 2016-10-09 16:34 ` [PATCH 1/2] host: ehci-exynos: " Krzysztof Kozlowski 2016-10-09 16:34 ` Krzysztof Kozlowski 2016-10-09 17:15 ` Anand Moon 2016-10-09 17:15 ` Anand Moon 2016-10-09 17:27 ` Krzysztof Kozlowski 2016-10-09 17:27 ` Krzysztof Kozlowski 2016-10-09 18:27 ` Anand Moon 2016-10-09 18:27 ` Anand Moon 2016-10-09 18:39 ` Krzysztof Kozlowski 2016-10-09 18:39 ` Krzysztof Kozlowski 2016-10-09 18:39 ` Krzysztof Kozlowski 2016-10-09 19:01 ` Anand Moon 2016-10-09 19:01 ` Anand Moon 2016-10-09 19:01 ` Anand Moon 2016-10-19 16:43 ` Anand Moon 2016-10-19 16:43 ` Anand Moon 2016-10-19 16:43 ` Anand Moon 2016-10-19 17:34 ` Alan Stern 2016-10-19 17:34 ` Alan Stern 2016-10-09 21:17 ` Alan Stern 2016-10-09 21:17 ` Alan Stern 2016-10-09 21:17 ` Alan Stern 2016-10-10 14:16 ` Anand Moon 2016-10-10 14:16 ` Anand Moon
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.