mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
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:
parent
05b981d8fa
commit
8828c3c907
1 changed files with 34 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue