* [PATCH] clk/samsung: exynos-audss: Replace syscore PM with platform device PM
@ 2016-11-25 9:39 ` Marek Szyprowski
2016-11-25 13:12 ` Javier Martinez Canillas
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marek Szyprowski @ 2016-11-25 9:39 UTC (permalink / raw)
To: linux-clk, linux-samsung-soc
Cc: Marek Szyprowski, Sylwester Nawrocki, Krzysztof Kozlowski,
Bartlomiej Zolnierkiewicz, Chanwoo Choi
Exynos AUDSS clock driver has beem already converted to platform driver, so
remove the dependency on the syscore ops - the last remaining non-platform
driver feature. Platform device's system sleep PM provides all needed
infrastructure for replacing syscore-based PM, so do it now.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
drivers/clk/samsung/clk-exynos-audss.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
index 17e68a724945..cb7df358a27d 100644
--- a/drivers/clk/samsung/clk-exynos-audss.c
+++ b/drivers/clk/samsung/clk-exynos-audss.c
@@ -44,7 +44,7 @@
{ ASS_CLK_GATE, 0 },
};
-static int exynos_audss_clk_suspend(void)
+static int exynos_audss_clk_suspend(struct device *dev)
{
int i;
@@ -54,18 +54,15 @@ static int exynos_audss_clk_suspend(void)
return 0;
}
-static void exynos_audss_clk_resume(void)
+static int exynos_audss_clk_resume(struct device *dev)
{
int i;
for (i = 0; i < ARRAY_SIZE(reg_save); i++)
writel(reg_save[i][1], reg_base + reg_save[i][0]);
-}
-static struct syscore_ops exynos_audss_clk_syscore_ops = {
- .suspend = exynos_audss_clk_suspend,
- .resume = exynos_audss_clk_resume,
-};
+ return 0;
+}
#endif /* CONFIG_PM_SLEEP */
struct exynos_audss_clk_drvdata {
@@ -251,9 +248,6 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
goto unregister;
}
-#ifdef CONFIG_PM_SLEEP
- register_syscore_ops(&exynos_audss_clk_syscore_ops);
-#endif
return 0;
unregister:
@@ -267,10 +261,6 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
static int exynos_audss_clk_remove(struct platform_device *pdev)
{
-#ifdef CONFIG_PM_SLEEP
- unregister_syscore_ops(&exynos_audss_clk_syscore_ops);
-#endif
-
of_clk_del_provider(pdev->dev.of_node);
exynos_audss_clk_teardown();
@@ -281,10 +271,16 @@ static int exynos_audss_clk_remove(struct platform_device *pdev)
return 0;
}
+static const struct dev_pm_ops exynos_audss_clk_pm_ops = {
+ SET_LATE_SYSTEM_SLEEP_PM_OPS(exynos_audss_clk_suspend,
+ exynos_audss_clk_resume)
+};
+
static struct platform_driver exynos_audss_clk_driver = {
.driver = {
.name = "exynos-audss-clk",
.of_match_table = exynos_audss_clk_of_match,
+ .pm = &exynos_audss_clk_pm_ops,
},
.probe = exynos_audss_clk_probe,
.remove = exynos_audss_clk_remove,
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] clk/samsung: exynos-audss: Replace syscore PM with platform device PM
2016-11-25 9:39 ` [PATCH] clk/samsung: exynos-audss: Replace syscore PM with platform device PM Marek Szyprowski
@ 2016-11-25 13:12 ` Javier Martinez Canillas
2016-11-30 0:33 ` Chanwoo Choi
2016-12-29 15:18 ` Sylwester Nawrocki
2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2016-11-25 13:12 UTC (permalink / raw)
To: Marek Szyprowski, linux-clk, linux-samsung-soc
Cc: Sylwester Nawrocki, Krzysztof Kozlowski,
Bartlomiej Zolnierkiewicz, Chanwoo Choi
Hello Marek,
On 11/25/2016 06:39 AM, Marek Szyprowski wrote:
> Exynos AUDSS clock driver has beem already converted to platform driver, so
s/beem/been
> remove the dependency on the syscore ops - the last remaining non-platform
> driver feature. Platform device's system sleep PM provides all needed
> infrastructure for replacing syscore-based PM, so do it now.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
The patch looks good to me.
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk/samsung: exynos-audss: Replace syscore PM with platform device PM
2016-11-25 9:39 ` [PATCH] clk/samsung: exynos-audss: Replace syscore PM with platform device PM Marek Szyprowski
2016-11-25 13:12 ` Javier Martinez Canillas
@ 2016-11-30 0:33 ` Chanwoo Choi
2016-12-29 15:18 ` Sylwester Nawrocki
2 siblings, 0 replies; 4+ messages in thread
From: Chanwoo Choi @ 2016-11-30 0:33 UTC (permalink / raw)
To: Marek Szyprowski, linux-clk, linux-samsung-soc
Cc: Sylwester Nawrocki, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz
Dear Marek,
Looks good to me. I just proceeded the build test.
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Best Regards,
Chanwoo Choi
On 2016년 11월 25일 18:39, Marek Szyprowski wrote:
> Exynos AUDSS clock driver has beem already converted to platform driver, so
> remove the dependency on the syscore ops - the last remaining non-platform
> driver feature. Platform device's system sleep PM provides all needed
> infrastructure for replacing syscore-based PM, so do it now.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/clk/samsung/clk-exynos-audss.c | 24 ++++++++++--------------
> 1 file changed, 10 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
> index 17e68a724945..cb7df358a27d 100644
> --- a/drivers/clk/samsung/clk-exynos-audss.c
> +++ b/drivers/clk/samsung/clk-exynos-audss.c
> @@ -44,7 +44,7 @@
> { ASS_CLK_GATE, 0 },
> };
>
> -static int exynos_audss_clk_suspend(void)
> +static int exynos_audss_clk_suspend(struct device *dev)
> {
> int i;
>
> @@ -54,18 +54,15 @@ static int exynos_audss_clk_suspend(void)
> return 0;
> }
>
> -static void exynos_audss_clk_resume(void)
> +static int exynos_audss_clk_resume(struct device *dev)
> {
> int i;
>
> for (i = 0; i < ARRAY_SIZE(reg_save); i++)
> writel(reg_save[i][1], reg_base + reg_save[i][0]);
> -}
>
> -static struct syscore_ops exynos_audss_clk_syscore_ops = {
> - .suspend = exynos_audss_clk_suspend,
> - .resume = exynos_audss_clk_resume,
> -};
> + return 0;
> +}
> #endif /* CONFIG_PM_SLEEP */
>
> struct exynos_audss_clk_drvdata {
> @@ -251,9 +248,6 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
> goto unregister;
> }
>
> -#ifdef CONFIG_PM_SLEEP
> - register_syscore_ops(&exynos_audss_clk_syscore_ops);
> -#endif
> return 0;
>
> unregister:
> @@ -267,10 +261,6 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
>
> static int exynos_audss_clk_remove(struct platform_device *pdev)
> {
> -#ifdef CONFIG_PM_SLEEP
> - unregister_syscore_ops(&exynos_audss_clk_syscore_ops);
> -#endif
> -
> of_clk_del_provider(pdev->dev.of_node);
>
> exynos_audss_clk_teardown();
> @@ -281,10 +271,16 @@ static int exynos_audss_clk_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static const struct dev_pm_ops exynos_audss_clk_pm_ops = {
> + SET_LATE_SYSTEM_SLEEP_PM_OPS(exynos_audss_clk_suspend,
> + exynos_audss_clk_resume)
> +};
> +
> static struct platform_driver exynos_audss_clk_driver = {
> .driver = {
> .name = "exynos-audss-clk",
> .of_match_table = exynos_audss_clk_of_match,
> + .pm = &exynos_audss_clk_pm_ops,
> },
> .probe = exynos_audss_clk_probe,
> .remove = exynos_audss_clk_remove,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk/samsung: exynos-audss: Replace syscore PM with platform device PM
2016-11-25 9:39 ` [PATCH] clk/samsung: exynos-audss: Replace syscore PM with platform device PM Marek Szyprowski
2016-11-25 13:12 ` Javier Martinez Canillas
2016-11-30 0:33 ` Chanwoo Choi
@ 2016-12-29 15:18 ` Sylwester Nawrocki
2 siblings, 0 replies; 4+ messages in thread
From: Sylwester Nawrocki @ 2016-12-29 15:18 UTC (permalink / raw)
To: Marek Szyprowski, linux-clk, linux-samsung-soc
Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Chanwoo Choi
On 11/25/2016 10:39 AM, Marek Szyprowski wrote:
> Exynos AUDSS clock driver has beem already converted to platform driver, so
> remove the dependency on the syscore ops - the last remaining non-platform
> driver feature. Platform device's system sleep PM provides all needed
> infrastructure for replacing syscore-based PM, so do it now.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-29 15:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20161125094012epcas5p49d6feefb149c4bbb9937a43c1562cb72@epcas5p4.samsung.com>
2016-11-25 9:39 ` [PATCH] clk/samsung: exynos-audss: Replace syscore PM with platform device PM Marek Szyprowski
2016-11-25 13:12 ` Javier Martinez Canillas
2016-11-30 0:33 ` Chanwoo Choi
2016-12-29 15:18 ` Sylwester Nawrocki
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).