mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 12:52:29 -04:00
HID: apple: use the standard keyboard backlight LED name
The T2-attached butterfly keyboard backlight is exposed as apple::kbd_backlight. This leaves the color field empty and gives userspace a model-specific name for the same white keyboard-backlight function exposed by Magic Keyboards. Magic Keyboard backlight support was added later and already follows the current LED naming convention. As a result, userspace has to handle two different names for the same function. We should use :white:kbd_backlight for both implementations. This follows the LED color and function naming convention and lets userspace discover either keyboard generation without a special case for the butterfly models. Signed-off-by: Andre Eikmeyer <dev@deq.rocks> Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
committed by
Jiri Kosina
parent
2b5d1495bd
commit
42b31c80e4
@@ -861,7 +861,7 @@ static int apple_backlight_init(struct hid_device *hdev)
|
||||
}
|
||||
|
||||
asc->backlight->hdev = hdev;
|
||||
asc->backlight->cdev.name = "apple::kbd_backlight";
|
||||
asc->backlight->cdev.name = ":white:" LED_FUNCTION_KBD_BACKLIGHT;
|
||||
asc->backlight->cdev.max_brightness = rep->backlight_on_max;
|
||||
asc->backlight->cdev.brightness_set_blocking = apple_backlight_led_set;
|
||||
/* VHCI re-enumeration restores the cached brightness in the next probe. */
|
||||
|
||||
Reference in New Issue
Block a user