leds: rgb: Add a multicolor LED driver to group monochromatic LEDs
authorJean-Jacques Hiblot <jjhiblot@traphandler.com>
Fri, 28 Jul 2023 15:37:31 +0000 (17:37 +0200)
committerLee Jones <lee@kernel.org>
Thu, 17 Aug 2023 08:01:00 +0000 (09:01 +0100)
commit37d0849ed3927f7c4be6f5ee030730f9aa7439c0
treedf4c3f3e529d65d804f7b9c7c6db186747da74ff
parent099c52d9448c1ca832b4695e982221a521282b94
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>
drivers/leds/rgb/Kconfig
drivers/leds/rgb/Makefile
drivers/leds/rgb/leds-group-multicolor.c [new file with mode: 0644]