Skip to content

Commit e109810

Browse files
Rongronggg9ij-intel
authored andcommitted
platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots
On some models supported by ideapad-laptop, the HW/FW can remember the state of keyboard backlight among boots. However, it is always turned off while shutting down, as a side effect of the LED class device unregistering sequence. This is inconvenient for users who always prefer turning on the keyboard backlight. Thus, set LED_RETAIN_AT_SHUTDOWN on the LED class device so that the state of keyboard backlight gets remembered, which also aligns with the behavior of manufacturer utilities on Windows. Fixes: 503325f ("platform/x86: ideapad-laptop: add keyboard backlight control support") Cc: [email protected] Signed-off-by: Rong Zhang <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 9533b78 commit e109810

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/ideapad-laptop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ static int ideapad_kbd_bl_init(struct ideapad_private *priv)
16691669
priv->kbd_bl.led.name = "platform::" LED_FUNCTION_KBD_BACKLIGHT;
16701670
priv->kbd_bl.led.brightness_get = ideapad_kbd_bl_led_cdev_brightness_get;
16711671
priv->kbd_bl.led.brightness_set_blocking = ideapad_kbd_bl_led_cdev_brightness_set;
1672-
priv->kbd_bl.led.flags = LED_BRIGHT_HW_CHANGED;
1672+
priv->kbd_bl.led.flags = LED_BRIGHT_HW_CHANGED | LED_RETAIN_AT_SHUTDOWN;
16731673

16741674
err = led_classdev_register(&priv->platform_device->dev, &priv->kbd_bl.led);
16751675
if (err)

0 commit comments

Comments
 (0)