Skip to contentSkip to conversation

regulator: lp3971: Convert to use regulator_map_voltage_ascend

PATCH Applied Axel Lin 3 participants 4 messages Apr 20, 2013 – Apr 23, 2013 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 regulator: lp3971: Convert to use regulator_map_voltage_ascend

All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate.

---
 drivers/regulator/lp3971.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/regulator/lp3971.c +2 -0
index 9cb2c0f..d8af9e7 100644
@@ -163,6 +163,7 @@ static int lp3971_ldo_set_voltage_sel(struct regulator_dev *dev,
 
 static struct regulator_ops lp3971_ldo_ops = {
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 	.is_enabled = lp3971_ldo_is_enabled,
 	.enable = lp3971_ldo_enable,
 	.disable = lp3971_ldo_disable,
@@ -236,6 +237,7 @@ static int lp3971_dcdc_set_voltage_sel(struct regulator_dev *dev,
 
 static struct regulator_ops lp3971_dcdc_ops = {
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 	.is_enabled = lp3971_dcdc_is_enabled,
 	.enable = lp3971_dcdc_enable,
 	.disable = lp3971_dcdc_disable,
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/2 regulator: lp3972: Convert to use regulator_map_voltage_ascend

All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate.

---
 drivers/regulator/lp3972.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/regulator/lp3972.c +2 -0
index 0baabcf..61e4cf9 100644
@@ -309,6 +309,7 @@ static int lp3972_ldo_set_voltage_sel(struct regulator_dev *dev,
 
 static struct regulator_ops lp3972_ldo_ops = {
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 	.is_enabled = lp3972_ldo_is_enabled,
 	.enable = lp3972_ldo_enable,
 	.disable = lp3972_ldo_disable,
@@ -389,6 +390,7 @@ static int lp3972_dcdc_set_voltage_sel(struct regulator_dev *dev,
 
 static struct regulator_ops lp3972_dcdc_ops = {
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 	.is_enabled = lp3972_dcdc_is_enabled,
 	.enable = lp3972_dcdc_enable,
 	.disable = lp3972_dcdc_disable,
Signature · 1 line
1.7.10.4
Acked-by on v1 1/2
#2 lore raw
In reply to Axel Lin

Hello,

Quoted 5 lines · Axel Lin

All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate.

Quoted 17 lines
---
  drivers/regulator/lp3971.c |    2 ++
  1 file changed, 2 insertions(+)
drivers/regulator/lp3971.c +1 -0
index 9cb2c0f..d8af9e7 100644
@@ -163,6 +163,7 @@ static int lp3971_ldo_set_voltage_sel(struct regulator_dev *dev,
 
  static struct regulator_ops lp3971_ldo_ops = {
  	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
  	.is_enabled = lp3971_ldo_is_enabled,
  	.enable = lp3971_ldo_enable,
  	.disable = lp3971_ldo_disable,

drivers/regulator/lp3971.c static int lp3971_dcdc_set_voltage_sel(struct regulator_dev *dev, · line 243

Quoted 7 lines
drivers/regulator/lp3971.c +1 -0
@@ -236,6 +237,7 @@ static int lp3971_dcdc_set_voltage_sel(struct regulator_dev *dev,
 
  static struct regulator_ops lp3971_dcdc_ops = {
  	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
  	.is_enabled = lp3971_dcdc_is_enabled,
  	.enable = lp3971_dcdc_enable,
  	.disable = lp3971_dcdc_disable,

Best regards

Signature · 2 lines
Marek Szyprowski
Samsung Poland R&D Center
maintainer Applied
#3 lore raw
In reply to Axel Lin
Quoted 3 lines · Axel Lin

All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate.

Applied both, thanks.