Skip to contentSkip to conversation

regulator: wm831x-ldo: Use regulator_map_voltage_linear for wm831x_alive_ldo_ops

PATCH Applied Axel Lin 2 participants 3 messages May 31, 2012 – Jun 1, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 regulator: wm831x-ldo: Use regulator_map_voltage_linear for wm831x_alive_ldo_ops

wm831x_alive_ldo_ops uses simple linear voltage maps.
Thus use regulator_map_voltage_linear is more efficient than using the default regulator_map_voltage_iterate.

---
 drivers/regulator/wm831x-ldo.c |    1 +
 1 file changed, 1 insertion(+)
drivers/regulator/wm831x-ldo.c +1 -0
index a9a28d8..f23d020e9 100644
@@ -690,6 +690,7 @@ static int wm831x_alive_ldo_get_status(struct regulator_dev *rdev)
 
 static struct regulator_ops wm831x_alive_ldo_ops = {
 	.list_voltage = regulator_list_voltage_linear,
+	.map_voltage = regulator_map_voltage_linear,
 	.get_voltage_sel = regulator_get_voltage_sel_regmap,
 	.set_voltage = wm831x_alive_ldo_set_voltage,
 	.set_suspend_voltage = wm831x_alive_ldo_set_suspend_voltage,
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/2 regulator: wm8400: Use regulator_map_voltage_linear for wm8400_dcdc_ops

wm8400_dcdc_ops uses simple linear voltage maps.
Thus use regulator_map_voltage_linear is more efficient than using the default regulator_map_voltage_iterate.

---
 drivers/regulator/wm8400-regulator.c |    1 +
 1 file changed, 1 insertion(+)
drivers/regulator/wm8400-regulator.c +1 -0
index 69a2b7c..f365795 100644
@@ -152,6 +152,7 @@ static struct regulator_ops wm8400_dcdc_ops = {
 	.enable = regulator_enable_regmap,
 	.disable = regulator_disable_regmap,
 	.list_voltage = regulator_list_voltage_linear,
+	.map_voltage = regulator_map_voltage_linear,
 	.get_voltage_sel = regulator_get_voltage_sel_regmap,
 	.set_voltage_sel = regulator_set_voltage_sel_regmap,
 	.get_mode = wm8400_dcdc_get_mode,
Signature · 1 line
1.7.9.5
Applied
#2 lore raw
In reply to Axel Lin
Quoted 3 lines · Axel Lin

wm831x_alive_ldo_ops uses simple linear voltage maps.
Thus use regulator_map_voltage_linear is more efficient than using the default regulator_map_voltage_iterate.

Applied both, thanks.