summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidycchen <davidycchen@google.com>2022-11-16 14:02:15 +0800
committerTreeHugger Robot <treehugger-gerrit@google.com>2022-11-16 09:32:20 +0000
commit5184f622e9a317b460b28bad2502cd8d733ab9c9 (patch)
tree2ea65c314afa9b79ec775008d857490f0fef731c
parente778f6572f172efa93470aa05c7ab730a63be440 (diff)
downloadfts_touch-5184f622e9a317b460b28bad2502cd8d733ab9c9.tar.gz
ftm5: add wakelock for firmware updating by command.
Bug: 259118847 Test: trigger firmware update by command. Signed-off-by: davidycchen <davidycchen@google.com> Change-Id: Ie6959a48560a0e52936d79f02c49606e48e22274
-rw-r--r--ftm5/fts.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ftm5/fts.c b/ftm5/fts.c
index 8f148ee..c7f666a 100644
--- a/ftm5/fts.c
+++ b/ftm5/fts.c
@@ -220,6 +220,9 @@ static ssize_t fwupdate_store(struct device *dev,
dev_info(dev, "%s: file = %s, force = %d, keep_cx = %d\n", __func__,
path, force, keep_cx);
+#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE)
+ goog_pm_wake_lock(info->gti, GTI_PM_WAKELOCK_TYPE_FW_UPDATE, false);
+#endif
if (info->sensor_sleep)
ret = ERROR_BUS_WR;
else {
@@ -243,6 +246,10 @@ static ssize_t fwupdate_store(struct device *dev,
info->fwupdate_stat = ret;
+#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE)
+ goog_pm_wake_unlock(info->gti, GTI_PM_WAKELOCK_TYPE_FW_UPDATE);
+#endif
+
if (ret == ERROR_BUS_WR)
dev_err(dev, "%s: bus is not accessible. ERROR %08X\n",
__func__, ret);