aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorLothar Waßmann <LW@KARO-electronics.de>2014-03-28 12:28:17 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-03-28 12:33:06 -0400
commitee3e946e31e6df0f9845f9b3d527252003603530 (patch)
tree2809aa8219cd72483115722beac16380132e8383 /drivers/input
parentc0808467494318029f71185b42b61f1ae153afdc (diff)
Input: edt-ft5x06 - ignore touchdown events
The chip may report invalid coordinates on touchdown events, so don't report the initial touchdown event. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/edt-ft5x06.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index fd18e580870a..dd94b9eea6e7 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -176,6 +176,10 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
176 if (type == TOUCH_EVENT_RESERVED) 176 if (type == TOUCH_EVENT_RESERVED)
177 continue; 177 continue;
178 178
179 /* ignore TOUCH_DOWN events, might have bogus coordinates */
180 if (type == TOUCH_EVENT_DOWN)
181 continue;
182
179 x = ((buf[0] << 8) | buf[1]) & 0x0fff; 183 x = ((buf[0] << 8) | buf[1]) & 0x0fff;
180 y = ((buf[2] << 8) | buf[3]) & 0x0fff; 184 y = ((buf[2] << 8) | buf[3]) & 0x0fff;
181 id = (buf[2] >> 4) & 0x0f; 185 id = (buf[2] >> 4) & 0x0f;