regulator: max77686: Use regulator_map_voltage_linear for simple linear mappings
authorAxel Lin <axel.lin@gmail.com>
Sun, 3 Jun 2012 14:46:14 +0000 (22:46 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 3 Jun 2012 19:11:09 +0000 (20:11 +0100)
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 <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/max77686.c

index 70046f8032fdd15b77afc4e69420060ba6f65bb5..4e9f4f3f062b2107a0e5cb81eceab290faec1913 100644 (file)
@@ -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,