Thread (240 messages) flat view 240 messages, 6 authors, 2018-08-08
STALE2965d

[PATCH 4.14 126/246] regulator: pfuze100: add .is_enable() for pfuze100_swb_regulator_ops

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2018-08-01 17:18:09
Also in: lkml

4.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Anson Huang <redacted>

[ Upstream commit 0b01fd3d40fe6402e5fa3b491ef23109feb1aaa5 ]

If is_enabled() is not defined, regulator core will assume
this regulator is already enabled, then it can NOT be really
enabled after disabled.

Based on Li Jun's patch from the NXP kernel tree.

Signed-off-by: Anson Huang <redacted>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/regulator/pfuze100-regulator.c |    1 +
 1 file changed, 1 insertion(+)
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -158,6 +158,7 @@ static const struct regulator_ops pfuze1
 static const struct regulator_ops pfuze100_swb_regulator_ops = {
 	.enable = regulator_enable_regmap,
 	.disable = regulator_disable_regmap,
+	.is_enabled = regulator_is_enabled_regmap,
 	.list_voltage = regulator_list_voltage_table,
 	.map_voltage = regulator_map_voltage_ascend,
 	.set_voltage_sel = regulator_set_voltage_sel_regmap,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help