mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
UPSTREAM: regulator: core: Let boot-on regulators be powered off
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. Change-Id: I7adc58a78fec934e245d9ec94c4604b4d7c7ebb5 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> Signed-off-by: Tao Huang <huangtao@rock-chips.com> (cherry picked from commit089b3f61ec)
This commit is contained in:
committed by
Tao Huang
parent
6d247974f8
commit
6d0cb62e47
@@ -1260,7 +1260,9 @@ static int set_machine_constraints(struct regulator_dev *rdev)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
rdev->use_count++;
|
||||
|
||||
if (rdev->constraints->always_on)
|
||||
rdev->use_count++;
|
||||
}
|
||||
|
||||
print_constraints(rdev);
|
||||
|
||||
Reference in New Issue
Block a user