summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-01-22 13:39:25 +0100
committerMatthias Brugger <matthias.bgg@gmail.com>2016-02-01 11:28:07 +0100
commitcc8ed76938b5cf6a54ab3d60edabaf808dc960d1 (patch)
treebb14934f59d46f1ff3b0bd7e89a3f94116443a22 /drivers/soc
parentsoc: mediatek: SCPSYS: use builtin_platform_driver (diff)
downloadlinux-cc8ed76938b5cf6a54ab3d60edabaf808dc960d1.tar.xz
linux-cc8ed76938b5cf6a54ab3d60edabaf808dc960d1.zip
soc: mediatek: SCPSYS: Fix double enabling of regulators
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>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/mediatek/mtk-scpsys.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
index 837effe19907..57e781c71e67 100644
--- a/drivers/soc/mediatek/mtk-scpsys.c
+++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -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);
}
/*