summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2016-01-11 17:35:38 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-25 11:58:55 -0800
commit6f0dfd2f67ef78bcc98d45ba9caf967bbc2096eb (patch)
tree59cc7afe9fe5cf6a73ce903e9f4be3c8b56cc7ae /drivers/input
parent4af9b8769220ede564278e654c4c28bfe40ed9d0 (diff)
downloadlwn-6f0dfd2f67ef78bcc98d45ba9caf967bbc2096eb.tar.gz
lwn-6f0dfd2f67ef78bcc98d45ba9caf967bbc2096eb.zip
Input: elantech - mark protocols v2 and v3 as semi-mt
commit 6544a1df11c48c8413071aac3316792e4678fbfb upstream. 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. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/elantech.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 72f57426c2e4..9e497e4041a6 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1111,7 +1111,7 @@ static int elantech_set_input_params(struct psmouse *psmouse)
input_set_abs_params(dev, ABS_TOOL_WIDTH, ETP_WMIN_V2,
ETP_WMAX_V2, 0, 0);
}
- input_mt_init_slots(dev, 2, 0);
+ input_mt_init_slots(dev, 2, INPUT_MT_SEMI_MT);
input_set_abs_params(dev, ABS_MT_POSITION_X, x_min, x_max, 0, 0);
input_set_abs_params(dev, ABS_MT_POSITION_Y, y_min, y_max, 0, 0);
break;