[PATCH 08/16] board: stm32mp1: update management of boot-led

Wolfgang Denk wd at denx.de
Wed Apr 1 13:32:12 CEST 2020


Dear Patrick Delaunay,

In message <20200331180330.8.I15cb0a6245fb4cd5d23371683c2697f794adf306 at changeid> you wrote:
> Force boot-led ON and no more rely on default-state.
> This patch avoid device-tree modification for U-Boot.
...

> +#ifdef CONFIG_LED
>  	struct udevice *dev;
>  	int ret;
>  
> @@ -292,8 +294,10 @@ static int setup_led(enum led_state_t cmd)
>  
>  	ret = led_set_state(dev, cmd);
>  	return ret;
> -}
> +#else
> +	return 0;
>  #endif
> +}
>  
>  static void __maybe_unused led_error_blink(u32 nb_blink)
>  {
> @@ -648,8 +652,10 @@ int board_init(void)
>  
>  	sysconf_init();
>  
> -	if (CONFIG_IS_ENABLED(CONFIG_LED))
> +	if (CONFIG_IS_ENABLED(CONFIG_LED)) {
>  		led_default_state();
> +		setup_led(LEDST_ON);
> +	}

This is inconsistent, please use CONFIG_IS_ENABLED() everywhere
instead of #ifdef's.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q:  Do you know what the death rate around here is?
A:  One per person.


More information about the U-Boot mailing list