Add gesture pm for goodix touch

TP:
Wait bus ready before read gesture data from IC.

Change-Id: I17caa70cadcb0a3ac9c4399481c11e43e8a8ef1c
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2543551
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Wenge Zhu 2023-03-17 17:22:02 +08:00 • committed by zhuwg1
commit ef0d746f8a

View file

@ -231,6 +231,16 @@ static int gsx_gesture_ist(struct goodix_ts_core *cd,
if (atomic_read(&cd->suspended) == 0)
return EVT_CONTINUE;
if (cd->board_data.gesture_wait_pm) {
PM_WAKEUP_EVENT(cd->gesture_wakelock, 3000);
/* Waiting for pm resume completed */
ret = wait_event_interruptible_timeout(cd->pm_wq, atomic_read(&cd->pm_resume), msecs_to_jiffies(700));
if (!ret) {
ts_err("system(spi) can't finished resuming procedure.");
return IRQ_HANDLED;
}
}
ret = hw_ops->event_handler(cd, &gs_event);
if (ret) {
ts_err("failed get gesture data");