[PATCH] riscv: defconfig: enable GPIO LEDs and their triggers

Frédéric Mahé frederic.mahe at cirad.fr
Mon Nov 9 03:16:33 PST 2026


Many riscv boards describe gpio-leds in their device tree, 13 of them
with a heartbeat trigger, but defconfig does not enable the LED
subsystem, so these LEDs stay unused.

Enable LEDS_GPIO and the triggers used by in-tree riscv device trees
(heartbeat, disk-activity, default-on), as arm64 defconfig does.

Tested on a Banana Pi BPI-F3: sys-led blinks with the heartbeat trigger.

This patch was prepared with the help of an AI assistant (Claude),
which also ran the build and boot tests.

Signed-off-by: Frédéric Mahé <frederic.mahe at cirad.fr>
---
 arch/riscv/configs/defconfig | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 04ae305d5..670380a9f 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -245,6 +245,13 @@ CONFIG_MMC_SPI=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_DW_STARFIVE=y
 CONFIG_MMC_SUNXI=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_DISK=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_SUN6I=y
 CONFIG_DMADEVICES=y

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
-- 
2.47.3




More information about the linux-riscv mailing list