Take a long time to enter pre_suspended

1. Create a separate lock for gesture event reporting to solve the 
problem of blocking pre_suspend and then blocking the next wake-up.
2. According to BSP test, it takes 1500 ms for the touch to receive 
the gesture event and the upper layer to complete the processing.


Change-Id: I93a18399876beba49100b41a0561103b2b9fa86d
Reviewed-on: https://gerrit.mot.com/1505298
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
litong 2020-03-02 19:27:17 +08:00 • committed by litong20
commit b4a82b4f75
2 changed files with 5 additions and 1 deletions

View file

@ -901,7 +901,7 @@ static void sec_ts_read_event(struct sec_ts_data *ts)
/* call class method */
ret = ts->imports->report_gesture(&event);
if (!ret)
__pm_wakeup_event(&ts->wakelock, 5000);
__pm_wakeup_event(&ts->gesture_wakelock, 3000);
}
#endif
break;
@ -1771,6 +1771,7 @@ static int sec_ts_probe(struct i2c_client *client, const struct i2c_device_id *i
mutex_init(&ts->modechange);
wakeup_source_init(&ts->wakelock, "tsp_wakelock");
wakeup_source_init(&ts->gesture_wakelock, "tsp_gesture_wakelock");
init_completion(&ts->resume_done);
complete_all(&ts->resume_done);
@ -1884,6 +1885,7 @@ err_irq:
}
err_input_register_device:
kfree(ts->pFrame);
wakeup_source_trash(&ts->gesture_wakelock);
wakeup_source_trash(&ts->wakelock);
sec_ts_power(ts, false);
if (ts->plat_data->support_dex) {
@ -2314,6 +2316,7 @@ static int sec_ts_remove(struct i2c_client *client)
p_ghost_check = NULL;
#endif
device_init_wakeup(&client->dev, false);
wakeup_source_trash(&ts->gesture_wakelock);
wakeup_source_trash(&ts->wakelock);
ts->lowpower_mode = false;

View file

@ -646,6 +646,7 @@ struct sec_ts_data {
#endif
struct completion resume_done;
struct wakeup_source wakelock;
struct wakeup_source gesture_wakelock;
struct sec_cmd_data sec;
short *pFrame;