提交 cc8ed769 编写于 作者: S Sascha Hauer 提交者: Matthias Brugger

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: NSascha Hauer <s.hauer@pengutronix.de>
Tested-by: NDaniel Kurtz <djkurtz@chromium.org>
Reviewed-by: NDaniel Kurtz <djkurtz@chromium.org>
Signed-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
上级 be29523d
......@@ -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.
*/
if (!IS_ENABLED(CONFIG_PM))
genpd->power_on(genpd);
pm_genpd_init(genpd, NULL, false);
pm_genpd_init(genpd, NULL, true);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册