summaryrefslogtreecommitdiff
path: root/goodix_ts_core.c
diff options
context:
space:
mode:
authorRobin Peng <robinpeng@google.com>2022-10-27 03:36:01 +0000
committerRobin Peng <robinpeng@google.com>2022-10-27 04:13:38 +0000
commitff572f1246664c83a22053b0c077f4440864da0d (patch)
tree601f07b18110bcab88f57c4acabf3281f1a4ba31 /goodix_ts_core.c
parent29e2ff70ca2ff4ef31705741e6033f212ea2162c (diff)
parent34930eb579c844a2ecba6c9e54d72907359beb4e (diff)
downloadgoodix_touch-ff572f1246664c83a22053b0c077f4440864da0d.tar.gz
Merge android13-gs-pixel-5.10-tm-qpr1 into android13-gs-pixel-5.10-tm-qpr2
Bug: 255246572 Change-Id: I386fa3d0252cf608f7caa344a580c1af61e13404 Signed-off-by: Robin Peng <robinpeng@google.com>
Diffstat (limited to 'goodix_ts_core.c')
-rw-r--r--goodix_ts_core.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/goodix_ts_core.c b/goodix_ts_core.c
index a7a0470..d2888c5 100644
--- a/goodix_ts_core.c
+++ b/goodix_ts_core.c
@@ -19,6 +19,7 @@
#include <linux/seq_file.h>
#include <linux/uaccess.h>
#include <linux/version.h>
+#include <drm/drm_panel.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
#include <linux/input/mt.h>
@@ -1752,7 +1753,7 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data)
struct goodix_ts_esd *ts_esd = &core_data->ts_esd;
int ret;
-#if IS_ENABLED(CONFIG_GTI_PM)
+#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) && IS_ENABLED(CONFIG_GTI_PM)
goog_pm_wake_lock(core_data->gti, GTI_PM_WAKELOCK_TYPE_IRQ, true);
#endif
@@ -1767,7 +1768,7 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data)
ret = ext_module->funcs->irq_event(core_data, ext_module);
if (ret == EVT_CANCEL_IRQEVT) {
mutex_unlock(&goodix_modules.mutex);
-#if IS_ENABLED(CONFIG_GTI_PM)
+#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) && IS_ENABLED(CONFIG_GTI_PM)
goog_pm_wake_unlock(core_data->gti, GTI_PM_WAKELOCK_TYPE_IRQ);
#endif
return IRQ_HANDLED;
@@ -1806,7 +1807,7 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data)
hw_ops->after_event_handler(core_data);
}
-#if IS_ENABLED(CONFIG_GTI_PM)
+#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) && IS_ENABLED(CONFIG_GTI_PM)
goog_pm_wake_unlock(core_data->gti, GTI_PM_WAKELOCK_TYPE_IRQ);
#endif
@@ -2042,6 +2043,7 @@ static int goodix_ts_input_dev_config(struct goodix_ts_core *core_data)
input_dev->name = GOODIX_CORE_DRIVER_NAME;
input_dev->phys = GOOIDX_INPUT_PHYS;
+ input_dev->uniq = "goodix_ts";
input_dev->id.product = 0xDEAD;
input_dev->id.vendor = 0xBEEF;
input_dev->id.version = 10427;
@@ -2102,6 +2104,8 @@ static int goodix_ts_pen_dev_config(struct goodix_ts_core *core_data)
input_set_drvdata(pen_dev, core_data);
pen_dev->name = GOODIX_PEN_DRIVER_NAME;
+ pen_dev->phys = "goodix_ts,pen/input0";
+ pen_dev->uniq = "goodix_ts,pen";
pen_dev->id.product = 0xDEAD;
pen_dev->id.vendor = 0xBEEF;
pen_dev->id.version = 10427;
@@ -2708,7 +2712,7 @@ int goodix_ts_stage2_init(struct goodix_ts_core *cd)
cd->apis_data.hardware_reset = hardware_reset;
cd->apis_data.set_scan_mode = set_scan_mode;
cd->apis_data.set_sensing_enabled = set_sensing_enabled;
-#if IS_ENABLED(CONFIG_GTI_PM)
+#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) && IS_ENABLED(CONFIG_GTI_PM)
cd->apis_data.get_wake_lock_state = get_wake_lock_state;
cd->apis_data.set_wake_lock_state = set_wake_lock_state;
#endif
@@ -2737,7 +2741,7 @@ int goodix_ts_stage2_init(struct goodix_ts_core *cd)
if (options == NULL) {
ts_err("Failed to alloc gti options\n");
ret = -ENOMEM;
- goto err_init_tpm;
+ goto err_alloc_gti_options;
}
options->get_mutual_sensor_data = get_mutual_sensor_data;
options->get_self_sensor_data = get_self_sensor_data;
@@ -2759,7 +2763,7 @@ int goodix_ts_stage2_init(struct goodix_ts_core *cd)
#if IS_ENABLED(CONFIG_GTI_PM)
ret = goog_pm_register_notification(cd->gti, &dev_pm_ops);
if (ret < 0) {
- ts_info("Failed to egister gti pm");
+ ts_info("Failed to register gti pm");
goto err_init_tpm;
}
#endif
@@ -2852,10 +2856,13 @@ err_init_gesture:
err_init_esd:
goodix_ts_procfs_exit(cd);
err_init_procfs:
+#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE)
#if IS_ENABLED(CONFIG_GTI_PM)
goog_pm_unregister_notification(cd->gti);
err_init_tpm:
#endif
+err_alloc_gti_options:
+#endif
destroy_workqueue(cd->event_wq);
err_alloc_workqueue:
touch_apis_deinit(&cd->pdev->dev);