Input: elantech - mark protocols v2 and v3 as semi-mt
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Tue, 12 Jan 2016 01:35:38 +0000 (17:35 -0800)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 3 Feb 2016 19:01:46 +0000 (14:01 -0500)
commit1fc9a4dd398062e9fa4937f446bedd3305312d1d
tree24ba0ce20653dac8bd886dc30ea064f079c45475
parent27853751e20c1d4c3d060210d38cc0b63ac0c991
Input: elantech - mark protocols v2 and v3 as semi-mt

[ Upstream commit 6544a1df11c48c8413071aac3316792e4678fbfb ]

When using a protocol v2 or v3 hardware, elantech uses the function
elantech_report_semi_mt_data() to report data. This devices are rather
creepy because if num_finger is 3, (x2,y2) is (0,0). Yes, only one valid
touch is reported.

Anyway, userspace (libinput) is now confused by these (0,0) touches,
and detect them as palm, and rejects them.

Commit 3c0213d17a09 ("Input: elantech - fix semi-mt protocol for v3 HW")
was sufficient enough for xf86-input-synaptics and libinput before it has
palm rejection. Now we need to actually tell libinput that this device is
a semi-mt one and it should not rely on the actual values of the 2 touches.

Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/input/mouse/elantech.c