mirror of
https://xff.cz/git/u-boot/
synced 2025-10-02 16:01:30 +02:00
power: regulator: Handle autoset in regulators_enable_boot_on()
With a recent change, regulators_enable_boot_on() returns an error if a
regulator is already set. Check for and handle this situation.
Fixes: d99fb64a98
power: regulator: Only run autoset once for each regulator
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
This commit is contained in:
@@ -518,7 +518,7 @@ int regulators_enable_boot_on(bool verbose)
|
|||||||
dev;
|
dev;
|
||||||
uclass_next_device(&dev)) {
|
uclass_next_device(&dev)) {
|
||||||
ret = regulator_autoset(dev);
|
ret = regulator_autoset(dev);
|
||||||
if (ret == -EMEDIUMTYPE) {
|
if (ret == -EMEDIUMTYPE || ret == -EALREADY) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user