2023-10-31 13:29:47

by Shiji Yang

[permalink] [raw]
Subject: [PATCH v2 1/2] leds: core: add missing LED color strings

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 the missing LED color strings.

Fixes: 472d7b9e8141 ("dt-bindings: leds: Expand LED_COLOR_ID definitions")
Signed-off-by: Shiji Yang <[email protected]>
---
drivers/leds/led-core.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
index 214ed81eb..223023928 100644
--- a/drivers/leds/led-core.c
+++ b/drivers/leds/led-core.c
@@ -36,6 +36,11 @@ const char * const led_colors[LED_COLOR_ID_MAX] = {
[LED_COLOR_ID_IR] = "ir",
[LED_COLOR_ID_MULTI] = "multicolor",
[LED_COLOR_ID_RGB] = "rgb",
+ [LED_COLOR_ID_PURPLE] = "purple",
+ [LED_COLOR_ID_ORANGE] = "orange",
+ [LED_COLOR_ID_PINK] = "pink",
+ [LED_COLOR_ID_CYAN] = "cyan",
+ [LED_COLOR_ID_LIME] = "lime",
};
EXPORT_SYMBOL_GPL(led_colors);

--
2.39.2


2023-11-01 11:48:14

by Jisheng Zhang

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] leds: core: add missing LED color strings

On Tue, Oct 31, 2023 at 09:29:00PM +0800, Shiji Yang wrote:
> 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 the missing LED color strings.
>
> Fixes: 472d7b9e8141 ("dt-bindings: leds: Expand LED_COLOR_ID definitions")
> Signed-off-by: Shiji Yang <[email protected]>
> ---
> drivers/leds/led-core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
> index 214ed81eb..223023928 100644
> --- a/drivers/leds/led-core.c
> +++ b/drivers/leds/led-core.c
> @@ -36,6 +36,11 @@ const char * const led_colors[LED_COLOR_ID_MAX] = {
> [LED_COLOR_ID_IR] = "ir",
> [LED_COLOR_ID_MULTI] = "multicolor",
> [LED_COLOR_ID_RGB] = "rgb",
> + [LED_COLOR_ID_PURPLE] = "purple",
> + [LED_COLOR_ID_ORANGE] = "orange",
> + [LED_COLOR_ID_PINK] = "pink",
> + [LED_COLOR_ID_CYAN] = "cyan",
> + [LED_COLOR_ID_LIME] = "lime",

A similar patch was sent out two days ago, earlier than yours ;)

https://lore.kernel.org/linux-leds/[email protected]/

> };
> EXPORT_SYMBOL_GPL(led_colors);
>
> --
> 2.39.2
>