summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2022-12-11 18:49:23 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2022-12-11 18:49:23 -0800
commit3a47a82a5c1e1dfb65394e32f1b6f8b0a9d85813 (patch)
tree165e6d41f0a771decfa68b6570b35a524ad14e29
parent14290796313697d7457758d70f8f10d961a2cd3d (diff)
parent0bc000489400f8f96bf08cb60ed6e1d684a46c2c (diff)
downloadnovatek_touch-3a47a82a5c1e1dfb65394e32f1b6f8b0a9d85813.tar.gz
Merge android13-gs-pixel-5.10-tm-qpr2 into android13-gs-pixel-5.10-tm-qpr3
SBMerger: 478053055 Change-Id: I1589950635443525acc9752272e7c06889975ecf Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--nt36xxx/nt36xxx.c13
-rw-r--r--nt36xxx/nt36xxx.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/nt36xxx/nt36xxx.c b/nt36xxx/nt36xxx.c
index e4811d0..47156b1 100644
--- a/nt36xxx/nt36xxx.c
+++ b/nt36xxx/nt36xxx.c
@@ -2015,10 +2015,12 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
* offload
*/
ts->pen_active = 1;
+#ifdef GOOG_TOUCH_INTERFACE
ts->pen_offload_coord.status = COORD_STATUS_PEN;
ts->pen_offload_coord.x = pen_x;
ts->pen_offload_coord.y = pen_y;
ts->pen_offload_coord.pressure = pen_pressure;
+#endif
ts->pen_offload_coord_timestamp = ts->timestamp;
input_report_abs(ts->pen_input_dev, ABS_X, pen_x);
@@ -2067,9 +2069,10 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
/* Snapshot some stylus context information for offload */
ts->pen_active = 0;
ts->pen_offload_coord_timestamp = ts->timestamp;
+#ifdef GOOG_TOUCH_INTERFACE
memset(&ts->pen_offload_coord, 0,
sizeof(ts->pen_offload_coord));
-
+#endif
input_report_abs(ts->pen_input_dev, ABS_X, 0);
input_report_abs(ts->pen_input_dev, ABS_Y, 0);
input_report_abs(ts->pen_input_dev, ABS_PRESSURE, 0);
@@ -2579,9 +2582,15 @@ static int32_t nvt_ts_probe(struct spi_device *client)
if (client->irq) {
NVT_LOG("int_trigger_type=%d\n", ts->int_trigger_type);
ts->irq_enabled = true;
+#ifdef GOOG_TOUCH_INTERFACE
ret = goog_request_threaded_irq(ts->gti, client->irq,
nvt_ts_isr, nvt_ts_work_func,
ts->int_trigger_type | IRQF_ONESHOT, NVT_SPI_NAME, ts);
+#else
+ ret = request_threaded_irq(client->irq,
+ nvt_ts_isr, nvt_ts_work_func,
+ ts->int_trigger_type | IRQF_ONESHOT, NVT_SPI_NAME, ts);
+#endif
if (ret != 0) {
NVT_ERR("request irq failed. ret=%d\n", ret);
goto err_int_request_failed;
@@ -3099,8 +3108,10 @@ int nvt_ts_suspend(struct device *dev)
ts->pen_active = 0;
ts->pen_offload_coord_timestamp = ts->timestamp;
+#ifdef GOOG_TOUCH_INTERFACE
memset(&ts->pen_offload_coord, 0,
sizeof(ts->pen_offload_coord));
+#endif
#if NVT_TOUCH_EXT_USI
nvt_usi_clear_stylus_read_map();
#endif
diff --git a/nt36xxx/nt36xxx.h b/nt36xxx/nt36xxx.h
index 5583dc1..8c43cf8 100644
--- a/nt36xxx/nt36xxx.h
+++ b/nt36xxx/nt36xxx.h
@@ -336,7 +336,9 @@ struct nvt_ts_data {
/*
* Stylus context used by touch_offload
*/
+#ifdef GOOG_TOUCH_INTERFACE
struct TouchOffloadCoord pen_offload_coord;
+#endif
ktime_t pen_offload_coord_timestamp;
u8 pen_active;
};