[PATCH] soc: mediatek: SCPSYS: Fix double enabling of regulators

Subsystems: arm/mediatek soc support, the rest

STALE3915d

3 messages, 3 authors, 2016-02-01 · open the first message on its own page

[PATCH] soc: mediatek: SCPSYS: Fix double enabling of regulators

From: s.hauer@pengutronix.de (Sascha Hauer)
Date: 2016-01-22 12:39:25

With CONFIG_PM enabled do not call genpd->power_on manually as this
will cause the regulators being turned on once in SCPSYS probe and
then again when the genpd core turns on the domains. Instead, call
genpd->power_on only with CONFIG_PM disabled and tell the genpd core
that the domains are disabled when registered.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/soc/mediatek/mtk-scpsys.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
index 0221387..78227db 100644
--- a/drivers/soc/mediatek/mtk-scpsys.c
+++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -500,14 +500,13 @@ static int __init scpsys_probe(struct platform_device *pdev)
 		genpd->dev_ops.active_wakeup = scpsys_active_wakeup;
 
 		/*
-		 * Initially turn on all domains to make the domains usable
-		 * with !CONFIG_PM and to get the hardware in sync with the
-		 * software.  The unused domains will be switched off during
-		 * late_init time.
+		 * With CONFIG_PM disabled turn on all domains to make the
+		 * hardware usable.
 		 */
-		genpd->power_on(genpd);
+		if (!IS_ENABLED(CONFIG_PM))
+			genpd->power_on(genpd);
 
-		pm_genpd_init(genpd, NULL, false);
+		pm_genpd_init(genpd, NULL, true);
 	}
 
 	/*
-- 
2.7.0.rc3

[PATCH] soc: mediatek: SCPSYS: Fix double enabling of regulators

From: Daniel Kurtz <hidden>
Date: 2016-01-22 19:26:13

On Fri, Jan 22, 2016 at 4:39 AM, Sascha Hauer [off-list ref] wrote:
With CONFIG_PM enabled do not call genpd->power_on manually as this
will cause the regulators being turned on once in SCPSYS probe and
then again when the genpd core turns on the domains. Instead, call
genpd->power_on only with CONFIG_PM disabled and tell the genpd core
that the domains are disabled when registered.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Take your pick:
Tested-by: Daniel Kurtz <redacted>
Reviewed-by: Daniel Kurtz <redacted>
quoted hunk
---
 drivers/soc/mediatek/mtk-scpsys.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
index 0221387..78227db 100644
--- a/drivers/soc/mediatek/mtk-scpsys.c
+++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -500,14 +500,13 @@ static int __init scpsys_probe(struct platform_device *pdev)
                genpd->dev_ops.active_wakeup = scpsys_active_wakeup;

                /*
-                * Initially turn on all domains to make the domains usable
-                * with !CONFIG_PM and to get the hardware in sync with the
-                * software.  The unused domains will be switched off during
-                * late_init time.
+                * With CONFIG_PM disabled turn on all domains to make the
+                * hardware usable.
                 */
-               genpd->power_on(genpd);
+               if (!IS_ENABLED(CONFIG_PM))
+                       genpd->power_on(genpd);

-               pm_genpd_init(genpd, NULL, false);
+               pm_genpd_init(genpd, NULL, true);
        }

        /*
--
2.7.0.rc3

[PATCH] soc: mediatek: SCPSYS: Fix double enabling of regulators

From: matthias.bgg@gmail.com (Matthias Brugger)
Date: 2016-02-01 10:28:39


On 22/01/16 20:26, Daniel Kurtz wrote:
On Fri, Jan 22, 2016 at 4:39 AM, Sascha Hauer[off-list ref]  wrote:
quoted
quoted
With CONFIG_PM enabled do not call genpd->power_on manually as this
will cause the regulators being turned on once in SCPSYS probe and
then again when the genpd core turns on the domains. Instead, call
genpd->power_on only with CONFIG_PM disabled and tell the genpd core
that the domains are disabled when registered.

Signed-off-by: Sascha Hauer<s.hauer@pengutronix.de>
Take your pick:
Tested-by: Daniel Kurtz<redacted>
Reviewed-by: Daniel Kurtz<redacted>
quoted
quoted
---
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help