Kiev: ft8756:report touch events to touchscreen class

1. If there is a demand in the future, the touch screen class can add
some processing before reporting the touch events.
2. Output touch events for debugging

NO_PROP_NEEDED: <only for kiev in bo branch>

Change-Id: I1ad85bd86efc4799398530d30c6fe263e861e189
Reviewed-on: https://gerrit.mot.com/1683831
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
litong 2020-07-16 16:17:04 +08:00 • committed by litong20
commit 8828c3c907

View file

@ -474,6 +474,25 @@ static int fts_input_report_b(struct fts_ts_data *data)
input_mt_slot(data->input_dev, events[i].id);
if (EVENT_DOWN(events[i].flag)) {
#ifdef CONFIG_INPUT_TOUCHSCREEN_MMI
if ( FTS_TOUCH_DOWN == events[i].flag && data->imports
&& data->imports->report_touch_event) {
struct touch_event_data touch_event;
memset(&touch_event, 0, sizeof(touch_event));
touch_event.type = TS_COORDINATE_ACTION_PRESS;
touch_event.id = events[i].id;
touch_event.x = events[i].x;
touch_event.y = events[i].y;
touch_event.major = events[i].area;
data->imports->report_touch_event(&touch_event, data->input_dev);
if (touch_event.skip_report) {
/* input event is reported by touchscreen class.
* vendor touch event may need update based on touch_event
*/
continue;
}
}
#endif
input_mt_report_slot_state(data->input_dev, MT_TOOL_FINGER, true);
#if FTS_REPORT_PRESSURE_EN
@ -501,6 +520,21 @@ static int fts_input_report_b(struct fts_ts_data *data)
}
} else {
uppoint++;
#ifdef CONFIG_INPUT_TOUCHSCREEN_MMI
if (data->imports && data->imports->report_touch_event) {
struct touch_event_data touch_event;
memset(&touch_event, 0, sizeof(touch_event));
touch_event.type = TS_COORDINATE_ACTION_RELEASE;
touch_event.id = events[i].id;
data->imports->report_touch_event(&touch_event, data->input_dev);
if (touch_event.skip_report) {
/* input event is reported by touchscreen class.
* vendor touch event may need update based on touch_event
*/
continue;
}
}
#endif
input_mt_report_slot_state(data->input_dev, MT_TOOL_FINGER, false);
data->touchs &= ~BIT(events[i].id);
if (data->log_level >= 1) {