mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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: 503325f84b ("platform/x86: ideapad-laptop: add keyboard backlight control support")
Cc: stable@vger.kernel.org
Signed-off-by: Rong Zhang <i@rong.moe>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250707163808.155876-3-i@rong.moe
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:
parent
9533b789df
commit
e10981075a
|
|
@ -1669,7 +1669,7 @@ static int ideapad_kbd_bl_init(struct ideapad_private *priv)
|
|||
priv->kbd_bl.led.name = "platform::" LED_FUNCTION_KBD_BACKLIGHT;
|
||||
priv->kbd_bl.led.brightness_get = ideapad_kbd_bl_led_cdev_brightness_get;
|
||||
priv->kbd_bl.led.brightness_set_blocking = ideapad_kbd_bl_led_cdev_brightness_set;
|
||||
priv->kbd_bl.led.flags = LED_BRIGHT_HW_CHANGED;
|
||||
priv->kbd_bl.led.flags = LED_BRIGHT_HW_CHANGED | LED_RETAIN_AT_SHUTDOWN;
|
||||
|
||||
err = led_classdev_register(&priv->platform_device->dev, &priv->kbd_bl.led);
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user