summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidycchen <davidycchen@google.com>2023-02-16 11:43:58 +0800
committerYen-Chao Chen <davidycchen@google.com>2023-02-16 06:39:35 +0000
commitec704d88933c0e36331536386a722abbf2cfa5ba (patch)
treeaa8e7c6b3e863c22e28c91413ac6ed7d880a988a
parenta5c8c0e31d3ceb82251672c34fe9bdb57ac8597c (diff)
downloadcommon-ec704d88933c0e36331536386a722abbf2cfa5ba.tar.gz
gti: remove ignore_screenoff_heatmap
Remove ignore_screenoff_heatmap because the use case is covered by pm.state and pm.lock. Bug: 242559052 Test: build pass. Change-Id: I8fbb1c98caf4c310f4e6dfcb74eecd0bc0aefb87 Signed-off-by: davidycchen <davidycchen@google.com>
-rw-r--r--goog_touch_interface.c29
-rw-r--r--goog_touch_interface.h2
2 files changed, 8 insertions, 23 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c
index dd7ee47..553ffb4 100644
--- a/goog_touch_interface.c
+++ b/goog_touch_interface.c
@@ -1413,24 +1413,13 @@ static int goog_precheck_heatmap(struct goog_touch_interface *gti)
{
int ret = 0;
- if (gti->display_state == GTI_DISPLAY_STATE_OFF) {
- /*
- * Ignore request on heatamp if project correlates closely with
- * display for touch scanning or I/O transaction.
- */
- if (gti->ignore_screenoff_heatmap) {
- GOOG_WARN(gti, "N/A for screen-off!\n");
- ret = -ENODATA;
- }
-
- /*
- * Check the PM wakelock state for bus ownership before data
- * request.
- */
- if (!goog_pm_wake_get_locks(gti)) {
- GOOG_WARN(gti, "N/A during inactive bus!\n");
- ret = -ENODATA;
- }
+ /*
+ * Check the PM wakelock state and pm state for bus ownership before
+ * data request.
+ */
+ if (!goog_pm_wake_get_locks(gti) || gti->pm.state == GTI_PM_SUSPEND) {
+ GOOG_WARN(gti, "N/A during inactive bus!\n");
+ ret = -ENODATA;
}
return ret;
@@ -2718,8 +2707,6 @@ void goog_init_options(struct goog_touch_interface *gti,
struct device_node *np = gti->vendor_dev->of_node;
gti->ignore_force_active = of_property_read_bool(np, "goog,ignore-force-active");
- gti->ignore_screenoff_heatmap =
- of_property_read_bool(np, "goog,ignore-screenoff-heatmap");
}
/* Initialize default functions. */
@@ -2979,7 +2966,6 @@ static void goog_pm_resume(struct gti_pm *pm)
GOOG_WARN(gti, "GTI already resumed!\n");
return;
}
- pm->state = GTI_PM_RESUME;
pm_stay_awake(gti->dev);
@@ -2994,6 +2980,7 @@ static void goog_pm_resume(struct gti_pm *pm)
pm->resume(gti->vendor_dev);
gti->context_changed.screen_state = 1;
+ pm->state = GTI_PM_RESUME;
}
void goog_pm_state_update_work(struct work_struct *work) {
diff --git a/goog_touch_interface.h b/goog_touch_interface.h
index 19f0761..d6c1205 100644
--- a/goog_touch_interface.h
+++ b/goog_touch_interface.h
@@ -571,7 +571,6 @@ struct gti_pm {
* @default_palm_enabled: the palm default setting.
* @lptw_triggered: LPTW is triggered or not.
* @ignore_force_active: Ignore the force_active sysfs request.
- * @ignore_screenoff_heatmap: Ignore the heatmap request during screen-off.
* @offload_id: id that used by touch offload.
* @heatmap_buf: heatmap buffer that used by v4l2.
* @heatmap_buf_size: heatmap buffer size that used by v4l2.
@@ -645,7 +644,6 @@ struct goog_touch_interface {
bool default_palm_enabled;
bool lptw_triggered;
bool ignore_force_active;
- bool ignore_screenoff_heatmap;
union {
u8 offload_id_byte[4];
u32 offload_id;