diff options
author | Zhang Jiejing <jiejing.zhang@freescale.com> | 2013-01-08 12:42:15 +0800 |
---|---|---|
committer | Tapani <tapani@vmail.me> | 2013-03-29 14:35:05 +0800 |
commit | b678f1cf755b4e58daed2d21a65c3f1918cc96a6 (patch) | |
tree | e8068620afbaa2abcd7d08596742dea1fbece6db | |
parent | 9659f9aa206431a3bfd7bd377d564c107e792a0a (diff) |
ENGR00239187 input: novatek_ts: fix some point not release issue.
This issue is caused by Touch Screen F/W, and it will report a
full package with 0xFF * 6 to notice the point was release.
Add this workaround to fix this issue, fixup the wrong finger id.
Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
-rw-r--r-- | drivers/input/touchscreen/novatek_ts.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/novatek_ts.c b/drivers/input/touchscreen/novatek_ts.c index 84c773225ed4..84b1024a78d4 100644 --- a/drivers/input/touchscreen/novatek_ts.c +++ b/drivers/input/touchscreen/novatek_ts.c @@ -2,7 +2,7 @@ * Driver for Novatek NT11003 Multiple Touch Controller * * Copyright (C) 2012 Novatek Ltd. - * Copyright (C) 2012 Freescale Semiconductor, Inc. + * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -30,6 +30,7 @@ #define NOVATEK_MAX_X 1280 #define NOVATEK_MAX_Y 800 +#define NT_QUIRK_ID ((0xFF >> 3) - 1) struct tp_event { u16 x; @@ -118,7 +119,15 @@ static irqreturn_t novatek_ts_threaded_irq_handler(int irq, void *dev_id) memset(&event, 0, sizeof(event)); parser_finger_events(&buffer[i * FINGER_EVENT_LEN], &event); - if (event.status == 0 /* || event.id > MAX_SUPPORT_POINTS */) + /* workaround FW sometime report touch up is not + * corrent, but report all 0xFF package, so it lost + * track of ID, so workaround by add a touch ID by the + * parser id. */ + if (ts->fingers[i] == FINGER_MOVE && event.status == FINGER_UP + && event.id == NT_QUIRK_ID) + event.id = i; + + if (event.status == 0) continue; /* ignore the event already up. */ |