leds/build: allow tristate for leds-syscon
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
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
@@ -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
@@ -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
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