]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
leds: Kconfig: leds-st1202: Add select for required LEDS_TRIGGER_PATTERN
authorManuel Fombuena <fombuena@outlook.com>
Wed, 26 Feb 2025 17:12:50 +0000 (17:12 +0000)
committerLee Jones <lee@kernel.org>
Thu, 13 Mar 2025 15:28:27 +0000 (15:28 +0000)
leds-st1202 requires the LED Pattern Trigger (LEDS_TRIGGER_PATTERN), which
is not selected when LED Trigger support is (LEDS_TRIGGERS).

To reproduce this:

- make menuconfig KCONFIG_CONFIG=
- select LEDS_ST1202 dependencies OF, I2C and LEDS_CLASS.
- select LEDS_ST1202
- LEDS_TRIGGERS is selected but LEDS_TRIGGER_PATTERN isn't.

The absence of LEDS_TRIGGER_PATTERN explicitly required can lead to builds
in which LEDS_ST1202 is selected while LEDS_TRIGGER_PATTERN isn't. The direct
result of that would be that /sys/class/leds/<led>/hw_pattern wouldn't be
available and there would be no way of interacting with the driver and
hardware from user space.

Add select LEDS_TRIGGER_PATTERN to Kconfig to meet the requirement and
indirectly document it as well.

Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Link: https://lore.kernel.org/r/CWLP123MB5473F4DF3A668F7DD057A280C5C22@CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/Kconfig

index 2b27d043921ce0e892ba2a8cf3c53cd2095b0e7e..8859e8fe292a9cd19dacb5ecef61fee9afa324e6 100644 (file)
@@ -971,6 +971,7 @@ config LEDS_ST1202
        depends on I2C
        depends on OF
        select LEDS_TRIGGERS
+       select LEDS_TRIGGER_PATTERN
        help
          Say Y to enable support for LEDs connected to LED1202
          LED driver chips accessed via the I2C bus.