diff options
author | Axel Lin <axel.lin@ingics.com> | 2012-11-23 02:25:54 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-23 13:13:01 +0100 |
commit | bf0caae3036563ef84d1dcb7b2c7fcbda59a889d (patch) | |
tree | a519b5c0e6b8f09405c1d6565e3125338637dce8 /drivers/regulator | |
parent | regulator: tps80031: Trivial cleanups (diff) | |
download | linux-bf0caae3036563ef84d1dcb7b2c7fcbda59a889d.tar.xz linux-bf0caae3036563ef84d1dcb7b2c7fcbda59a889d.zip |
regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed regulators
Implement list_voltage for fixed regulators, otherwise
regulator_is_supported_voltage() returns 0.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/tps80031-regulator.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c index aaab3d73d7bd..ce480499177e 100644 --- a/drivers/regulator/tps80031-regulator.c +++ b/drivers/regulator/tps80031-regulator.c @@ -407,15 +407,18 @@ static struct regulator_ops tps80031_ldo_ops = { }; static struct regulator_ops tps80031_vbus_sw_ops = { + .list_voltage = regulator_list_voltage_linear, .enable = tps80031_vbus_enable, .disable = tps80031_vbus_disable, .is_enabled = tps80031_vbus_is_enabled, }; static struct regulator_ops tps80031_vbus_hw_ops = { + .list_voltage = regulator_list_voltage_linear, }; static struct regulator_ops tps80031_ext_reg_ops = { + .list_voltage = regulator_list_voltage_linear, .enable = tps80031_reg_enable, .disable = tps80031_reg_disable, .is_enabled = tps80031_reg_is_enabled, @@ -477,7 +480,8 @@ static struct regulator_ops tps80031_ext_reg_ops = { .desc = { \ .name = "tps80031_"#_id, \ .id = TPS80031_REGULATOR_##_id, \ - .n_voltages = 2, \ + .min_uV = max_mV * 1000, \ + .n_voltages = 1, \ .ops = &_ops, \ .type = REGULATOR_VOLTAGE, \ .owner = THIS_MODULE, \ |