regulator: lp3971: Convert to use regulator_map_voltage_ascend
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
@@ -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
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
@@ -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
Hello,
Quoted 5 lines · Axel Lin
All regulators have ascendant voltage list in this driver. Thus use
regulator_map_voltage_ascendis more efficient than the defaultregulator_map_voltage_iterate.Signed-off-by Axel Lin <[email protected]>
Quoted 17 lines
--- drivers/regulator/lp3971.c | 2 ++ 1 file changed, 2 insertions(+)drivers/regulator/lp3971.c +1
-0@@ -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
Quoted 3 lines · Axel Lin
All regulators have ascendant voltage list in this driver. Thus use
regulator_map_voltage_ascendis more efficient than the defaultregulator_map_voltage_iterate.
Applied both, thanks.