summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Semwal <sumit.semwal@linaro.org>2020-05-06 18:03:12 +0530
committerSumit Semwal <sumit.semwal@linaro.org>2021-05-26 23:27:12 +0530
commit4a397daaa883b9777caeebc965a4b3478ca1b4a4 (patch)
tree1e957ead5ab7512c92621d79d5ecc691e8840f2d
parentea27c1dfa7b7cb83288e6104cb88622074f0e2aa (diff)
input: touchscreen: add stm driver from downstream.
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Change-Id: Ia8ee30d1878fca677d4a026594db4c8bb10e469c
-rw-r--r--drivers/input/touchscreen/Kconfig1
-rw-r--r--drivers/input/touchscreen/Makefile1
-rw-r--r--drivers/input/touchscreen/stm/ftm4_ts.c2
-rw-r--r--drivers/input/touchscreen/stm/fts.c14
4 files changed, 11 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index ad454cd2855a..6561aeced7c4 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -11,6 +11,7 @@ menuconfig INPUT_TOUCHSCREEN
If unsure, say Y.
if INPUT_TOUCHSCREEN
+source "drivers/input/touchscreen/stm/Kconfig"
config TOUCHSCREEN_88PM860X
tristate "Marvell 88PM860x touchscreen"
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
index 7d34100f7f22..bd509bb78c61 100644
--- a/drivers/input/touchscreen/Makefile
+++ b/drivers/input/touchscreen/Makefile
@@ -114,3 +114,4 @@ obj-$(CONFIG_TOUCHSCREEN_ROHM_BU21023) += rohm_bu21023.o
obj-$(CONFIG_TOUCHSCREEN_RASPBERRYPI_FW) += raspberrypi-ts.o
obj-$(CONFIG_TOUCHSCREEN_IQS5XX) += iqs5xx.o
obj-$(CONFIG_TOUCHSCREEN_ZINITIX) += zinitix.o
+obj-$(CONFIG_TOUCHSCREEN_FTM4) += stm/
diff --git a/drivers/input/touchscreen/stm/ftm4_ts.c b/drivers/input/touchscreen/stm/ftm4_ts.c
index d5a9f948d1ae..2d7f244a8974 100644
--- a/drivers/input/touchscreen/stm/ftm4_ts.c
+++ b/drivers/input/touchscreen/stm/ftm4_ts.c
@@ -2252,7 +2252,7 @@ static struct i2c_driver fts_i2c_driver = {
.probe = fts_probe,
.remove = fts_remove,
.shutdown = fts_shutdown,
-#if (!defined(CONFIG_FB))
+#if 0 // (!defined(CONFIG_FB))
.suspend = fts_suspend,
.resume = fts_resume,
#endif
diff --git a/drivers/input/touchscreen/stm/fts.c b/drivers/input/touchscreen/stm/fts.c
index 0d0ce4165d77..96de1a8daa78 100644
--- a/drivers/input/touchscreen/stm/fts.c
+++ b/drivers/input/touchscreen/stm/fts.c
@@ -1492,6 +1492,7 @@ static void touchsim_work(struct work_struct *work)
struct fts_ts_info *info = container_of(touchsim,
struct fts_ts_info,
touchsim);
+
/* prevent CPU from entering deep sleep */
cpu_latency_qos_update_request(&info->pm_qos_req, 100);
@@ -2470,7 +2471,6 @@ static bool fts_enter_pointer_event_handler(struct fts_ts_info *info, unsigned
unsigned int touch_condition = 1, tool = MT_TOOL_FINGER;
int x, y, z, major, minor, distance;
u8 touchType;
-
if (!info->resume_bit)
goto no_report;
@@ -2547,8 +2547,8 @@ static bool fts_enter_pointer_event_handler(struct fts_ts_info *info, unsigned
input_report_key(info->input_dev, BTN_TOUCH, touch_condition);
input_mt_report_slot_state(info->input_dev, tool, 1);
- /* pr_info("%s : TouchID = %d,Touchcount = %d\n", __func__,
- * touchId,touchcount); */
+printk("%s : TouchID = %d,Touchcondition = %d\n", __func__,
+ touchId,touch_condition);
input_report_abs(info->input_dev, ABS_MT_POSITION_X, x);
input_report_abs(info->input_dev, ABS_MT_POSITION_Y, y);
@@ -3186,6 +3186,7 @@ static irqreturn_t fts_interrupt_handler(int irq, void *handle)
const unsigned char EVENTS_REMAINING_MASK = 0x1F;
unsigned char events_remaining = 0;
unsigned char *evt_data;
+printk("SS: %s\n", __func__);
/* It is possible that interrupts were disabled while the handler is
* executing, before acquiring the mutex. If so, simply return.
@@ -4407,7 +4408,7 @@ static int fts_probe(struct spi_device *client)
pr_info("SET Event Handler:\n");
- info->wakesrc = wakeup_source_create("fts_tp");
+ info->wakesrc = wakeup_source_register(info->dev, "fts_tp");
info->event_wq = alloc_workqueue("fts-event-queue", WQ_UNBOUND |
WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);
if (!info->event_wq) {
@@ -4603,6 +4604,7 @@ static int fts_probe(struct spi_device *client)
msecs_to_jiffies(EXP_FN_WORK_DELAY_MS));
#endif
+fts_interrupt_install(info);
info->touchsim.wq = alloc_workqueue("fts-heatmap_test-queue",
WQ_UNBOUND | WQ_HIGHPRI |
WQ_CPU_INTENSIVE, 1);
@@ -4634,7 +4636,7 @@ ProbeErrorExit_5:
ProbeErrorExit_4:
/* destroy_workqueue(info->fwu_workqueue); */
- wakeup_source_destroy(info->wakesrc);
+ wakeup_source_unregister(info->wakesrc);
fts_enable_reg(info, false);
@@ -4691,7 +4693,7 @@ static int fts_remove(struct spi_device *client)
/* Remove the work thread */
destroy_workqueue(info->event_wq);
- wakeup_source_destroy(info->wakesrc);
+ wakeup_source_unregister(info->wakesrc);
if(info->touchsim.wq)
destroy_workqueue(info->touchsim.wq);