[PATCH 1/3] sunxi: spl: fix SPL_SUNXI_LED active low configuration
Andre Przywara
andre.przywara at arm.com
Wed Apr 8 00:34:45 CEST 2026
The newly introduced Allwinner SPL LED "framework" defined a
SPL_SUNXI_LED_STATUS_STATE Kconfig symbol, that was supposed to denote
the active-low vs. active-high polarity of the LED. However this is
a bool symbol, so it will simply vanish if not defined, and we cannot use
it directly inside a C statement.
Filter the symbol through the IS_ENABLED() macro, which will return 0 if
the symbol is not defined, which is the intended value here.
This fixes configuring LEDs with active-low polarity.
Signed-off-by: Andre Przywara <andre.przywara at arm.com>
---
board/sunxi/board.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index d7722d1858a..80dcae9c1a4 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -563,7 +563,7 @@ static void sunxi_spl_store_dram_size(phys_addr_t dram_size)
static void status_led_init(void)
{
#if CONFIG_IS_ENABLED(SUNXI_LED_STATUS)
- unsigned int state = CONFIG_SPL_SUNXI_LED_STATUS_STATE;
+ unsigned int state = IS_ENABLED(CONFIG_SPL_SUNXI_LED_STATUS_STATE);
unsigned int gpio = CONFIG_SPL_SUNXI_LED_STATUS_BIT;
gpio_request(gpio, "gpio_led");
--
2.46.4
More information about the U-Boot
mailing list