mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
regulator: core: Let boot-on regulators be powered off
commit089b3f61ecupstream. 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:05f224ca66("regulator: core: Clean enabling always-on regulators + their supplies") Signed-off-by: Pascal Paillet <p.paillet@st.com> Link: https://lore.kernel.org/r/20191113102737.27831-1-p.paillet@st.com Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Andre Kalb <andre.kalb@sma.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
71dc356a36
commit
dc1b1d7faf
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user