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-11-16 14:23:27 -0700
commitaf5b6496983f4f1332f29ff39dce33e44ae4a444 (patch)
tree8b4f5e18d789251d1a5dadd6f5b7969a08130381 /drivers
parentb89480c08da756b26e97a399a898f9cd4ccd6b5c (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;
}