@@ -126,6 +126,7 @@ struct edt_ft5x06_ts_data {
int offset_y;
int report_rate;
int max_support_points;
+ unsigned int known_ids;
char name[EDT_NAME_LEN];
@@ -198,6 +199,8 @@ static void edt_ft5x06_process(struct edt_ft5x06_ts_data *tsdata)
int offset, tplen, datalen, crclen;
int error;
int num_points;
+ unsigned int active_ids = 0, known_ids = tsdata->known_ids;
+ long released_ids;
switch (tsdata->version) {
case EDT_M06:
@@ -297,10 +300,21 @@ static void edt_ft5x06_process(struct edt_ft5x06_ts_data *tsdata)
input_mt_slot(tsdata->input, id);
if (input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER,
- type != TOUCH_EVENT_UP))
+ type != TOUCH_EVENT_UP)) {
touchscreen_report_pos(tsdata->input, &tsdata->prop,
x, y, true);
+ active_ids |= BIT(id);
+ } else {
+ known_ids &= ~BIT(id);
+ }
+ }
+
+ released_ids = known_ids & ~active_ids;
+ for_each_set_bit_from(i, &released_ids, tsdata->max_support_points) {
+ input_mt_slot(tsdata->input, i);
+ input_mt_report_slot_inactive(tsdata->input);
}
+ tsdata->known_ids = active_ids;
input_mt_report_pointer_emulation(tsdata->input, true);
input_sync(tsdata->input);