linux/drivers/platform
Hans de Goede 5829f8a897 platform/x86: ideapad-laptop: Send KEY_TOUCHPAD_TOGGLE on some models
On recent Ideapad models the EC does not control the touchpad at all,
so instead of sending KEY_TOUCHPAD_ON/ _OFF on touchpad toggle hotkey
events, ideapad-laptop should send KEY_TOUCHPAD_TOGGLE and let userspace
handle the toggling.

Check for this by checking if the value read from VPCCMD_R_TOUCHPAD
actually changes when receiving a touchpad-toggle hotkey event; and
if it does not change send KEY_TOUCHPAD_TOGGLE to userspace to let
userspace enable/disable the touchpad in software.

Note this also drops the priv->features.touchpad_ctrl_via_ec check from
ideapad_sync_touchpad_state() so that KEY_TOUCHPAD_TOGGLE will be send
on laptops where this is not set too. This can be safely dropped now
because the i8042_command(I8042_CMD_AUX_ENABLE/_DISABLE) call is now
guarded by its own feature flag.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Tested-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Link: https://lore.kernel.org/r/20221117110244.67811-5-hdegoede@redhat.com
2022-11-21 11:12:23 +01:00
..
chrome chrome platform changes for v6.1 2022-10-05 10:14:48 -07:00
goldfish platform: goldfish: pipe: Use platform_get_irq() to get the interrupt 2022-03-18 13:55:21 +01:00
loongarch LoongArch: Add ACPI-based generic laptop driver 2022-10-12 16:36:20 +08:00
mellanox platform/mellanox: Add BlueField-3 support in the tmfifo driver 2022-11-16 08:48:19 +01:00
mips MIPS: Loongson-3: fix compile mips cpu_hwmon as module build error. 2022-06-09 22:24:19 +02:00
olpc platform/olpc: Fix uninitialized data in debugfs write 2022-07-28 20:40:15 +02:00
surface platform/surface: aggregator_registry: Add support for Surface Laptop 5 2022-11-16 08:43:36 +01:00
x86 platform/x86: ideapad-laptop: Send KEY_TOUCHPAD_TOGGLE on some models 2022-11-21 11:12:23 +01:00
Kconfig LoongArch: Add ACPI-based generic laptop driver 2022-10-12 16:36:20 +08:00
Makefile LoongArch: Add ACPI-based generic laptop driver 2022-10-12 16:36:20 +08:00