summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorMao Li <maol@codeaurora.org>2014-08-25 22:00:42 +0800
committerAbinaya P <abinayap@codeaurora.org>2016-08-09 13:00:25 +0530
commit48e4d67c6e4c06f18994a00ae4583f2d296bbdd0 (patch)
tree6dc10617b4e50f01ac45ee3e642e68f093065b3d /drivers/input
parent5218b8f9f8d8b7e986440b5124093cdba8efd903 (diff)
input: msg21xx_ts: release touch when finger leaves the panel
When fingers on the panel decrease, release corresponding touches. This patch is propagated from 3.18 kernel 'commit 24e3a5036d3c ("input: msg21xx_ts: release touch when finger leaves the panel")' Change-Id: Iafc3a9dda252417fcd06e3d9d24fb73b4d6f8e58 Signed-off-by: Mao Li <maol@codeaurora.org> Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/msg21xx_ts.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/msg21xx_ts.c b/drivers/input/touchscreen/msg21xx_ts.c
index 72114eb78bc4..0a5ee503a80e 100644
--- a/drivers/input/touchscreen/msg21xx_ts.c
+++ b/drivers/input/touchscreen/msg21xx_ts.c
@@ -1186,15 +1186,16 @@ static irqreturn_t msg21xx_ts_interrupt(int irq, void *dev_id)
ABS_MT_POSITION_Y,
info.point[i].y);
}
- last_count = info.count;
- } else if (last_count > 0) { /* point touch released */
- for (i = 0; i < last_count; i++) {
+ }
+
+ if (last_count > info.count) {
+ for (i = info.count; i < MAX_TOUCH_NUM; i++) {
input_mt_slot(input_dev, i);
input_mt_report_slot_state(input_dev,
MT_TOOL_FINGER, 0);
}
- last_count = 0;
}
+ last_count = info.count;
input_report_key(input_dev, BTN_TOUCH, info.count > 0);
input_report_key(input_dev, BTN_TOOL_FINGER, info.count > 0);