]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots
authorRong Zhang <i@rong.moe>
Mon, 7 Jul 2025 16:38:07 +0000 (00:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Aug 2025 08:51:25 +0000 (09:51 +0100)
commit9b1bfb64e18d001852a4b61cafd4712c3fa6f2d6
treec8f8c3e22d1d94d14bbece78a5e1a5a38802152e
parent67a746d2b14372d28f6ef6ddc0ad091736ca0f78
platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots

commit e10981075adce203eac0be866389309eeb8ef11e upstream.

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: 503325f84bc0 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/ideapad-laptop.c