Skip to content

Commit

Permalink
regulator: ab8500: Use regulator_list_voltage_linear for fixed voltage
Browse files Browse the repository at this point in the history
Both ab8500_regulator_mode_ops and ab8500_regulator_ops do not have volt_table
setting, thus we can not use regulator_list_voltage_table for them.
However, they have min_uV setting with n_voltages = 1, so use
regulator_list_voltage_linear instead.

Also remove setting set_voltage_time_sel for ab8500_regulator_mode_ops.
It is used only for fixed voltage, so it does not need to implement
set_voltage_time_sel.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 25, 2013
1 parent 328a536 commit 5689e83
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/regulator/ab8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,15 @@ static struct regulator_ops ab8500_regulator_mode_ops = {
.set_mode = ab8500_regulator_set_mode,
.get_mode = ab8500_regulator_get_mode,
.get_voltage_sel = ab8500_regulator_get_voltage_sel,
.list_voltage = regulator_list_voltage_table,
.set_voltage_time_sel = ab8500_regulator_set_voltage_time_sel,
.list_voltage = regulator_list_voltage_linear,
};

static struct regulator_ops ab8500_regulator_ops = {
.enable = ab8500_regulator_enable,
.disable = ab8500_regulator_disable,
.is_enabled = ab8500_regulator_is_enabled,
.get_voltage_sel = ab8500_regulator_get_voltage_sel,
.list_voltage = regulator_list_voltage_table,
.list_voltage = regulator_list_voltage_linear,
};

static struct ab8500_regulator_info
Expand Down

0 comments on commit 5689e83

Please sign in to comment.