/* Called when the IRQ is triggered. Read the current device state, and push the input events to the user space.  */
static void goodix_process_events(struct goodix_ts_data *ts)
/* Called when the IRQ is triggered. Read the current device state, and push the input events to the user space.  */
static void goodix_process_events(struct goodix_ts_data *ts)
{
	u8  point_data[1 + GOODIX_CONTACT_SIZE * GOODIX_MAX_CONTACTS];
	int touch_num;
	int i;
	touch_num = goodix_ts_read_input_report(ts, point_data);
	if (touch_num < 0)
		return;
	if (!touch_num) {
		input_event(ts->input_dev, EV_KEY, BTN_TOUCH, 0);
		input_report_abs(ts->input_dev, ABS_PRESSURE, 0);
	}
	for (i = 0; i < touch_num; i++)
		goodix_ts_report_touch(ts,
				&point_data[1 + GOODIX_CONTACT_SIZE * i]);
	input_sync(ts->input_dev);
}