]> git.sur5r.net Git - u-boot/commitdiff
dm: power: Allow regulators to not implement all operations
authorSimon Glass <sjg@chromium.org>
Fri, 22 Jan 2016 02:43:59 +0000 (19:43 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 22 Jan 2016 03:42:35 +0000 (20:42 -0700)
Some regulators will not implement any operations (e.g. fixed regulators).
This is not an error, so allow the autoset process to continue when one
of these regulators is found.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/power/regulator/regulator-uclass.c

index fec288629de20e3b72b1204861666b142cf03bde..9fe07f2f7336e339fe604986145f901dad6d98c0 100644 (file)
@@ -334,6 +334,8 @@ int regulators_enable_boot_on(bool verbose)
                }
                if (verbose)
                        regulator_show(dev, ret);
+               if (ret == -ENOSYS)
+                       ret = 0;
        }
 
        return ret;