Commit 5e99210
regulator: core: fix false positive in regulator_late_cleanup()
[ Upstream commit 4e2a354 ]
The check done by regulator_late_cleanup() to detect whether a regulator
is on was inconsistent with the check done by _regulator_is_enabled().
While _regulator_is_enabled() takes the enable GPIO into account,
regulator_late_cleanup() was not doing that.
This resulted in a false positive, e.g. when a GPIO-controlled fixed
regulator was used, which was not enabled at boot time, e.g.
reg_disp_1v2: reg_disp_1v2 {
compatible = "regulator-fixed";
regulator-name = "display_1v2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
gpio = <&tlmm 148 0>;
enable-active-high;
};
Such regulator doesn't have an is_enabled() operation. Nevertheless
it's state can be determined based on the enable GPIO. The check in
regulator_late_cleanup() wrongly assumed that the regulator is on and
tried to disable it.
Signed-off-by: Oliver Barta <oliver.barta@aptiv.com>
Link: https://lore.kernel.org/r/20220208084645.8686-1-oliver.barta@aptiv.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 2b490e1 commit 5e99210
1 file changed
+3
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6014 | 6014 | | |
6015 | 6015 | | |
6016 | 6016 | | |
6017 | | - | |
6018 | 6017 | | |
6019 | | - | |
| 6018 | + | |
6020 | 6019 | | |
6021 | 6020 | | |
6022 | 6021 | | |
| |||
6029 | 6028 | | |
6030 | 6029 | | |
6031 | 6030 | | |
6032 | | - | |
6033 | | - | |
6034 | | - | |
6035 | | - | |
6036 | | - | |
6037 | | - | |
6038 | | - | |
6039 | | - | |
| 6031 | + | |
| 6032 | + | |
6040 | 6033 | | |
6041 | 6034 | | |
6042 | 6035 | | |
| |||
0 commit comments