]> www.infradead.org Git - users/dwmw2/linux.git/commit
regulator: core: Let boot-on regulators be powered off
authorPascal Paillet <p.paillet@st.com>
Wed, 13 Nov 2019 10:27:37 +0000 (11:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:04:31 +0000 (09:04 +0100)
commitdc1b1d7faf616ed663d0bba9be5abb4d1ed35d01
treecf199d663b55b983558d92e8a38023452b41252d
parent71dc356a363a3fca914ea4b35af0668d6c83b9b2
regulator: core: Let boot-on regulators be powered off

commit 089b3f61ecfc43ca4ea26d595e1d31ead6de3f7b upstream.

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: 05f224ca6693 ("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>
drivers/regulator/core.c