]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
soc: mediatek: SCPSYS: Fix double enabling of regulators
authorSascha Hauer <s.hauer@pengutronix.de>
Fri, 22 Jan 2016 12:39:25 +0000 (13:39 +0100)
committerMatthias Brugger <matthias.bgg@gmail.com>
Mon, 1 Feb 2016 10:28:07 +0000 (11:28 +0100)
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>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-scpsys.c

index 837effe199071bcb319a525e4c9498b4cf2225ba..57e781c71e6776223b7f13fecaa3243572302cf7 100644 (file)
@@ -491,14 +491,13 @@ static int 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);
        }
 
        /*