aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@bitmath.org>2010-11-12 09:11:54 +0100
committerJohn Rigby <john.rigby@linaro.org>2011-09-23 08:47:26 -0600
commitfc5288fafa3345b345b2ccfcdac8af323ebc79b9 (patch)
tree2408b7bbdc808af0494f1f4f8a1168b884ab0b0e /drivers
parentb3ac8778c3cf6bc0c142114378e0843b142a2057 (diff)
hid: ntrig: Mask pen switch events
When the pen comes in proximity, special packets appear on the multitouch device. This confuses userland to misinterpret the touch state. This patch masks the special pen packets consisting of a single finger of width 10, thereby fixing the problem. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-ntrig.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 27d249f39dc..9c53e96e03e 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -408,6 +408,10 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
break;
nd->nindex = 0;
nd->ncol = value;
+ /* skip pen switch events */
+ if (nd->ncol == 1 &&
+ nd->col[0].w == 10 && nd->col[0].h == 10)
+ break;
report_frame(input, nd);
break;
}