I had disabled ideapad-laptop for a long time until a critical bug was
fixed[1], and I soon noticed some behavior changes after reenabling
ideapad-laptop.
The behavior changes are about FnLock and keyboard backlight. The HW/FW
can remember their states among boots[2]. After enabling ideapad-laptop,
I noticed that their states were always reset to off after a reboot or a
power cycle.
Historically, FnLock was only exposed under the VPC2004 sysfs node, and
its state was remembered well. Things have changed since the
introduction of its LED class device. As a side effect of the LED class
device unregistering sequence, it is always turned off while shutting
down, making the HW/FW feature meaningless.
The story is similar but a bit different for keyboard backlight. Since
the first introduction of support for it, it has suffered from the same
issue.
Fix the issue by setting LED_RETAIN_AT_SHUTDOWN on their LED class
devices so that their states get remembered, which also aligns with the
behavior of manufacturer utilities on Windows.
[1]: commit 5808c3421695 ("platform/x86: ideapad-laptop: use
usleep_range() for EC polling")
[2]: For FnLock, most (if not all) models should support this; for
keyboard backlight, at least some recent models support this (I am not
sure about old models).
Rong Zhang (2):
platform/x86: ideapad-laptop: Fix FnLock not remembered among boots
platform/x86: ideapad-laptop: Fix kbd backlight not remembered among
boots
drivers/platform/x86/ideapad-laptop.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
base-commit: d7b8f8e20813f0179d8ef519541a3527e7661d3a
--
2.50.0