]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: st: Update LED management for stm32mp2
authorPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 14 Nov 2025 16:23:37 +0000 (17:23 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 5 Dec 2025 10:39:41 +0000 (11:39 +0100)
Remove get_led() and setup_led() which became obsolete since
led_boot_on() introduction. led_boot_on() is automatically called
from board_r.c

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
board/st/stm32mp2/stm32mp2.c

index a72056e12d6306b9a5e93ef7367e06612a231586..7bc7d2a608fd845ddf7c947d65f0f8f08ad3789d 100644 (file)
@@ -58,41 +58,6 @@ int checkboard(void)
        return 0;
 }
 
-static int get_led(struct udevice **dev, char *led_string)
-{
-       const char *led_name;
-       int ret;
-
-       led_name = ofnode_conf_read_str(led_string);
-       if (!led_name) {
-               log_debug("could not find %s config string\n", led_string);
-               return -ENOENT;
-       }
-       ret = led_get_by_label(led_name, dev);
-       if (ret) {
-               log_debug("get=%d\n", ret);
-               return ret;
-       }
-
-       return 0;
-}
-
-static int setup_led(enum led_state_t cmd)
-{
-       struct udevice *dev;
-       int ret;
-
-       if (!CONFIG_IS_ENABLED(LED))
-               return 0;
-
-       ret = get_led(&dev, "u-boot,boot-led");
-       if (ret)
-               return ret;
-
-       ret = led_set_state(dev, cmd);
-       return ret;
-}
-
 static void check_user_button(void)
 {
        struct udevice *button;
@@ -118,7 +83,6 @@ static void check_user_button(void)
 /* board dependent setup after realloc */
 int board_init(void)
 {
-       setup_led(LEDST_ON);
        check_user_button();
 
        return 0;
@@ -222,5 +186,5 @@ int board_late_init(void)
 
 void board_quiesce_devices(void)
 {
-       setup_led(LEDST_OFF);
+       led_boot_off();
 }