Skip to content

Commit

Permalink
Input: edt-ft5x06 - ignore touchdown events
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lothar Waßmann authored and Dmitry Torokhov committed Mar 28, 2014
1 parent c080846 commit ee3e946
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/input/touchscreen/edt-ft5x06.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
if (type == TOUCH_EVENT_RESERVED)
continue;

/* ignore TOUCH_DOWN events, might have bogus coordinates */
if (type == TOUCH_EVENT_DOWN)
continue;

x = ((buf[0] << 8) | buf[1]) & 0x0fff;
y = ((buf[2] << 8) | buf[3]) & 0x0fff;
id = (buf[2] >> 4) & 0x0f;
Expand Down

0 comments on commit ee3e946

Please sign in to comment.