Skip to contentSkip to conversation

leds/build: allow tristate for leds-syscon

PATCH In review Bevan Weiss 1 participant 3 messages Mar 2 – Mar 4 LED

lore
Share & tools
lore
#0 lore raw

cover leds/build: allow tristate for leds-syscon

My first submission to a linux-kernel list, so apologies for any errors.

In OpenWrt one core kernel image is built for a particular subtarget, after which it's only modules that can be excluded from an rootfs image to reduce the space consumed. Unfortunately leds-syscon currently doesn't seem to allow for being compiled as a module where it could be excluded from an image. In my testing, it seemed relatively straight forward to enable this however.
I wouldn't anticipate issues for other systems, as they would still be able to request CONFIG_LEDS_SYSCON=y to get the current behaviour, identical to how they currently operate.

Bevan Weiss (1):
leds/build: allow tristate for leds-syscon

 drivers/leds/Kconfig       | 4 ++--
 drivers/leds/leds-syscon.c | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/1 leds/build: allow tristate for leds-syscon

Having leds-syscon as only bool (y/n) config poses issues with OpenWrt build system where all boards under a subtarget need to share the same config options. This results in kernel bloat for all boards when only a few actually need leds-syscon.
This change allows leds-syscon to be tristate (y/m/n), which means it can be built as a module for all boards, and then selectively packaged for their unique rootfs's

---
 drivers/leds/Kconfig       | 4 ++--
 drivers/leds/leds-syscon.c | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/leds/Kconfig +2 -2
index 597d7a79c988..ea3afc76a9c6 100644
@@ -903,8 +903,8 @@ config LEDS_POWERNV
 	  will be called leds-powernv.
 
 config LEDS_SYSCON
-	bool "LED support for LEDs on system controllers"
-	depends on LEDS_CLASS=y
+	tristate "LED support for LEDs on system controllers"
+	depends on LEDS_CLASS
 	depends on MFD_SYSCON
 	depends on OF
 	help
drivers/leds/leds-syscon.c +3 -0
index d633ad519d0c..13a9cdc13367 100644
@@ -135,3 +135,6 @@ static struct platform_driver syscon_led_driver = {
 	},
 };
 builtin_platform_driver(syscon_led_driver);
+
+MODULE_DESCRIPTION("SYSCON LED driver");
+MODULE_LICENSE("GPL");
Signature · 1 line
2.43.0
#2 lore raw
In reply to Bevan Weiss
Quoted 2 lines · On Mon, 2 Mar 2026 17:26:45 +1100 Bevan Weiss <[email protected]> wrote:

My first submission to a linux-kernel list, so apologies for any errors.

Sorry all, please ignore this patch.
I'll review, and send a V2 once I sort out some of the issues here.

Regards,
Bevan Weiss