Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

HID: apple: ensure the keyboard backlight is off if suspending

Some users reported that upon suspending their keyboard backlight
remained on. Fix this by adding the missing LED_CORE_SUSPENDRESUME flag.

Cc: stable@vger.kernel.org
Fixes: 394ba612f941 ("HID: apple: Add support for magic keyboard backlight on T2 Macs")
Fixes: 9018eacbe623 ("HID: apple: Add support for keyboard backlight on certain T2 Macs.")
Reported-by: André Eikmeyer <andre.eikmeyer@gmail.com>
Tested-by: André Eikmeyer <andre.eikmeyer@gmail.com>
Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>

authored by

Aditya Garg and committed by
Jiri Kosina
1f95a6cd d4229fc0

+2
+2
drivers/hid/hid-apple.c
··· 858 858 asc->backlight->cdev.name = "apple::kbd_backlight"; 859 859 asc->backlight->cdev.max_brightness = rep->backlight_on_max; 860 860 asc->backlight->cdev.brightness_set_blocking = apple_backlight_led_set; 861 + asc->backlight->cdev.flags = LED_CORE_SUSPENDRESUME; 861 862 862 863 ret = apple_backlight_set(hdev, 0, 0); 863 864 if (ret < 0) { ··· 927 926 backlight->cdev.name = ":white:" LED_FUNCTION_KBD_BACKLIGHT; 928 927 backlight->cdev.max_brightness = backlight->brightness->field[0]->logical_maximum; 929 928 backlight->cdev.brightness_set_blocking = apple_magic_backlight_led_set; 929 + backlight->cdev.flags = LED_CORE_SUSPENDRESUME; 930 930 931 931 apple_magic_backlight_set(backlight, 0, 0); 932 932