[PATCH v3 00/25] led: Remove old status-LED code

There has been an LED framework in U-Boot which uses driver model for about 9 years now. Recent work is underway to improve it and provide more features. It is probably a good time to drop the old code, which is only used by 5 boards:
./tools/qconfig.py -f LED_STATUS 5 matches eb_cpu5282 eb_cpu5282_internal mx23_olinuxino pinephone socfpga_vining_fpga
This series attempts that.
The new /options node provides a way to provide U-Boot settings, and LEDs are implemented there. For now I have brought into the options schema from upstream. We can update it once the LED additions land there.
Changes in v3: - Update commit message - Combine removal and enable patches - Combine removal and enable patches - Combine removal and enable patches
Changes in v2: - Combine code-removal and defconfig changes - Add a patch to enable LED and LED_BOOT for these boards - Enable LED on the 5 affected platforms - Reorder patches for bisectability - Add dt-schema bindings for LED
Simon Glass (25): eb_cpu5282: Drop status-LED code and enable LED vining_fpga: Drop status-LED code and use LED mx23_olinuxino: Drop status-LED code and use LED pinephone: Drop status-LED code and use LED led: Drop LED_STATUS_BOARD_SPECIFIC arm: Drop old LED support common: doc: Drop old LED support st: stm32f429: Drop old LED code led: Make the LED config common led: Drop LED_STATUS from Kconfig led: Drop the legacy LED command misc: Drop gpio_led driver pca9551_led: Delete driver misc: status_led: Delete driver m68k: Drop unused status_led.h header file powerpc: Drop status-LED code igep00x0: Drop unused status_led.h header file sunxi: Drop status-LED code common: Drop status-LED code in board_r image: Drop unused status_led.h header file ide: Drop unused status_led.h header file mpc83xx: Drop status-LED code net: Drop status-LED code led: Drop status_led header file doc: Add devicetree bindings for options
arch/arm/lib/crt0.S | 4 - arch/m68k/lib/bootm.c | 3 - arch/powerpc/lib/interrupts.c | 6 - board/BuS/eb_cpu5282/eb_cpu5282.c | 20 -- board/isee/igep00x0/igep00x0.c | 1 - board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 - board/softing/vining_fpga/socfpga.c | 4 - board/st/stm32f429-discovery/Makefile | 1 - board/st/stm32f429-discovery/led.c | 39 --- board/sunxi/board.c | 6 - boot/image.c | 4 - cmd/Makefile | 1 - cmd/ide.c | 4 - cmd/legacy_led.c | 185 ---------- common/board_f.c | 22 -- common/board_r.c | 27 -- configs/eb_cpu5282_defconfig | 8 +- configs/eb_cpu5282_internal_defconfig | 8 +- configs/mx23_olinuxino_defconfig | 10 +- configs/pinephone_defconfig | 7 +- configs/socfpga_vining_fpga_defconfig | 13 +- doc/README.LED | 77 ----- doc/device-tree-bindings/options.yaml | 79 +++++ doc/device-tree-bindings/options/u-boot.yaml | 136 ++++++++ drivers/led/Kconfig | 342 +------------------ drivers/misc/Kconfig | 13 - drivers/misc/Makefile | 3 - drivers/misc/gpio_led.c | 106 ------ drivers/misc/pca9551_led.c | 170 --------- drivers/misc/status_led.c | 124 ------- drivers/timer/mpc83xx_timer.c | 5 - include/configs/eb_cpu5282.h | 6 - include/status_led.h | 115 ------- net/bootp.c | 7 - net/net.c | 33 -- 35 files changed, 236 insertions(+), 1360 deletions(-) delete mode 100644 board/st/stm32f429-discovery/led.c delete mode 100644 cmd/legacy_led.c delete mode 100644 doc/README.LED create mode 100644 doc/device-tree-bindings/options.yaml create mode 100644 doc/device-tree-bindings/options/u-boot.yaml delete mode 100644 drivers/misc/gpio_led.c delete mode 100644 drivers/misc/pca9551_led.c delete mode 100644 drivers/misc/status_led.c delete mode 100644 include/status_led.h

Drop this old code. Swtich the LED options to use the new approach, in the same commit, to maintain build-bisectability.
Both eb_cpu5282 and eb_cpu5282_internal are done together, since they share code.
Signed-off-by: Simon Glass sjg@chromium.org ---
Changes in v3: - Update commit message
Changes in v2: - Combine code-removal and defconfig changes
board/BuS/eb_cpu5282/eb_cpu5282.c | 20 -------------------- configs/eb_cpu5282_defconfig | 8 ++------ configs/eb_cpu5282_internal_defconfig | 8 ++------ include/configs/eb_cpu5282.h | 6 ------ 4 files changed, 4 insertions(+), 38 deletions(-)
diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c index c254da62bf4..cdd862c57d2 100644 --- a/board/BuS/eb_cpu5282/eb_cpu5282.c +++ b/board/BuS/eb_cpu5282/eb_cpu5282.c @@ -14,7 +14,6 @@ #include <bmp_layout.h> #include <env.h> #include <init.h> -#include <status_led.h> #include <bus_vcxk.h>
/*---------------------------------------------------------------------------*/ @@ -160,25 +159,6 @@ int misc_init_r(void) return 1; }
-void __led_toggle(led_id_t mask) -{ - MCFGPTA_GPTPORT ^= (1 << 3); -} - -void __led_init(led_id_t mask, int state) -{ - __led_set(mask, state); - MCFGPTA_GPTDDR |= (1 << 3); -} - -void __led_set(led_id_t mask, int state) -{ - if (state == CONFIG_LED_STATUS_ON) - MCFGPTA_GPTPORT |= (1 << 3); - else - MCFGPTA_GPTPORT &= ~(1 << 3); -} - /*---------------------------------------------------------------------------*/
/* EOF EB+MCF-EV123.c */ diff --git a/configs/eb_cpu5282_defconfig b/configs/eb_cpu5282_defconfig index 271dbdf4dbb..c51a5db262e 100644 --- a/configs/eb_cpu5282_defconfig +++ b/configs/eb_cpu5282_defconfig @@ -35,12 +35,8 @@ CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y CONFIG_SYS_RX_ETH_BUFFER=8 CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_LED_STATUS=y -CONFIG_LED_STATUS0=y -CONFIG_LED_STATUS_BIT=8 -CONFIG_LED_STATUS_BOOT_ENABLE=y -CONFIG_LED_STATUS_BOOT=0 -CONFIG_LED_STATUS_CMD=y +CONFIG_LED=y +CONFIG_LED_BOOT=y CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y diff --git a/configs/eb_cpu5282_internal_defconfig b/configs/eb_cpu5282_internal_defconfig index 89a7925dffa..3627d25b990 100644 --- a/configs/eb_cpu5282_internal_defconfig +++ b/configs/eb_cpu5282_internal_defconfig @@ -33,12 +33,8 @@ CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y CONFIG_SYS_RX_ETH_BUFFER=8 CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_LED_STATUS=y -CONFIG_LED_STATUS0=y -CONFIG_LED_STATUS_BIT=8 -CONFIG_LED_STATUS_BOOT_ENABLE=y -CONFIG_LED_STATUS_BOOT=0 -CONFIG_LED_STATUS_CMD=y +CONFIG_LED=y +CONFIG_LED_BOOT=y CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h index 26e4ade34ee..a4d1338c8fa 100644 --- a/include/configs/eb_cpu5282.h +++ b/include/configs/eb_cpu5282.h @@ -14,12 +14,6 @@
#define CFG_SYS_UART_PORT (0)
-/*----------------------------------------------------------------------* - * Options * - *----------------------------------------------------------------------*/ - -#define STATUS_LED_ACTIVE 0 - /*----------------------------------------------------------------------* * Configuration for environment * * Environment is in the second sector of the first 256k of flash *

This is not used anymore, so drop it.
Enable LED and LED_BOOT instead, since this is the new way to access the LED functionality.
Signed-off-by: Simon Glass sjg@chromium.org ---
Changes in v3: - Combine removal and enable patches
board/softing/vining_fpga/socfpga.c | 4 ---- configs/socfpga_vining_fpga_defconfig | 13 ++----------- 2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/board/softing/vining_fpga/socfpga.c b/board/softing/vining_fpga/socfpga.c index ec2c7ea3631..700184cc575 100644 --- a/board/softing/vining_fpga/socfpga.c +++ b/board/softing/vining_fpga/socfpga.c @@ -8,7 +8,6 @@ #include <env.h> #include <init.h> #include <net.h> -#include <status_led.h> #include <asm/arch/reset_manager.h> #include <asm/global_data.h> #include <asm/io.h> @@ -26,9 +25,6 @@ int board_late_init(void) const unsigned int usb_nrst_gpio = 35; int ret;
- status_led_set(1, CONFIG_LED_STATUS_ON); - status_led_set(2, CONFIG_LED_STATUS_ON); - /* Address of boot parameters for ATAG (if ATAG is used) */ gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100;
diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig index 094e9186fca..94018752b40 100644 --- a/configs/socfpga_vining_fpga_defconfig +++ b/configs/socfpga_vining_fpga_defconfig @@ -77,17 +77,8 @@ CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1000000 CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_DW=y -CONFIG_LED_STATUS=y -CONFIG_LED_STATUS_GPIO=y -CONFIG_LED_STATUS0=y -CONFIG_LED_STATUS_BIT=48 -CONFIG_LED_STATUS1=y -CONFIG_LED_STATUS_BIT1=53 -CONFIG_LED_STATUS2=y -CONFIG_LED_STATUS_BIT2=54 -CONFIG_LED_STATUS3=y -CONFIG_LED_STATUS_BIT3=65 -CONFIG_LED_STATUS_CMD=y +CONFIG_LED=y +CONFIG_LED_BOOT=y CONFIG_MISC=y CONFIG_I2C_EEPROM=y CONFIG_SYS_I2C_EEPROM_ADDR=0x50

Enable LED and LED_BOOT instead, since this is the new way to access the LED functionality.
Signed-off-by: Simon Glass sjg@chromium.org ---
Changes in v3: - Combine removal and enable patches
board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 ------- configs/mx23_olinuxino_defconfig | 10 ++-------- 2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index b2bb6678c23..78136c1620a 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -13,9 +13,6 @@ #include <asm/arch/imx-regs.h> #include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> -#ifdef CONFIG_LED_STATUS -#include <status_led.h> -#endif #include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR; @@ -61,9 +58,5 @@ int board_init(void) /* Adress of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
-#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE) - status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_STATE); -#endif - return 0; } diff --git a/configs/mx23_olinuxino_defconfig b/configs/mx23_olinuxino_defconfig index 3016f750e64..c1319077891 100644 --- a/configs/mx23_olinuxino_defconfig +++ b/configs/mx23_olinuxino_defconfig @@ -39,14 +39,8 @@ CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" CONFIG_VERSION_VARIABLE=y CONFIG_MXS_GPIO=y -CONFIG_LED_STATUS=y -CONFIG_LED_STATUS_GPIO=y -CONFIG_LED_STATUS0=y -CONFIG_LED_STATUS_BIT=778 -CONFIG_LED_STATUS_STATE=2 -CONFIG_LED_STATUS_BOOT_ENABLE=y -CONFIG_LED_STATUS_BOOT=0 -CONFIG_LED_STATUS_CMD=y +CONFIG_LED=y +CONFIG_LED_BOOT=y CONFIG_MMC_MXS=y CONFIG_CONS_INDEX=0 CONFIG_DM_SERIAL=y

On Sat, 2 Nov 2024 at 16:20, Simon Glass sjg@chromium.org wrote:
Enable LED and LED_BOOT instead, since this is the new way to access the LED functionality.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v3:
- Combine removal and enable patches
board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 ------- configs/mx23_olinuxino_defconfig | 10 ++-------- 2 files changed, 2 insertions(+), 15 deletions(-)
Applied to ci/master, thanks!

Drop the STATUS_LED options and enable LED and LED_BOOT instead, since this is the new way to access the LED functionality.
Signed-off-by: Simon Glass sjg@chromium.org ---
Changes in v3: - Combine removal and enable patches
Changes in v2: - Add a patch to enable LED and LED_BOOT for these boards
configs/pinephone_defconfig | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/configs/pinephone_defconfig b/configs/pinephone_defconfig index 9d39204a439..272fce1c1a4 100644 --- a/configs/pinephone_defconfig +++ b/configs/pinephone_defconfig @@ -11,8 +11,5 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_PINEPHONE_DT_SELECTION=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_OF_LIST="sun50i-a64-pinephone-1.1 sun50i-a64-pinephone-1.2" -CONFIG_LED_STATUS=y -CONFIG_LED_STATUS_GPIO=y -CONFIG_LED_STATUS0=y -CONFIG_LED_STATUS_BIT=114 -CONFIG_LED_STATUS_STATE=2 +CONFIG_LED=y +CONFIG_LED_BOOT=y

This is not used by any board and there is a driver model version of LEDs. Drop it.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
cmd/legacy_led.c | 40 ---------------------------------------- drivers/led/Kconfig | 6 ------ include/status_led.h | 13 +------------ 3 files changed, 1 insertion(+), 58 deletions(-)
diff --git a/cmd/legacy_led.c b/cmd/legacy_led.c index 50de7e89d8f..ef2135e0dba 100644 --- a/cmd/legacy_led.c +++ b/cmd/legacy_led.c @@ -24,26 +24,6 @@ struct led_tbl_s { typedef struct led_tbl_s led_tbl_t;
static const led_tbl_t led_commands[] = { -#ifdef CONFIG_LED_STATUS_BOARD_SPECIFIC -#ifdef CONFIG_LED_STATUS0 - { "0", CONFIG_LED_STATUS_BIT, NULL, NULL, NULL }, -#endif -#ifdef CONFIG_LED_STATUS1 - { "1", CONFIG_LED_STATUS_BIT1, NULL, NULL, NULL }, -#endif -#ifdef CONFIG_LED_STATUS2 - { "2", CONFIG_LED_STATUS_BIT2, NULL, NULL, NULL }, -#endif -#ifdef CONFIG_LED_STATUS3 - { "3", CONFIG_LED_STATUS_BIT3, NULL, NULL, NULL }, -#endif -#ifdef CONFIG_LED_STATUS4 - { "4", CONFIG_LED_STATUS_BIT4, NULL, NULL, NULL }, -#endif -#ifdef CONFIG_LED_STATUS5 - { "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 @@ -148,26 +128,6 @@ int do_legacy_led(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) U_BOOT_CMD( led, 4, 1, do_legacy_led, "[" -#ifdef CONFIG_LED_STATUS_BOARD_SPECIFIC -#ifdef CONFIG_LED_STATUS0 - "0|" -#endif -#ifdef CONFIG_LED_STATUS1 - "1|" -#endif -#ifdef CONFIG_LED_STATUS2 - "2|" -#endif -#ifdef CONFIG_LED_STATUS3 - "3|" -#endif -#ifdef CONFIG_LED_STATUS4 - "4|" -#endif -#ifdef CONFIG_LED_STATUS5 - "5|" -#endif -#endif #ifdef CONFIG_LED_STATUS_GREEN "green|" #endif diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig index c98cbf92fab..268118a6c3a 100644 --- a/drivers/led/Kconfig +++ b/drivers/led/Kconfig @@ -166,12 +166,6 @@ config LED_STATUS_GPIO The status LED can be connected to a GPIO pin. In such cases, the gpio_led driver can be used as a status LED backend implementation.
-config LED_STATUS_BOARD_SPECIFIC - bool "Specific board" - default y - help - LED support is only for a specific board. - comment "LEDs parameters"
config LED_STATUS0 diff --git a/include/status_led.h b/include/status_led.h index 1282022253e..59cf9f89956 100644 --- a/include/status_led.h +++ b/include/status_led.h @@ -61,23 +61,12 @@ static inline void status_led_boot_blink(void) * ADVICE: Define in your board configuration file rather than * filling this file up with lots of custom board stuff. */ - -#elif defined(CONFIG_LED_STATUS_BOARD_SPECIFIC) -/* led_id_t is unsigned long mask */ -typedef unsigned long led_id_t; - -extern void __led_toggle (led_id_t mask); -extern void __led_init (led_id_t mask, int state); -extern void __led_set (led_id_t mask, int state); -void __led_blink(led_id_t mask, int freq); #else # error Status LED configuration missing #endif /************************************************************************/
-#ifndef CONFIG_LED_STATUS_BOARD_SPECIFIC -# include <asm/status_led.h> -#endif +#include <asm/status_led.h>
#else

This has been replaced with a new LED framework, so drop this old code.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
arch/arm/lib/crt0.S | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S index 3e4906e273d..a691d844847 100644 --- a/arch/arm/lib/crt0.S +++ b/arch/arm/lib/crt0.S @@ -185,10 +185,6 @@ here: movne r9, r0 # 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) */ mov r0, r9 /* gd_t */ ldr r1, [r9, #GD_RELOCADDR] /* dest_addr */

This has been replaced with a new LED framework, so drop this old code and documentation.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
common/board_f.c | 22 -------------- doc/README.LED | 77 ------------------------------------------------ 2 files changed, 99 deletions(-) delete mode 100644 doc/README.LED
diff --git a/common/board_f.c b/common/board_f.c index 98dc2591e1d..b110a15278b 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -36,7 +36,6 @@ #include <relocate.h> #include <serial.h> #include <spl.h> -#include <status_led.h> #include <sysreset.h> #include <timer.h> #include <trace.h> @@ -53,27 +52,6 @@
DECLARE_GLOBAL_DATA_PTR;
-/* - * TODO(sjg@chromium.org): IMO this code should be - * refactored to a single function, something like: - * - * void led_set_state(enum led_colour_t colour, int on); - */ -/************************************************************************ - * Coloured LED functionality - ************************************************************************ - * 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 * just pass it around to each function in this file? diff --git a/doc/README.LED b/doc/README.LED deleted file mode 100644 index c21c9d53ec3..00000000000 --- a/doc/README.LED +++ /dev/null @@ -1,77 +0,0 @@ -Status LED -======================================== - -This README describes the status LED API. - -The API is defined by the include file include/status_led.h - -The first step is to enable CONFIG_LED_STATUS in menuconfig: -> Device Drivers > LED Support. - -If the LED support is only for specific board, enable -CONFIG_LED_STATUS_BOARD_SPECIFIC in the menuconfig. - -Status LEDS 0 to 5 are enabled by the following configurations at menuconfig: -CONFIG_STATUS_LED0, CONFIG_STATUS_LED1, ... CONFIG_STATUS_LED5 - -The following should be configured for each of the enabled LEDs: -CONFIG_STATUS_LED_BIT<n> -CONFIG_STATUS_LED_STATE<n> -CONFIG_STATUS_LED_FREQ<n> -Where <n> is an integer 1 through 5 (empty for 0). - -CONFIG_STATUS_LED_BIT is passed into the __led_* functions to identify which LED -is being acted on. As such, the value choose must be unique with with respect to -the other CONFIG_STATUS_LED_BIT's. Mapping the value to a physical LED is the -reponsiblity of the __led_* function. - -CONFIG_STATUS_LED_STATE is the initial state of the LED. It should be set to one -of these values: CONFIG_LED_STATUS_OFF or CONFIG_LED_STATUS_ON. - -CONFIG_STATUS_LED_FREQ determines the LED blink frequency. -Values range from 2 to 10. - -Some other LED macros ---------------------- - -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, CONFIG_STATUS_LED_YELLOW and CONFIG_STATUS_LED_BLUE. - -General LED functions ---------------------- -The following functions should be defined: - -__led_init is called once to initialize the LED to CONFIG_STATUS_LED_STATE. -One time start up code should be placed here. - -__led_set is called to change the state of the LED. - -__led_toggle is called to toggle the current state of the LED. - -Colour LED -======================================== - -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. - -TBD : Describe older board dependent macros similar to what is done for - -TBD : Describe general support via asm/status_led.h

On Sat, 2 Nov 2024 at 16:21, Simon Glass sjg@chromium.org wrote:
This has been replaced with a new LED framework, so drop this old code and documentation.
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
common/board_f.c | 22 -------------- doc/README.LED | 77 ------------------------------------------------ 2 files changed, 99 deletions(-) delete mode 100644 doc/README.LED
Applied to ci/master, thanks!

This predates the LED framework, so drop it.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
board/st/stm32f429-discovery/Makefile | 1 - board/st/stm32f429-discovery/led.c | 39 --------------------------- 2 files changed, 40 deletions(-) delete mode 100644 board/st/stm32f429-discovery/led.c
diff --git a/board/st/stm32f429-discovery/Makefile b/board/st/stm32f429-discovery/Makefile index 6b02c0fddec..233eafdad3d 100644 --- a/board/st/stm32f429-discovery/Makefile +++ b/board/st/stm32f429-discovery/Makefile @@ -7,4 +7,3 @@ # Kamil Lulko, kamil.lulko@gmail.com
obj-y := stm32f429-discovery.o -obj-y += led.o diff --git a/board/st/stm32f429-discovery/led.c b/board/st/stm32f429-discovery/led.c deleted file mode 100644 index 4b8038341b9..00000000000 --- a/board/st/stm32f429-discovery/led.c +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2015 - * Kamil Lulko, kamil.lulko@gmail.com - */ - -#include <status_led.h> -#include <asm-generic/gpio.h> - -#define RED_LED 110 -#define GREEN_LED 109 - -void coloured_LED_init(void) -{ - gpio_request(RED_LED, "red led"); - gpio_direction_output(RED_LED, 0); - gpio_request(GREEN_LED, "green led"); - gpio_direction_output(GREEN_LED, 0); -} - -void red_led_off(void) -{ - gpio_set_value(RED_LED, 0); -} - -void green_led_off(void) -{ - gpio_set_value(GREEN_LED, 0); -} - -void red_led_on(void) -{ - gpio_set_value(RED_LED, 1); -} - -void green_led_on(void) -{ - gpio_set_value(GREEN_LED, 1); -}

Hi,
On 11/2/24 23:17, Simon Glass wrote:
This predates the LED framework, so drop it.
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
board/st/stm32f429-discovery/Makefile | 1 - board/st/stm32f429-discovery/led.c | 39 --------------------------- 2 files changed, 40 deletions(-) delete mode 100644 board/st/stm32f429-discovery/led.c
Thanks
for information LEDs are also defined in device tree: arch/arm/dts/stm32f429-disco.dts
leds { compatible = "gpio-leds"; led-red { gpios = <&gpiog 14 0>; }; led-green { gpios = <&gpiog 13 0>; linux,default-trigger = "heartbeat"; }; };
but today the CONFIG_LED_GPIO=y is missing in configs/stm32f429-discovery_defconfig
to restore the LED support on this board
Reviewed-by: Patrick Delaunay patrick.delaunay@foss.st.com
Thanks Patrick

On Tue, 12 Nov 2024 at 04:20, Patrick DELAUNAY patrick.delaunay@foss.st.com wrote:
Hi,
On 11/2/24 23:17, Simon Glass wrote:
This predates the LED framework, so drop it.
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
board/st/stm32f429-discovery/Makefile | 1 - board/st/stm32f429-discovery/led.c | 39 --------------------------- 2 files changed, 40 deletions(-) delete mode 100644 board/st/stm32f429-discovery/led.c
Thanks
for information LEDs are also defined in device tree: arch/arm/dts/stm32f429-disco.dts
leds { compatible = "gpio-leds"; led-red { gpios = <&gpiog 14 0>; }; led-green { gpios = <&gpiog 13 0>; linux,default-trigger = "heartbeat"; }; };
but today the CONFIG_LED_GPIO=y is missing in configs/stm32f429-discovery_defconfig
to restore the LED support on this board
Reviewed-by: Patrick Delaunay patrick.delaunay@foss.st.com
Applied to ci/master, thanks!
participants (2)
-
Patrick DELAUNAY
-
Simon Glass