diff options
author | Ravi Jain <raviajain@google.com> | 2022-12-01 15:41:16 +0800 |
---|---|---|
committer | Ravi Jain <raviajain@google.com> | 2022-12-06 08:36:40 +0000 |
commit | a5637a3f0013729b6952ca7eae088bf11891e4ed (patch) | |
tree | f30ce1c58f91030323622f8fd4ec1fa7a24f002b /goog_touch_interface.c | |
parent | 5ff99ff71487f82c54daaa781f807b97e42a30a9 (diff) | |
download | common-a5637a3f0013729b6952ca7eae088bf11891e4ed.tar.gz |
touch: gti: Fix spi write error.
Fix errors caused by offload_report when device is going to suspend.
Test: Flashed on L10 to check suspend/resume operations
Bug: 260946570
Change-Id: I9460c7f4a8656abfd90aea0b0db015a236a2cd06
Signed-off-by: Ravi Jain <raviajain@google.com>
Diffstat (limited to 'goog_touch_interface.c')
-rw-r--r-- | goog_touch_interface.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c index 1dad2f8..70890a3 100644 --- a/goog_touch_interface.c +++ b/goog_touch_interface.c @@ -1905,6 +1905,7 @@ void goog_offload_input_report(void *handle, bool touch_down = 0; unsigned int tool_type = MT_TOOL_FINGER; int i; + int error; unsigned long slot_bit_active = 0; ATRACE_BEGIN(__func__); @@ -1958,8 +1959,16 @@ void goog_offload_input_report(void *handle, if (touch_down) goog_v4l2_read(gti, report->timestamp); + error = goog_pm_wake_lock(gti, GTI_PM_WAKELOCK_TYPE_OFFLOAD_REPORT, true); + if (error < 0) { + GOOG_WARN("Error while obtaining OFFLOAD_REPORT wakelock: %d!\n", error); + ATRACE_END(); + return; + } goog_update_motion_filter(gti, slot_bit_active); - + error = goog_pm_wake_unlock(gti, GTI_PM_WAKELOCK_TYPE_OFFLOAD_REPORT); + if (error < 0) + GOOG_WARN("Error while releasing OFFLOAD_REPORT wakelock: %d!\n", error); ATRACE_END(); } |