[PATCH v2] cmd: led: fix led command usage for the LED_SW_BLINK enabled case

Alexander Dahl ada at thorsis.com
Thu Aug 1 08:41:52 CEST 2024


Hello Mikhail,

Am Wed, Jul 31, 2024 at 06:56:13PM +0400 schrieb Mikhail Kshevetskiy:
> CONFIG_LED_BLINK and CONFIG_LED_SW_BLINK can be defined independently.
> Led blinking works if any (or both) of them is enabled. Unfortunately
> the led command help does not display blinking option if only
> CONFIG_LED_SW_BLINK is enabled. This is definitely wrong.
> 
> This patch fix an issue.
> 
> Changes v2:
>  * patch description added

The changelog usually is not part of the commit message, but added
below three dashes ---

> 
> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
>  cmd/led.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmd/led.c b/cmd/led.c
> index 2f786f34c67..91fb856ee59 100644
> --- a/cmd/led.c
> +++ b/cmd/led.c
> @@ -118,7 +118,7 @@ int do_led(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
>  	return 0;
>  }
>  
> -#ifdef CONFIG_LED_BLINK
> +#if defined(CONFIG_LED_BLINK) || defined(CONFIG_LED_SW_BLINK)

This looks fine.

Acked-by: Alexander Dahl <ada at thorsis.com>

Greets
Alex

>  #define BLINK "|blink [blink-freq in ms]"
>  #else
>  #define BLINK ""
> -- 
> 2.39.2
> 


More information about the U-Boot mailing list