diff options
author | Jean-Jacques Hiblot <jjhiblot@traphandler.com> | 2023-07-28 18:37:31 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-08-17 11:01:00 +0300 |
commit | 37d0849ed3927f7c4be6f5ee030730f9aa7439c0 (patch) | |
tree | df4c3f3e529d65d804f7b9c7c6db186747da74ff /drivers/leds/rgb/Kconfig | |
parent | 099c52d9448c1ca832b4695e982221a521282b94 (diff) | |
download | linux-37d0849ed3927f7c4be6f5ee030730f9aa7439c0.tar.xz |
leds: rgb: Add a multicolor LED driver to group monochromatic LEDs
Grouping multiple monochrome LEDs into a multicolor LED device has a few
benefits over handling the group in user-space:
- The state of the LEDs relative to each other is consistent. In other
words, if 2 threads competes to set the LED to green and red, the
end-result cannot be black or yellow.
- The multicolor LED as a whole can be driven through the sysfs LED
interface.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
Reviewed-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230728153731.3742339-5-jjhiblot@traphandler.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds/rgb/Kconfig')
-rw-r--r-- | drivers/leds/rgb/Kconfig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/leds/rgb/Kconfig b/drivers/leds/rgb/Kconfig index 360c8679c6e2..183bccc06cf3 100644 --- a/drivers/leds/rgb/Kconfig +++ b/drivers/leds/rgb/Kconfig @@ -2,6 +2,18 @@ if LEDS_CLASS_MULTICOLOR +config LEDS_GROUP_MULTICOLOR + tristate "LEDs group multi-color support" + depends on OF || COMPILE_TEST + help + This option enables support for monochrome LEDs that are grouped + into multicolor LEDs which is useful in the case where LEDs of + different colors are physically grouped in a single multi-color LED + and driven by a controller that doesn't have multi-color support. + + To compile this driver as a module, choose M here: the module + will be called leds-group-multicolor. + config LEDS_PWM_MULTICOLOR tristate "PWM driven multi-color LED Support" depends on PWM |