From: Lothar Waßmann Date: Fri, 28 Mar 2014 16:28:17 +0000 (-0700) Subject: Input: edt-ft5x06 - ignore touchdown events X-Git-Tag: firefly_0821_release~176^2~541^2~209^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ee3e946e31e6df0f9845f9b3d527252003603530;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Fugang Duan Signed-off-by: Dmitry Torokhov --- 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) 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;