diff mbox series

[4/5] leds: Kconfig: leds-st1202: add select for required LEDS_TRIGGER_PATTERN

Message ID CWLP123MB547378EEEC657A79F109800FC51B2@CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM
State New
Headers show
Series [1/5] leds: leds-st1202: fix NULL pointer access on race condition | expand

Commit Message

Manuel Fombuena Jan. 17, 2025, 11:40 p.m. UTC
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.

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>
---
 drivers/leds/Kconfig | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 6efd514bfb48..b585548c51cb 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -960,6 +960,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.