[PATCH 2/4] led: remove support for green status led in legacy API
Quentin Schulz
foss+uboot at 0leil.net
Wed Nov 19 18:01:13 CET 2025
From: Quentin Schulz <quentin.schulz at cherry.de>
The last user of it was removed in a previous commit so let's remove its
support entirely.
Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
---
cmd/legacy_led.c | 6 ------
common/board_f.c | 2 --
doc/api/led.rst | 5 +----
drivers/led/Kconfig | 14 --------------
drivers/misc/gpio_led.c | 12 ------------
include/status_led.h | 4 ----
6 files changed, 1 insertion(+), 42 deletions(-)
diff --git a/cmd/legacy_led.c b/cmd/legacy_led.c
index 609a4b08e0a..2c6d606f48b 100644
--- a/cmd/legacy_led.c
+++ b/cmd/legacy_led.c
@@ -45,9 +45,6 @@ static const led_tbl_t led_commands[] = {
{ "5", CONFIG_LED_STATUS_BIT5, NULL, NULL, NULL },
#endif
#endif
-#ifdef CONFIG_LED_STATUS_GREEN
- { "green", CONFIG_LED_STATUS_GREEN, green_led_off, green_led_on, NULL },
-#endif
#ifdef CONFIG_LED_STATUS_RED
{ "red", CONFIG_LED_STATUS_RED, red_led_off, red_led_on, NULL },
#endif
@@ -162,9 +159,6 @@ U_BOOT_CMD(
"5|"
#endif
#endif
-#ifdef CONFIG_LED_STATUS_GREEN
- "green|"
-#endif
#ifdef CONFIG_LED_STATUS_RED
"red|"
#endif
diff --git a/common/board_f.c b/common/board_f.c
index 224cc0ac561..74571cb6d91 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -67,8 +67,6 @@ DECLARE_GLOBAL_DATA_PTR;
*/
__weak void red_led_on(void) {}
__weak void red_led_off(void) {}
-__weak void green_led_on(void) {}
-__weak void green_led_off(void) {}
/*
* Why is gd allocated a register? Prior to reloc it might be better to
diff --git a/doc/api/led.rst b/doc/api/led.rst
index c7fe56f3d89..e9705eb69a5 100644
--- a/doc/api/led.rst
+++ b/doc/api/led.rst
@@ -58,8 +58,7 @@ CONFIG_STATUS_LED_BOOT is the LED to light when the board is booting.
This must be a valid LED number (0-5).
CONFIG_STATUS_LED_RED is the red LED. It is used to signal errors. This must be
-a valid LED number (0-5). Other similar color LED's macros are
-CONFIG_STATUS_LED_GREEN.
+a valid LED number (0-5).
General LED functions
~~~~~~~~~~~~~~~~~~~~~
@@ -81,8 +80,6 @@ The functions names explain their purpose.
- red_LED_on
- red_LED_off
-- green_LED_on
-- green_LED_off
These are weakly defined in arch/arm/lib/board.c to noops. Where applicable, define
these functions in the board specific source.
diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig
index 1077792efb0..6b043f9a522 100644
--- a/drivers/led/Kconfig
+++ b/drivers/led/Kconfig
@@ -414,20 +414,6 @@ config LED_STATUS_RED
endif # LED_STATUS_RED_ENABLE
-config LED_STATUS_GREEN_ENABLE
- bool "Enable green LED"
- help
- Enable green status LED.
-
-if LED_STATUS_GREEN_ENABLE
-
-config LED_STATUS_GREEN
- int "Green LED identification"
- help
- Valid enabled LED device number (0-5).
-
-endif # LED_STATUS_GREEN_ENABLE
-
config LED_STATUS_CMD
bool "Enable status LED commands"
diff --git a/drivers/misc/gpio_led.c b/drivers/misc/gpio_led.c
index e806b1f241f..a1432a53440 100644
--- a/drivers/misc/gpio_led.c
+++ b/drivers/misc/gpio_led.c
@@ -67,16 +67,4 @@ void red_led_off(void)
}
#endif
-#ifdef CONFIG_LED_STATUS_GREEN
-void green_led_on(void)
-{
- __led_set(CONFIG_LED_STATUS_GREEN, CONFIG_LED_STATUS_ON);
-}
-
-void green_led_off(void)
-{
- __led_set(CONFIG_LED_STATUS_GREEN, CONFIG_LED_STATUS_OFF);
-}
-#endif
-
#endif /* CONFIG_GPIO_LED_STUBS */
diff --git a/include/status_led.h b/include/status_led.h
index 85e583f18c8..8e8b19f8c19 100644
--- a/include/status_led.h
+++ b/include/status_led.h
@@ -72,13 +72,9 @@ static inline void status_led_boot_blink(void) { }
#ifndef __ASSEMBLY__
void red_led_on(void);
void red_led_off(void);
-void green_led_on(void);
-void green_led_off(void);
#else
.extern red_led_on
.extern red_led_off
- .extern green_led_on
- .extern green_led_off
#endif
#endif /* _STATUS_LED_H_ */
--
2.51.1
More information about the U-Boot
mailing list