diff options
author | Javier Martinez Canillas <javier.martinez@collabora.co.uk> | 2014-10-15 12:20:33 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 07:23:50 -0400 |
commit | b0615f1da543500f8442fa6e5adacb8c54b34c5f (patch) | |
tree | 9987d6cf11bb6c2f11f8df645be9098842b1dce4 /drivers/regulator | |
parent | e6fb2aac552ab229e01169776199c13e2524c318 (diff) |
regulator: max77802: Split regulator operations for BUCKs
Not all the max77802 BUCKs regulators have the same functionality, for
example BUCKs 2-4 support the output to be configured as normal or Low
Power Mode by the PWRREQ enable pin while the other BUCKs only support
their output to be set ON or OFF by PWRREQ. As a preparation for adding
a set_suspend_mode function handler for all the regulators that support
Low Power Mode by PWRREQ, split the operations for BUCKs regulators.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/max77802.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/regulator/max77802.c b/drivers/regulator/max77802.c index 26f6963108e3..8425c0d520a8 100644 --- a/drivers/regulator/max77802.c +++ b/drivers/regulator/max77802.c | |||
@@ -286,7 +286,22 @@ static struct regulator_ops max77802_buck_16_dvs_ops = { | |||
286 | .set_suspend_disable = max77802_set_suspend_disable, | 286 | .set_suspend_disable = max77802_set_suspend_disable, |
287 | }; | 287 | }; |
288 | 288 | ||
289 | /* BUCKs 2-4, 5, 7-10 */ | 289 | /* BUCKs 2-4 */ |
290 | static struct regulator_ops max77802_buck_234_ops = { | ||
291 | .list_voltage = regulator_list_voltage_linear, | ||
292 | .map_voltage = regulator_map_voltage_linear, | ||
293 | .is_enabled = regulator_is_enabled_regmap, | ||
294 | .enable = max77802_enable, | ||
295 | .disable = regulator_disable_regmap, | ||
296 | .get_voltage_sel = regulator_get_voltage_sel_regmap, | ||
297 | .set_voltage_sel = regulator_set_voltage_sel_regmap, | ||
298 | .set_voltage_time_sel = regulator_set_voltage_time_sel, | ||
299 | .set_ramp_delay = max77802_set_ramp_delay_2bit, | ||
300 | .set_suspend_enable = max77802_enable, | ||
301 | .set_suspend_disable = max77802_set_suspend_disable, | ||
302 | }; | ||
303 | |||
304 | /* BUCKs 5, 7-10 */ | ||
290 | static struct regulator_ops max77802_buck_dvs_ops = { | 305 | static struct regulator_ops max77802_buck_dvs_ops = { |
291 | .list_voltage = regulator_list_voltage_linear, | 306 | .list_voltage = regulator_list_voltage_linear, |
292 | .map_voltage = regulator_map_voltage_linear, | 307 | .map_voltage = regulator_map_voltage_linear, |
@@ -360,7 +375,7 @@ static struct regulator_ops max77802_buck_dvs_ops = { | |||
360 | .name = "BUCK"#num, \ | 375 | .name = "BUCK"#num, \ |
361 | .id = MAX77802_BUCK##num, \ | 376 | .id = MAX77802_BUCK##num, \ |
362 | .supply_name = "inb"#num, \ | 377 | .supply_name = "inb"#num, \ |
363 | .ops = &max77802_buck_dvs_ops, \ | 378 | .ops = &max77802_buck_234_ops, \ |
364 | .type = REGULATOR_VOLTAGE, \ | 379 | .type = REGULATOR_VOLTAGE, \ |
365 | .owner = THIS_MODULE, \ | 380 | .owner = THIS_MODULE, \ |
366 | .min_uV = 600000, \ | 381 | .min_uV = 600000, \ |