From: Simon Glass Date: Thu, 27 Jun 2024 08:29:46 +0000 (+0100) Subject: power: regulator: Handle autoset in regulators_enable_boot_on() X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=ac91baea6d8292295aeb63c40ec4261d7c47217e;p=u-boot.git 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: d99fb64a98a power: regulator: Only run autoset once for each regulator Reviewed-by: Jonas Karlman Reviewed-by: Quentin Schulz Signed-off-by: Simon Glass Reviewed-by: Quentin Schulz Reviewed-by: Jonas Karlman --- diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index 77d101f262..d9e1fb6829 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -518,7 +518,7 @@ int regulators_enable_boot_on(bool verbose) dev; uclass_next_device(&dev)) { ret = regulator_autoset(dev); - if (ret == -EMEDIUMTYPE) { + if (ret == -EMEDIUMTYPE || ret == -EALREADY) { ret = 0; continue; }