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

Commit 91bc3f86 authored by Mao Li's avatar Mao Li Committed by Sudhakar Manapati
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.10 kernel
    commit: 24e3a5036d3ca72b409315e70629865c6184a02c

Change-Id: Iafc3a9dda252417fcd06e3d9d24fb73b4d6f8e58
Signed-off-by: default avatarMao Li <maol@codeaurora.org>
Signed-off-by: default avatarSudhakar Manapati <smanap@codeaurora.org>
parent 091a0170
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1185,15 +1185,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);