diff mbox series

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

Message ID 20240814100830.1296313-1-mikhail.kshevetskiy@iopsys.eu
State Accepted
Delegated to: Tom Rini
Headers show
Series [RESEND,v2] cmd: led: fix led command usage for the LED_SW_BLINK enabled case | expand

Commit Message

Mikhail Kshevetskiy Aug. 14, 2024, 10:08 a.m. UTC
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.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Alexander Dahl <ada@thorsis.com>
---
Changes v2:
 * patch description added
---
 cmd/led.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Aug. 15, 2024, 8:33 p.m. UTC | #1
On Wed, 14 Aug 2024 14:08:30 +0400, Mikhail Kshevetskiy wrote:

> 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.
> 
> [...]

Applied to u-boot/next, thanks!
diff mbox series

Patch

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)
 #define BLINK "|blink [blink-freq in ms]"
 #else
 #define BLINK ""