summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-07-02 18:16:06 -0600
committerSimon Glass <sjg@chromium.org>2015-08-05 21:06:13 -0600
commitd08504d18a0a6af2ba6171a4a3e71a032d2836b6 (patch)
tree95fde4a8651d30c45c27c21ea706a3c4198b9daa /drivers/power
parent75a429f1a299cf4cd4ab3f18eb75a7eb632776c9 (diff)
downloadu-boot-d08504d18a0a6af2ba6171a4a3e71a032d2836b6.tar.gz
u-boot-d08504d18a0a6af2ba6171a4a3e71a032d2836b6.tar.bz2
u-boot-d08504d18a0a6af2ba6171a4a3e71a032d2836b6.zip
dm: power: Don't return an error when regulators are not autoset
Not all regulators can be set up automatically. Adjust the code so that regulators_enable_boot_on() will return success when some are skipped. Only genuine errors are reported. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/regulator/regulator-uclass.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 12e141b4ad..f3fe7a55e1 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -319,8 +319,10 @@ int regulators_enable_boot_on(bool verbose)
dev && !ret;
uclass_next_device(&dev)) {
ret = regulator_autoset(dev);
- if (ret == -EMEDIUMTYPE)
+ if (ret == -EMEDIUMTYPE) {
+ ret = 0;
continue;
+ }
if (verbose)
regulator_show(dev, ret);
}