platform/x86: ideapad-laptop: support for more special keys in WMI
authorPhilipp Jungkamp <p.jungkamp@gmx.net>
Wed, 16 Nov 2022 11:06:47 +0000 (12:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jan 2023 10:11:42 +0000 (11:11 +0100)
commit33c25c3146837f2ac7e465fdfd5dedd85d202ca8
treed4e9bd8b34db11442885746192553004740b4077
parent32755a5da122f53c3d82e1ef9585999f2e89f62c
platform/x86: ideapad-laptop: support for more special keys in WMI

[ Upstream commit f32e02417614d3588a3954dab2a70320c43d1010 ]

The event data of the WMI event 0xD0, which is assumed to be the
fn_lock, is used to indicate several special keys on newer Yoga 7/9
laptops.

The notify_id 0xD0 is non-unique in the DSDT of the Yoga 9 14IAP7, this
causes wmi_get_event_data() to report wrong values.
Port the ideapad-laptop WMI code to the wmi bus infrastructure which
does not suffer from the shortcomings of wmi_get_event_data().

Signed-off-by: Philipp Jungkamp <p.jungkamp@gmx.net>
Link: https://lore.kernel.org/r/20221116110647.3438-1-p.jungkamp@gmx.net
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/ideapad-laptop.c