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>
Tue, 31 Dec 2019 15:45:32 +0000 (16:45 +0100)
commitf44b07472f29ae313ce875dc7b9c75b100c608b8
tree8c81a67f84a46cda9828b5e448c63a9563ac7d41
parent1abc16758bb7a10b08bff5ae0656d7ef1480a802
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: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/regulator/core.c