@@ -26,12 +26,17 @@ LIST_HEAD(leds_list);
EXPORT_SYMBOL_GPL(leds_list);
const char * const led_colors[LED_COLOR_ID_MAX] = {
- [LED_COLOR_ID_WHITE] = "white",
- [LED_COLOR_ID_RED] = "red",
- [LED_COLOR_ID_GREEN] = "green",
- [LED_COLOR_ID_BLUE] = "blue",
[LED_COLOR_ID_AMBER] = "amber",
+ [LED_COLOR_ID_BLUE] = "blue",
+ [LED_COLOR_ID_CYAN] = "cyan",
+ [LED_COLOR_ID_GREEN] = "green",
+ [LED_COLOR_ID_LIME] = "lime",
+ [LED_COLOR_ID_ORANGE] = "orange",
+ [LED_COLOR_ID_PINK] = "pink",
+ [LED_COLOR_ID_PURPLE] = "purple",
+ [LED_COLOR_ID_RED] = "red",
[LED_COLOR_ID_VIOLET] = "violet",
+ [LED_COLOR_ID_WHITE] = "white",
[LED_COLOR_ID_YELLOW] = "yellow",
[LED_COLOR_ID_IR] = "ir",
[LED_COLOR_ID_MULTI] = "multicolor",
Some new monochromatic LEDs have been introduced into DT bindings, but they do not have corresponding descriptions on the led_colors structure. This patch adds missing LED color strings and sorts them in the order defined by the dt-bindings. Fixes: 472d7b9e8141 ("dt-bindings: leds: Expand LED_COLOR_ID definitions") Signed-off-by: Shiji Yang <yangshiji66@outlook.com> --- drivers/leds/led-core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)