regulator: core: Let boot-on regulators be powered off
Subsystems (2)
PATCH 1/1 regulator: core: Let boot-on regulators be powered off
[ Upstream commit 089b3f61ecfc43ca4ea26d595e1d31ead6de3f7b ]
Boot-on regulators are always kept on because their use_count value is now incremented at boot time and never cleaned.
Only increment count value for alway-on regulators. regulator_late_cleanup() is now able to power off boot-on regulators when unused.
Fixes 45f9c1b2e57c ("regulator: core: Clean enabling always-on regulators + their supplies")
Signed-off-by Pascal Paillet <[email protected]>
Signed-off-by Mark Brown <[email protected]>
Acked-by Andre Kalb <[email protected]>
# 4.19.x
--- drivers/regulator/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/regulator/core.c +3 -1
@@ -1211,7 +1211,9 @@ static int set_machine_constraints(struct regulator_dev *rdev)rdev_err (rdev,"failed to enable\n" );return ret; } - rdev->use_count++; + +if (rdev->constraints->always_on) + rdev->use_count++; }print_constraints (rdev);
Signature · 1 line
2.31.1
Greg KH
maintainerQuoted 14 lines · Andre Kalb
[ Upstream commit
089b3f61ecfc43ca4ea26d595e1d31ead6de3f7b]Boot-on regulators are always kept on because their
use_countvalue is now incremented at boot time and never cleaned.Only increment count value for alway-on regulators.
regulator_late_cleanup()is now able to power off boot-on regulators when unused.Fixes 45f9c1b2e57c ("regulator: core: Clean enabling always-on regulators + their supplies")Signed-off-by Pascal Paillet <[email protected]>Signed-off-by Mark Brown <[email protected]>Acked-by Andre Kalb <[email protected]>
Quoted 4 lines
# 4.19.x
--- drivers/regulator/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Now queued up, thanks.
greg k-h