platform/x86: ideapad-laptop: Fix interrupt storm on fn-lock toggle on some Yoga...
authorArnav Rawat <arnavr3@illinois.edu>
Fri, 11 Nov 2022 14:32:09 +0000 (14:32 +0000)
committerHans de Goede <hdegoede@redhat.com>
Wed, 16 Nov 2022 07:47:08 +0000 (08:47 +0100)
commit81a5603a0f50fd7cf17ff21d106052215eaf2028
treec0a85062e01d585dd261c41d6a348158d63719cd
parent8b9b6a044b408283b086702b1d9e3cf4ba45b426
platform/x86: ideapad-laptop: Fix interrupt storm on fn-lock toggle on some Yoga laptops

Commit 3ae86d2d4704 ("platform/x86: ideapad-laptop: Fix Legion 5 Fn lock
LED") uses the WMI event-id for the fn-lock event on some Legion 5 laptops
to manually toggle the fn-lock LED because the EC does not do it itself.
However, the same WMI ID is also sent on some Yoga laptops. Here, setting
the fn-lock state is not valid behavior, and causes the EC to spam
interrupts until the laptop is rebooted.

Add a set_fn_lock_led_list[] DMI-id list and only enable the workaround to
manually set the LED on models on this list.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=212671
Cc: Meng Dong <whenov@gmail.com>
Signed-off-by: Arnav Rawat <arnavr3@illinois.edu>
Link: https://lore.kernel.org/r/12093851.O9o76ZdvQC@fedora
[hdegoede@redhat.com: Check DMI-id list only once and store the result]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/ideapad-laptop.c