diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 12 | ||||
-rw-r--r-- | drivers/regulator/db8500-prcmu.c | 4 | ||||
-rw-r--r-- | drivers/regulator/palmas-regulator.c | 3 | ||||
-rw-r--r-- | drivers/regulator/twl-regulator.c | 9 |
4 files changed, 16 insertions, 12 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index da9782bd27d0..e3661c20cf38 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -2830,7 +2830,7 @@ EXPORT_SYMBOL_GPL(regulator_get_bypass_regmap); | |||
2830 | * regulator_allow_bypass - allow the regulator to go into bypass mode | 2830 | * regulator_allow_bypass - allow the regulator to go into bypass mode |
2831 | * | 2831 | * |
2832 | * @regulator: Regulator to configure | 2832 | * @regulator: Regulator to configure |
2833 | * @allow: enable or disable bypass mode | 2833 | * @enable: enable or disable bypass mode |
2834 | * | 2834 | * |
2835 | * Allow the regulator to go into bypass mode if all other consumers | 2835 | * Allow the regulator to go into bypass mode if all other consumers |
2836 | * for the regulator also enable bypass mode and the machine | 2836 | * for the regulator also enable bypass mode and the machine |
@@ -3057,9 +3057,13 @@ int regulator_bulk_enable(int num_consumers, | |||
3057 | return 0; | 3057 | return 0; |
3058 | 3058 | ||
3059 | err: | 3059 | err: |
3060 | pr_err("Failed to enable %s: %d\n", consumers[i].supply, ret); | 3060 | for (i = 0; i < num_consumers; i++) { |
3061 | while (--i >= 0) | 3061 | if (consumers[i].ret < 0) |
3062 | regulator_disable(consumers[i].consumer); | 3062 | pr_err("Failed to enable %s: %d\n", consumers[i].supply, |
3063 | consumers[i].ret); | ||
3064 | else | ||
3065 | regulator_disable(consumers[i].consumer); | ||
3066 | } | ||
3063 | 3067 | ||
3064 | return ret; | 3068 | return ret; |
3065 | } | 3069 | } |
diff --git a/drivers/regulator/db8500-prcmu.c b/drivers/regulator/db8500-prcmu.c index 219d162b651e..a53c11a529d5 100644 --- a/drivers/regulator/db8500-prcmu.c +++ b/drivers/regulator/db8500-prcmu.c | |||
@@ -528,7 +528,7 @@ static int db8500_regulator_probe(struct platform_device *pdev) | |||
528 | return 0; | 528 | return 0; |
529 | } | 529 | } |
530 | 530 | ||
531 | static int __exit db8500_regulator_remove(struct platform_device *pdev) | 531 | static int db8500_regulator_remove(struct platform_device *pdev) |
532 | { | 532 | { |
533 | int i; | 533 | int i; |
534 | 534 | ||
@@ -553,7 +553,7 @@ static struct platform_driver db8500_regulator_driver = { | |||
553 | .owner = THIS_MODULE, | 553 | .owner = THIS_MODULE, |
554 | }, | 554 | }, |
555 | .probe = db8500_regulator_probe, | 555 | .probe = db8500_regulator_probe, |
556 | .remove = __exit_p(db8500_regulator_remove), | 556 | .remove = db8500_regulator_remove, |
557 | }; | 557 | }; |
558 | 558 | ||
559 | static int __init db8500_regulator_init(void) | 559 | static int __init db8500_regulator_init(void) |
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index cde13bb5a8fb..39cf14606784 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright 2011-2012 Texas Instruments Inc. | 4 | * Copyright 2011-2012 Texas Instruments Inc. |
5 | * | 5 | * |
6 | * Author: Graeme Gregory <gg@slimlogic.co.uk> | 6 | * Author: Graeme Gregory <gg@slimlogic.co.uk> |
7 | * Author: Ian Lartey <ian@slimlogic.co.uk> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
@@ -156,7 +157,7 @@ static const struct regs_info palmas_regs_info[] = { | |||
156 | * | 157 | * |
157 | * So they are basically (maxV-minV)/stepV | 158 | * So they are basically (maxV-minV)/stepV |
158 | */ | 159 | */ |
159 | #define PALMAS_SMPS_NUM_VOLTAGES 116 | 160 | #define PALMAS_SMPS_NUM_VOLTAGES 117 |
160 | #define PALMAS_SMPS10_NUM_VOLTAGES 2 | 161 | #define PALMAS_SMPS10_NUM_VOLTAGES 2 |
161 | #define PALMAS_LDO_NUM_VOLTAGES 50 | 162 | #define PALMAS_LDO_NUM_VOLTAGES 50 |
162 | 163 | ||
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 74508cc62d67..f705d25b437c 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c | |||
@@ -471,24 +471,23 @@ twl4030ldo_set_voltage_sel(struct regulator_dev *rdev, unsigned selector) | |||
471 | selector); | 471 | selector); |
472 | } | 472 | } |
473 | 473 | ||
474 | static int twl4030ldo_get_voltage(struct regulator_dev *rdev) | 474 | static int twl4030ldo_get_voltage_sel(struct regulator_dev *rdev) |
475 | { | 475 | { |
476 | struct twlreg_info *info = rdev_get_drvdata(rdev); | 476 | struct twlreg_info *info = rdev_get_drvdata(rdev); |
477 | int vsel = twlreg_read(info, TWL_MODULE_PM_RECEIVER, | 477 | int vsel = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_VOLTAGE); |
478 | VREG_VOLTAGE); | ||
479 | 478 | ||
480 | if (vsel < 0) | 479 | if (vsel < 0) |
481 | return vsel; | 480 | return vsel; |
482 | 481 | ||
483 | vsel &= info->table_len - 1; | 482 | vsel &= info->table_len - 1; |
484 | return LDO_MV(info->table[vsel]) * 1000; | 483 | return vsel; |
485 | } | 484 | } |
486 | 485 | ||
487 | static struct regulator_ops twl4030ldo_ops = { | 486 | static struct regulator_ops twl4030ldo_ops = { |
488 | .list_voltage = twl4030ldo_list_voltage, | 487 | .list_voltage = twl4030ldo_list_voltage, |
489 | 488 | ||
490 | .set_voltage_sel = twl4030ldo_set_voltage_sel, | 489 | .set_voltage_sel = twl4030ldo_set_voltage_sel, |
491 | .get_voltage = twl4030ldo_get_voltage, | 490 | .get_voltage_sel = twl4030ldo_get_voltage_sel, |
492 | 491 | ||
493 | .enable = twl4030reg_enable, | 492 | .enable = twl4030reg_enable, |
494 | .disable = twl4030reg_disable, | 493 | .disable = twl4030reg_disable, |