regulator: max77686: Use regulator_map_voltage_linear for simple linear mappings
Subsystems (2)
PATCH 1/1 regulator: max77686: Use regulator_map_voltage_linear for simple linear mappings
Both max77686_ops and max77686_buck_dvs_ops use simple linear voltage maps. Thus use regulator_map_voltage_linear is more efficient than using the defult regulator_map_voltage_iterate.
Signed-off-by Axel Lin <[email protected]>
--- drivers/regulator/max77686.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/regulator/max77686.c +2 -0
@@ -90,6 +90,7 @@ static int max77686_set_voltage_time_sel(struct regulator_dev *rdev,static struct regulator_ops max77686_ops = { .list_voltage = regulator_list_voltage_linear, + .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap,
@@ -100,6 +101,7 @@ static struct regulator_ops max77686_ops = {static struct regulator_ops max77686_buck_dvs_ops = { .list_voltage = regulator_list_voltage_linear, + .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap,
Signature · 1 line
1.7.9.5
Quoted 3 lines · Axel Lin
Both
max77686_opsandmax77686_buck_dvs_opsuse simple linear voltage maps. Thus useregulator_map_voltage_linearis more efficient than using the defultregulator_map_voltage_iterate.
I've applied this and your other patch but really what should happen here is that the default should get smarter and use map_voltage_linear() if list_voltage_linear() is in use and nothing is set.