]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
leds: core: Introduce led_get_color_name() function
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 13 Jun 2024 14:48:36 +0000 (16:48 +0200)
committerLee Jones <lee@kernel.org>
Fri, 21 Jun 2024 10:41:32 +0000 (11:41 +0100)
commit5f2e950755c76c6fc20fc4ebd8355671fbbd7ac0
tree73568d7e89fcc9439fbf2c7dc808df148245dd48
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
leds: core: Introduce led_get_color_name() function

This is similar to the existing led_colors[] array but is safer to use and
usable by everyone.

Getting string representations of color ids is useful for drivers
which are handling color IDs anyways, for example for the multicolor API.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-1-500b50f41e0f@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/led-core.c
include/linux/leds.h