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

Commit 33175e8d authored by Rick Huang's avatar Rick Huang
Browse files

input: touchscreen: fts: Call touch event callback on every event



Call the touch event callback on every event received.  The previous
design call the callback after processing the entire FIFO.  However,
there are chances where multiple events with the same FID exist in
the FIFO.  This will cause the previous event to over-written
causing lost event.

Change-Id: I650edbb3a56243e091da6b5c6a9d47330ce37d65
Signed-off-by: default avatarRick Huang <rhuang@codeaurora.org>
parent 3d91e789
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -2840,6 +2840,12 @@ static void fts_enter_pointer_event_handler(struct fts_ts_info *info,
		}
	}

	if (info->event_mask) {
		touch_event_call_notifier(info->event_mask,
				(void *)&info->event[0]);
		info->event_mask = 0;
	}

no_report:
	return;

@@ -2883,6 +2889,12 @@ static void fts_leave_pointer_event_handler(struct fts_ts_info *info,
		__clear_bit(touchId, &info->finger_pressed);
		__set_bit(touchId, &info->event_mask);
	}

	if (info->event_mask) {
		touch_event_call_notifier(info->event_mask,
				(void *)&info->event[0]);
		info->event_mask = 0;
	}
}

/* EventId : 0x05 */
@@ -3258,12 +3270,6 @@ static void fts_event_handler(struct work_struct *work)
	input_sync(info->input_dev);

	fts_interrupt_enable(info);

	if (info->event_mask) {
		touch_event_call_notifier(info->event_mask,
				(void *)&info->event[0]);
		info->event_mask = 0;
	}
}

static int cx_crc_check(void)