summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-12-03 11:04:32 -0600
committerTom Rini <[email protected]>2025-12-03 12:18:16 -0600
commitd300702c5be5a846032834abe4f01dcd3f50b3a8 (patch)
treeae5eeffc4919a8ddeb8fe56974c632d2205547d5 /cmd
parentdca19206acf2af2d339087bb62aa0b8ee1b0e326 (diff)
parenteb02d87c7579f83f6fe153c80d420e5f53bde4c1 (diff)
Merge patch series "led: remove u-boot,boot-led and u-boot,error-led + add cmd doc"
Quentin Schulz <[email protected]> says: u-boot,boot-led and u-boot,error-led aren't actually handled by some generic code but rather by board or architecture specific code. They also aren't properties that are part of the official dt-binding so they cannot be upstreamed. For u-boot,boot-led, there's actually a proper replacement which is /options/u-boot/boot-led[1] (+ CONFIG_LED_BOOT=y). For Rockchip boards, either nothing (for RK3066, PX30 and RK3399) was using that property or (for RK3188) the code handling it was guarded by symbols that were not enabled in the defconfig. For those, the property and guarded code are removed. For the Sam9x60 Curiosity, it seems that even though the LED is controlled whenever CONFIG_LED is enabled, it isn't enabled by default in the defconfig (but the code was added without modifying the defconfig, explicitly leaving a choice to the user). I decided to keep that feature by simply migrating it to the new API, though I cannot test it as I do not own the device. The STM32 boards will be migrated in the near future once their upstream (kernel) Device Trees gain the new way to specify this (via /options/u-boot/boot-led). I'll let Patrice handle this, see https://lore.kernel.org/u-boot/[email protected]/ and https://lore.kernel.org/u-boot/[email protected]/ After this, only one user of u-boot,boot-led will be left, based on STM32: board/dhelectronics/dh_stm32mp1/board.c. @Patrice, maybe that's something you want to have a look at as well, this seems to be some evaluation kit? The only users of u-boot,error-led are STM32 boards, so I'll leave this to Patrice as well, I do not know what's the way to go for that one. In any case, I would like to not encourage people to use out-of-spec DT properties when there is another option (u-boot,boot-led), so I remove the properties from the dt-binding document from U-Boot. The help text for the blink subcommand of the led command was misleading so this is now fixed. This also moves the content of doc/README.LED into the doc/api/led.rst, while clearly stating one shouldn't be using this anymore. This also gets rid of dt-binding that we already have in dts/upstream. Finally, this adds documentation for the led shell command. [1] https://github.com/devicetree-org/dt-schema/blob/v2025.08/dtschema/schemas/options/u-boot.yaml#L113-L116 Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'cmd')
-rw-r--r--cmd/led.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/cmd/led.c b/cmd/led.c
index 91fb856ee59..296c07b3b38 100644
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -118,16 +118,13 @@ int do_led(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-#if defined(CONFIG_LED_BLINK) || defined(CONFIG_LED_SW_BLINK)
-#define BLINK "|blink [blink-freq in ms]"
-#else
-#define BLINK ""
-#endif
-
U_BOOT_CMD(
led, 4, 1, do_led,
"manage LEDs",
- "<led_label> on|off|toggle" BLINK "\tChange LED state\n"
+ "<led_label> on|off|toggle\tChange LED state\n"
+#if defined(CONFIG_LED_BLINK) || defined(CONFIG_LED_SW_BLINK)
+ "led <led_label> blink <blink-freq in ms>\tBlink LED (duty cycle 50%)\n"
+#endif
"led <led_label>\tGet LED state\n"
"led list\t\tshow a list of LEDs"
);