Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48e4d67c authored by Mao Li's avatar Mao Li Committed by Abinaya P
Browse files

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: default avatarMao Li <maol@codeaurora.org>
Signed-off-by: default avatarSudhakar Manapati <smanap@codeaurora.org>
parent 5218b8f9
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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);