Skip to content

Commit 41fff77

Browse files
committed
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: 1b77183 ("clk: qcom: gdsc: enable optional power domain support") Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/20220713212818.130277-1-bjorn.andersson@linaro.org
1 parent b1ec8b5 commit 41fff77

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/clk/qcom/gdsc.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,14 @@ static int gdsc_init(struct gdsc *sc)
437437
return ret;
438438
}
439439

440+
/* ...and the power-domain */
441+
ret = gdsc_pm_runtime_get(sc);
442+
if (ret) {
443+
if (sc->rsupply)
444+
regulator_disable(sc->rsupply);
445+
return ret;
446+
}
447+
440448
/*
441449
* Votable GDSCs can be ON due to Vote from other masters.
442450
* If a Votable GDSC is ON, make sure we have a Vote.

0 commit comments

Comments
 (0)