platform/x86: uniwill-laptop: Label multicolor LEDs correctly

The LED subsystem specifies that LEDs capable of producing arbitrary
colors (like RGB) should label themselfs as "rgb" instead of
"multicolor".

Use the "rgb" label instead of the "multicolor" label to fix
detection by userspace applications.

Reported-by: Werner Sembach <wse@tuxedocomputers.com>
Closes: https://github.com/Wer-Wolf/uniwill-laptop/issues/18
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20261007144101.323289-5-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Armin Wolf 2026-10-07 16:38:57 +02:00 committed by Ilpo Järvinen
parent 1a1ecc9aa0
commit 207c3d6156
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31
2 changed files with 6 additions and 6 deletions

View File

@ -72,7 +72,7 @@ Lightbar
--------
The ``uniwill-laptop`` driver exposes the lightbar found on some models as a standard multicolor
LED class device. The default name of this LED class device is ``uniwill:multicolor:status``.
LED class device. The default name of this LED class device is ``uniwill:rgb:status``.
The lightbar supports a separate rainbow animation mode that can be enabled by selecting the
`uniwill-rainbow` LED trigger. To enable a breathing animation during suspend, see
@ -83,7 +83,7 @@ Keyboard Backlight
The ``uniwill-laptop`` driver supports controlling the keyboard backlight using the standard
LED class interface. The default name of this LED class device is ``uniwill:white:kbd_backlight``
when the keyboard backlight supports only a single color, or ``uniwill:multicolor:kbd_backlight``
when the keyboard backlight supports only a single color, or ``uniwill:rgb:kbd_backlight``
when the keyboard backlight supports RGB colors. The maximum intensity for each color channel
in RGB mode is 50.

View File

@ -1559,7 +1559,7 @@ static int uniwill_led_init(struct uniwill_data *data)
{
struct led_init_data init_data = {
.devicename = DRIVER_NAME,
.default_label = "multicolor:" LED_FUNCTION_STATUS,
.default_label = "rgb:" LED_FUNCTION_STATUS,
.devname_mandatory = true,
};
unsigned int color_indices[3] = {
@ -1605,7 +1605,7 @@ static int uniwill_led_init(struct uniwill_data *data)
if (ret < 0)
return ret;
data->led_mc_cdev.led_cdev.color = LED_COLOR_ID_MULTI;
data->led_mc_cdev.led_cdev.color = LED_COLOR_ID_RGB;
data->led_mc_cdev.led_cdev.max_brightness = 1;
data->led_mc_cdev.led_cdev.flags = LED_REJECT_NAME_CONFLICT;
data->led_mc_cdev.led_cdev.brightness_set_blocking = uniwill_led_brightness_set;
@ -1813,7 +1813,7 @@ static int uniwill_rgb_kbd_led_init(struct uniwill_data *data)
LED_COLOR_ID_BLUE,
};
struct led_init_data init_data = {
.default_label = "multicolor:" LED_FUNCTION_KBD_BACKLIGHT,
.default_label = "rgb:" LED_FUNCTION_KBD_BACKLIGHT,
.devicename = DRIVER_NAME,
.devname_mandatory = true,
};
@ -1874,7 +1874,7 @@ static int uniwill_rgb_kbd_led_init(struct uniwill_data *data)
return ret;
data->kbd_led_mc_cdev.led_cdev.max_brightness = data->kbd_led_max_brightness;
data->kbd_led_mc_cdev.led_cdev.color = LED_COLOR_ID_MULTI;
data->kbd_led_mc_cdev.led_cdev.color = LED_COLOR_ID_RGB;
data->kbd_led_mc_cdev.led_cdev.flags = LED_BRIGHT_HW_CHANGED | LED_REJECT_NAME_CONFLICT;
data->kbd_led_mc_cdev.led_cdev.brightness_set_blocking = uniwill_kbd_led_mc_brightness_set;
data->kbd_led_mc_cdev.led_cdev.brightness_get = uniwill_kbd_led_mc_brightness_get;