From b27503a054586572a29b71d3a79647a4c6e7fcae Mon Sep 17 00:00:00 2001 From: Alison Venancio Date: Tue, 13 Jun 2023 21:15:27 -0400 Subject: [PATCH] Berlin Row - Avoid fts_tp continuous wakeups Keep stay awake to avoid device suspend and additional check senser_sleep for pm suspend. Porting of https://android.googlesource.com/kernel/msm-modules/fts_touch/+/b80139cb3eb11e1fccaafeb0bf5bfb823d5ca027%5E%21/#F0 Change-Id: Ifc508aa4481f851ac3f9d1b1a5040d0d5e69ac78 Reviewed-on: https://gerrit.mot.com/2642844 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Reviewed-by: Rafael Ortolan Reviewed-by: Reviewed-by: Jichao Zou Tested-by: Jira Key Submit-Approved: Jira Key --- drivers/input/touchscreen/stmicro_mmi/fts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/stmicro_mmi/fts.c b/drivers/input/touchscreen/stmicro_mmi/fts.c index c805eaf140e9..55c00309035b 100644 --- a/drivers/input/touchscreen/stmicro_mmi/fts.c +++ b/drivers/input/touchscreen/stmicro_mmi/fts.c @@ -3639,11 +3639,12 @@ static void inline fts_resume_work(struct work_struct *work) void fts_suspend_func(struct fts_ts_info *info) { logError(1, "%s %s: enter\n", tag, __func__); - PM_WAKEUP_EVENT(info->wakesrc, jiffies_to_msecs(HZ)); + PM_STAY_AWAKE(info->wakesrc); info->resume_bit = 0; fts_mode_handler(info, 0); release_all_touches(info); info->sensor_sleep = true; + PM_RELAX(info->wakesrc); } /**