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

Commit 24e3a503 authored by Mao Li's avatar Mao Li Committed by Gerrit - the friendly Code Review server
Browse files

input: msg21xx_ts: release touch when finger leaves the panel



When fingers on the panel decrease, release corresponding touches.

Change-Id: Iafc3a9dda252417fcd06e3d9d24fb73b4d6f8e58
Signed-off-by: default avatarMao Li <maol@codeaurora.org>
parent a361376d
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);