[PATCH 3/5] board: st: Update LED management for stm32mp2
    Patrice Chotard 
    patrice.chotard at foss.st.com
       
    Fri Oct 17 16:37:47 CEST 2025
    
    
  
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 at foss.st.com>
---
 board/st/stm32mp2/stm32mp2.c | 38 +-----------------------------------
 1 file changed, 1 insertion(+), 37 deletions(-)
diff --git a/board/st/stm32mp2/stm32mp2.c b/board/st/stm32mp2/stm32mp2.c
index a72056e12d6..7bc7d2a608f 100644
--- a/board/st/stm32mp2/stm32mp2.c
+++ b/board/st/stm32mp2/stm32mp2.c
@@ -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();
 }
-- 
2.43.0
    
    
More information about the U-Boot
mailing list