]>
Commit | Line | Data |
---|---|---|
a65d4bac GKH |
1 | From foo@baz Sat Jul 28 10:25:26 CEST 2018 |
2 | From: Anson Huang <Anson.Huang@nxp.com> | |
3 | Date: Thu, 17 May 2018 15:27:22 +0800 | |
4 | Subject: regulator: pfuze100: add .is_enable() for pfuze100_swb_regulator_ops | |
5 | ||
6 | From: Anson Huang <Anson.Huang@nxp.com> | |
7 | ||
8 | [ Upstream commit 0b01fd3d40fe6402e5fa3b491ef23109feb1aaa5 ] | |
9 | ||
10 | If is_enabled() is not defined, regulator core will assume | |
11 | this regulator is already enabled, then it can NOT be really | |
12 | enabled after disabled. | |
13 | ||
14 | Based on Li Jun's patch from the NXP kernel tree. | |
15 | ||
16 | Signed-off-by: Anson Huang <Anson.Huang@nxp.com> | |
17 | Signed-off-by: Mark Brown <broonie@kernel.org> | |
18 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
20 | --- | |
21 | drivers/regulator/pfuze100-regulator.c | 1 + | |
22 | 1 file changed, 1 insertion(+) | |
23 | ||
24 | --- a/drivers/regulator/pfuze100-regulator.c | |
25 | +++ b/drivers/regulator/pfuze100-regulator.c | |
26 | @@ -158,6 +158,7 @@ static const struct regulator_ops pfuze1 | |
27 | static const struct regulator_ops pfuze100_swb_regulator_ops = { | |
28 | .enable = regulator_enable_regmap, | |
29 | .disable = regulator_disable_regmap, | |
30 | + .is_enabled = regulator_is_enabled_regmap, | |
31 | .list_voltage = regulator_list_voltage_table, | |
32 | .map_voltage = regulator_map_voltage_ascend, | |
33 | .set_voltage_sel = regulator_set_voltage_sel_regmap, |