From 207c3d61564726720be9250312316e7dc491e24d Mon Sep 17 00:00:00 2001 From: Armin Wolf Date: Wed, 7 Oct 2026 16:38:57 +0200 Subject: [PATCH] platform/x86: uniwill-laptop: Label multicolor LEDs correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Closes: https://github.com/Wer-Wolf/uniwill-laptop/issues/18 Signed-off-by: Armin Wolf Link: https://patch.msgid.link/20261007144101.323289-5-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen --- Documentation/admin-guide/laptops/uniwill-laptop.rst | 4 ++-- drivers/platform/x86/uniwill/uniwill-acpi.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/admin-guide/laptops/uniwill-laptop.rst b/Documentation/admin-guide/laptops/uniwill-laptop.rst index aaf50e3074c1..d8ce30f10d7c 100644 --- a/Documentation/admin-guide/laptops/uniwill-laptop.rst +++ b/Documentation/admin-guide/laptops/uniwill-laptop.rst @@ -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. diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c b/drivers/platform/x86/uniwill/uniwill-acpi.c index b58502dc04de..c37dfba801f2 100644 --- a/drivers/platform/x86/uniwill/uniwill-acpi.c +++ b/drivers/platform/x86/uniwill/uniwill-acpi.c @@ -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;