Commit 41fff779 authored by Bjorn Andersson's avatar Bjorn Andersson

clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled

When a GDSC is found to be enabled at boot the pm_runtime state will
be unbalanced as the GDSC is later turned off. Fix this by increasing
the usage counter on the power-domain, in line with how we handled the
regulator state.

Fixes: 1b771839 ("clk: qcom: gdsc: enable optional power domain support")
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220713212818.130277-1-bjorn.andersson@linaro.org
parent b1ec8b53
...@@ -437,6 +437,14 @@ static int gdsc_init(struct gdsc *sc) ...@@ -437,6 +437,14 @@ static int gdsc_init(struct gdsc *sc)
return ret; return ret;
} }
/* ...and the power-domain */
ret = gdsc_pm_runtime_get(sc);
if (ret) {
if (sc->rsupply)
regulator_disable(sc->rsupply);
return ret;
}
/* /*
* Votable GDSCs can be ON due to Vote from other masters. * Votable GDSCs can be ON due to Vote from other masters.
* If a Votable GDSC is ON, make sure we have a Vote. * If a Votable GDSC is ON, make sure we have a Vote.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment