]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
led: remove coloured_LED_init, yellow and blue status LEDs in legacy API
authorQuentin Schulz <quentin.schulz@cherry.de>
Wed, 19 Nov 2025 16:43:46 +0000 (17:43 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 5 Dec 2025 16:34:52 +0000 (10:34 -0600)
The last user of coloured_LED_init has been recently removed, so we can
remove all places it's called and defined as it does nothing now.

Nobody makes use of the yellow and blue status LEDs from the legacy API,
so let's remove all references to it.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
arch/arm/lib/crt0.S
cmd/legacy_led.c
common/board_f.c
doc/api/led.rst
drivers/led/Kconfig
drivers/misc/gpio_led.c
include/status_led.h

index 3e11fadafc6b5643caa1cedce8c3ed596de3e91e..9acaf2cddefe0ba2281c80eb41d9442f034f9989 100644 (file)
@@ -184,7 +184,6 @@ here:
 # endif
 
 #if ! defined(CONFIG_XPL_BUILD)
-       bl coloured_LED_init
        bl red_led_on
 #endif
        /* call board_init_r(gd_t *id, ulong dest_addr) */
index db312ae6e2dd8b02abb35e8579447f67feb5ca87..609a4b08e0a5b9825c3d0fa3fe10c83f1fa4e347 100644 (file)
@@ -48,15 +48,8 @@ static const led_tbl_t led_commands[] = {
 #ifdef CONFIG_LED_STATUS_GREEN
        { "green", CONFIG_LED_STATUS_GREEN, green_led_off, green_led_on, NULL },
 #endif
-#ifdef CONFIG_LED_STATUS_YELLOW
-       { "yellow", CONFIG_LED_STATUS_YELLOW, yellow_led_off, yellow_led_on,
-         NULL },
-#endif
 #ifdef CONFIG_LED_STATUS_RED
        { "red", CONFIG_LED_STATUS_RED, red_led_off, red_led_on, NULL },
-#endif
-#ifdef CONFIG_LED_STATUS_BLUE
-       { "blue", CONFIG_LED_STATUS_BLUE, blue_led_off, blue_led_on, NULL },
 #endif
        { NULL, 0, NULL, NULL, NULL }
 };
@@ -172,14 +165,8 @@ U_BOOT_CMD(
 #ifdef CONFIG_LED_STATUS_GREEN
        "green|"
 #endif
-#ifdef CONFIG_LED_STATUS_YELLOW
-       "yellow|"
-#endif
 #ifdef CONFIG_LED_STATUS_RED
        "red|"
-#endif
-#ifdef CONFIG_LED_STATUS_BLUE
-       "blue|"
 #endif
        "all] [on|off|toggle|blink] [blink-freq in ms]",
        "[led_name] [on|off|toggle|blink] sets or clears led(s)"
index c8a612d6070963ffd260a1186ea26db44986b079..224cc0ac561f78198a19b0c32b0bca7690f81382 100644 (file)
@@ -65,15 +65,10 @@ DECLARE_GLOBAL_DATA_PTR;
  ************************************************************************
  * May be supplied by boards if desired
  */
-__weak void coloured_LED_init(void) {}
 __weak void red_led_on(void) {}
 __weak void red_led_off(void) {}
 __weak void green_led_on(void) {}
 __weak void green_led_off(void) {}
-__weak void yellow_led_on(void) {}
-__weak void yellow_led_off(void) {}
-__weak void blue_led_on(void) {}
-__weak void blue_led_off(void) {}
 
 /*
  * Why is gd allocated a register? Prior to reloc it might be better to
index 2faf6693604fc20be8df6c4d6a66ca836b4a93f0..6488416c8b91661c5b28a5cc06560d30a4ab26f9 100644 (file)
@@ -59,7 +59,7 @@ 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, CONFIG_STATUS_LED_YELLOW and CONFIG_STATUS_LED_BLUE.
+CONFIG_STATUS_LED_GREEN.
 
 General LED functions
 ~~~~~~~~~~~~~~~~~~~~~
@@ -79,15 +79,10 @@ Colour LED's are at present only used by ARM.
 
 The functions names explain their purpose.
 
-- coloured_LED_init
 - red_LED_on
 - red_LED_off
 - green_LED_on
 - green_LED_off
-- yellow_LED_on
-- yellow_LED_off
-- blue_LED_on
-- blue_LED_off
 
 These are weakly defined in arch/arm/lib/board.c to noops. Where applicable, define
 these functions in the board specific source.
index 1cd3638cb164cf0e9fd4b1fa9c1868d4544e4079..1077792efb056de7b7e6e98f2e3a2c231dd03d42 100644 (file)
@@ -414,34 +414,6 @@ config LED_STATUS_RED
 
 endif # LED_STATUS_RED_ENABLE
 
-config LED_STATUS_YELLOW_ENABLE
-       bool "Enable yellow LED"
-       help
-         Enable yellow status LED.
-
-if LED_STATUS_YELLOW_ENABLE
-
-config LED_STATUS_YELLOW
-       int "Yellow LED identification"
-       help
-         Valid enabled LED device number.
-
-endif # LED_STATUS_YELLOW_ENABLE
-
-config LED_STATUS_BLUE_ENABLE
-       bool "Enable blue LED"
-       help
-         Enable blue status LED.
-
-if LED_STATUS_BLUE_ENABLE
-
-config LED_STATUS_BLUE
-       int "Blue LED identification"
-       help
-         Valid enabled LED device number.
-
-endif # LED_STATUS_BLUE_ENABLE
-
 config LED_STATUS_GREEN_ENABLE
        bool "Enable green LED"
        help
index e63689967a7ac0ee0f1bdc7e607bfb728ec11a67..e806b1f241f717c1ce0166813f463102e3b0271b 100644 (file)
@@ -79,28 +79,4 @@ void green_led_off(void)
 }
 #endif
 
-#ifdef CONFIG_LED_STATUS_YELLOW
-void yellow_led_on(void)
-{
-       __led_set(CONFIG_LED_STATUS_YELLOW, CONFIG_LED_STATUS_ON);
-}
-
-void yellow_led_off(void)
-{
-       __led_set(CONFIG_LED_STATUS_YELLOW, CONFIG_LED_STATUS_OFF);
-}
-#endif
-
-#ifdef CONFIG_LED_STATUS_BLUE
-void blue_led_on(void)
-{
-       __led_set(CONFIG_LED_STATUS_BLUE, CONFIG_LED_STATUS_ON);
-}
-
-void blue_led_off(void)
-{
-       __led_set(CONFIG_LED_STATUS_BLUE, CONFIG_LED_STATUS_OFF);
-}
-#endif
-
 #endif /* CONFIG_GPIO_LED_STUBS */
index 56d519f6d536030c9f61c4b5bd0b2e7bbb2c52c7..85e583f18c8b9bfbd026b0b20419f9ccd0d91117 100644 (file)
@@ -70,25 +70,15 @@ static inline void status_led_boot_blink(void) { }
  * Coloured LEDs API
  */
 #ifndef        __ASSEMBLY__
-void coloured_LED_init(void);
 void red_led_on(void);
 void red_led_off(void);
 void green_led_on(void);
 void green_led_off(void);
-void yellow_led_on(void);
-void yellow_led_off(void);
-void blue_led_on(void);
-void blue_led_off(void);
 #else
-       .extern LED_init
        .extern red_led_on
        .extern red_led_off
-       .extern yellow_led_on
-       .extern yellow_led_off
        .extern green_led_on
        .extern green_led_off
-       .extern blue_led_on
-       .extern blue_led_off
 #endif
 
 #endif /* _STATUS_LED_H_       */