]> git.baikalelectronics.ru Git - kernel.git/commit
HID: multitouch: Add quirks for flipped axes
authorAllen Ballway <ballway@chromium.org>
Tue, 10 Jan 2023 20:25:50 +0000 (20:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:20 +0000 (09:33 +0100)
commit31ce0d5bf5b92b35759d013e57fb73c28ead2d15
tree7a6dbce930d54bbfbd302280805b9b936286f794
parent01db02d31278ce688db375ff0bb55b9ba950c8e2
HID: multitouch: Add quirks for flipped axes

[ Upstream commit 591db18408eb9258f501eab705da554175d478d2 ]

Certain touchscreen devices, such as the ELAN9034, are oriented
incorrectly and report touches on opposite points on the X and Y axes.
For example, a 100x200 screen touched at (10,20) would report (90, 180)
and vice versa.

This is fixed by adding device quirks to transform the touch points
into the correct spaces, from X -> MAX(X) - X, and Y -> MAX(Y) - Y.

Signed-off-by: Allen Ballway <ballway@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Stable-dep-of: 6c5a8019ac2b ("HID: retain initial quirks set up when creating HID devices")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-multitouch.c
drivers/hid/hid-quirks.c
drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c
drivers/hid/i2c-hid/i2c-hid.h