]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: ideapad-laptop: Fix FnLock not remembered among boots
authorRong Zhang <i@rong.moe>
Mon, 7 Jul 2025 16:38:06 +0000 (00:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Aug 2025 08:48:42 +0000 (09:48 +0100)
commit616ca3c4d11e9cf2660110be9d892e1935841aad
treeb7cfb3b2766d9602f593fff994a0c1d21af3f298
parent4de81eb462840f7382205e05b3dcf17197714a98
platform/x86: ideapad-laptop: Fix FnLock not remembered among boots

commit 9533b789df7e8d273543a5991aec92447be043d7 upstream.

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: 07f48f668fac ("platform/x86: ideapad-laptop: add FnLock LED class device")
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-2-i@rong.moe
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/ideapad-laptop.c