kernel_optimize_test/drivers/input
José Expósito 5d4b00e053 Input: clear BTN_RIGHT/MIDDLE on buttonpads
[ Upstream commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40 ]

Buttonpads are expected to map the INPUT_PROP_BUTTONPAD property bit
and the BTN_LEFT key bit.

As explained in the specification, where a device has a button type
value of 0 (click-pad) or 1 (pressure-pad) there should not be
discrete buttons:
https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/touchpad-windows-precision-touchpad-collection#device-capabilities-feature-report

However, some drivers map the BTN_RIGHT and/or BTN_MIDDLE key bits even
though the device is a buttonpad and therefore does not have those
buttons.

This behavior has forced userspace applications like libinput to
implement different workarounds and quirks to detect buttonpads and
offer to the user the right set of features and configuration options.
For more information:
https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/726

In order to avoid this issue clear the BTN_RIGHT and BTN_MIDDLE key
bits when the input device is register if the INPUT_PROP_BUTTONPAD
property bit is set.

Notice that this change will not affect udev because it does not check
for buttons. See systemd/src/udev/udev-builtin-input_id.c.

List of known affected hardware:

 - Chuwi AeroBook Plus
 - Chuwi Gemibook
 - Framework Laptop
 - GPD Win Max
 - Huawei MateBook 2020
 - Prestigio Smartbook 141 C2
 - Purism Librem 14v1
 - StarLite Mk II   - AMI firmware
 - StarLite Mk II   - Coreboot firmware
 - StarLite Mk III  - AMI firmware
 - StarLite Mk III  - Coreboot firmware
 - StarLabTop Mk IV - AMI firmware
 - StarLabTop Mk IV - Coreboot firmware
 - StarBook Mk V

Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://lore.kernel.org/r/20220208174806.17183-1-jose.exposito89@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-03-08 19:09:29 +01:00
..
gameport
joystick Input: spaceball - fix parsing of movement data packets 2022-01-05 12:40:33 +01:00
keyboard Input: snvs_pwrkey - add clk handling 2021-10-27 09:56:55 +02:00
misc Input: cm109 - do not stomp on control URB 2020-12-11 13:17:36 -08:00
mouse Input: appletouch - initialize work before device registration 2022-01-05 12:40:33 +01:00
rmi4 Input: synaptics-rmi4 - support bootloader v8 in f34v7 2020-10-04 19:51:45 -07:00
serio Input: i8042 - enable deferred probe quirk for ASUS UM325UA 2022-01-05 12:40:29 +01:00
tablet treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
touchscreen Input: zinitix - make sure the IRQ is allocated before it gets enabled 2022-01-11 15:25:02 +01:00
apm-power.c
evbug.c
evdev.c Input: evdev - per-client waitgroups 2020-10-06 18:34:15 -07:00
ff-core.c
ff-memless.c
input-compat.c
input-compat.h
input-leds.c
input-mt.c Input: MT - avoid comma separated statements 2020-08-25 10:26:05 -07:00
input-polldev.c
input-poller.c
input-poller.h
input.c Input: clear BTN_RIGHT/MIDDLE on buttonpads 2022-03-08 19:09:29 +01:00
joydev.c Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl 2021-07-14 16:55:39 +02:00
Kconfig
Makefile
matrix-keymap.c
mousedev.c
sparse-keymap.c