diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-12-18 09:42:30 -0500 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2010-12-22 05:15:28 -0500 |
commit | 4f56ce929cab45a3a6e1a81700da52bb9bdbfc0f (patch) | |
tree | c6f0d34cfae5ce142f8840c445fe2fb9eef1c7d4 /drivers/input/mouse/synaptics.c | |
parent | fec6e5252b542e748871c88f8455e69ae73ea156 (diff) |
Input: synaptics - ignore bogus mt packet
In multitouch mode, at least one device (fw: 7.4 id: 0x1c0b1) sometimes
sends a final main packet with x == 1. Since the normal values are above
1472, this is clearly bogus. At the same time, a two-finger touch is
signaled, even though only one finger was on the pad to begin with. This
patch ignores the packet altogether, removing the problem.
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'drivers/input/mouse/synaptics.c')
-rw-r--r-- | drivers/input/mouse/synaptics.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 6514928fd35f..720729afe6dc 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -548,7 +548,7 @@ static void synaptics_process_packet(struct psmouse *psmouse) | |||
548 | return; | 548 | return; |
549 | } | 549 | } |
550 | 550 | ||
551 | if (hw.z > 0) { | 551 | if (hw.z > 0 && hw.x > 1) { |
552 | num_fingers = 1; | 552 | num_fingers = 1; |
553 | finger_width = 5; | 553 | finger_width = 5; |
554 | if (SYN_CAP_EXTENDED(priv->capabilities)) { | 554 | if (SYN_CAP_EXTENDED(priv->capabilities)) { |
@@ -582,7 +582,7 @@ static void synaptics_process_packet(struct psmouse *psmouse) | |||
582 | if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1); | 582 | if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1); |
583 | if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0); | 583 | if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0); |
584 | 584 | ||
585 | if (hw.z > 0) { | 585 | if (num_fingers > 0) { |
586 | input_report_abs(dev, ABS_X, hw.x); | 586 | input_report_abs(dev, ABS_X, hw.x); |
587 | input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y); | 587 | input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y); |
588 | } | 588 | } |