Skip to content

Commit 9533b78

Browse files
Rongronggg9ij-intel
authored andcommitted
platform/x86: ideapad-laptop: Fix FnLock not remembered among boots
On devices supported by ideapad-laptop, the HW/FW can remember the FnLock state among boots. However, since the introduction of the FnLock LED class device, it is turned off while shutting down, as a side effect of the LED class device unregistering sequence. Many users always turn on FnLock because they use function keys much more frequently than multimedia keys. The behavior change is inconvenient for them. Thus, set LED_RETAIN_AT_SHUTDOWN on the LED class device so that the FnLock state gets remembered, which also aligns with the behavior of manufacturer utilities on Windows. Fixes: 07f48f6 ("platform/x86: ideapad-laptop: add FnLock LED class device") 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 0e2cebd commit 9533b78

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
@@ -1728,7 +1728,7 @@ static int ideapad_fn_lock_led_init(struct ideapad_private *priv)
17281728
priv->fn_lock.led.name = "platform::" LED_FUNCTION_FNLOCK;
17291729
priv->fn_lock.led.brightness_get = ideapad_fn_lock_led_cdev_get;
17301730
priv->fn_lock.led.brightness_set_blocking = ideapad_fn_lock_led_cdev_set;
1731-
priv->fn_lock.led.flags = LED_BRIGHT_HW_CHANGED;
1731+
priv->fn_lock.led.flags = LED_BRIGHT_HW_CHANGED | LED_RETAIN_AT_SHUTDOWN;
17321732

17331733
err = led_classdev_register(&priv->platform_device->dev, &priv->fn_lock.led);
17341734
if (err)

0 commit comments

Comments
 (0)