[U-Boot] [PATCH 29/55] dm: power: Don't return an error when regulators are not autoset

Przemyslaw Marczak p.marczak at samsung.com
Fri Jul 10 13:54:01 CEST 2015


Hello Simon,

On 07/03/2015 02:16 AM, Simon Glass wrote:
> 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 at chromium.org>
> ---
>
>   drivers/power/regulator/regulator-uclass.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
> index 12e141b..f3fe7a5 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);
>   	}
>

Acked-by: Przemyslaw Marczak <p.marczak at samsung.com>

Regards.
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com


More information about the U-Boot mailing list