Skip to contentSkip to conversation

input:stmpe-ts: Add support to report BTN_TOUCH event

PATCH New Vipul Kumar Samar 4 participants 4 messages Dec 13, 2012 – Dec 17, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input:stmpe-ts: Add support to report BTN_TOUCH event

stmpe touchscreen supports BTN_TOUCH event but doesn't report it. Add BTN_TOUCH reporting capability to the stmpe touchscreen driver.

---
 drivers/input/touchscreen/stmpe-ts.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/input/touchscreen/stmpe-ts.c +2 -0
index 076442a..c3399a1 100644
@@ -121,6 +121,7 @@ static void stmpe_work(struct work_struct *work)
 	__stmpe_reset_fifo(ts->stmpe);
 
 	input_report_abs(ts->idev, ABS_PRESSURE, 0);
+	input_report_key(ts->idev, BTN_TOUCH, 0);
 	input_sync(ts->idev);
 }
 
@@ -154,6 +155,7 @@ static irqreturn_t stmpe_ts_handler(int irq, void *data)
 	input_report_abs(ts->idev, ABS_X, x);
 	input_report_abs(ts->idev, ABS_Y, y);
 	input_report_abs(ts->idev, ABS_PRESSURE, z);
+	input_report_key(ts->idev, BTN_TOUCH, 1);
 	input_sync(ts->idev);
 
        /* flush the FIFO after we have read out our values. */
Signature · 1 line
1.7.2.2
#1 lore raw

PATCH 1/1 input:stmpe-ts: Add support to report BTN_TOUCH event

Quoted 21 lines · Vipul Kumar Samar

stmpe touchscreen supports BTN_TOUCH event but doesn't report it. Add BTN_TOUCH reporting capability to the stmpe touchscreen driver.

---
 drivers/input/touchscreen/stmpe-ts.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/input/touchscreen/stmpe-ts.c +1 -0
index 076442a..c3399a1 100644
@@ -121,6 +121,7 @@ static void stmpe_work(struct work_struct *work)
        __stmpe_reset_fifo(ts->stmpe);
 
        input_report_abs(ts->idev, ABS_PRESSURE, 0);
+       input_report_key(ts->idev, BTN_TOUCH, 0);
        input_sync(ts->idev);
 }
 

drivers/input/touchscreen/stmpe-ts.c static irqreturn_t stmpe_ts_handler(int irq, void *data) · line 161

Quoted 7 lines
drivers/input/touchscreen/stmpe-ts.c +1 -0
@@ -154,6 +155,7 @@ static irqreturn_t stmpe_ts_handler(int irq, void *data)
        input_report_abs(ts->idev, ABS_X, x);
        input_report_abs(ts->idev, ABS_Y, y);
        input_report_abs(ts->idev, ABS_PRESSURE, z);
+       input_report_key(ts->idev, BTN_TOUCH, 1);
        input_sync(ts->idev);
 
        /* flush the FIFO after we have read out our values. */
#2 lore raw

PATCH 1/1 input:stmpe-ts: Add support to report BTN_TOUCH event

In reply to Vipul Kumar Samar
Quoted 30 lines · Vipul Kumar Samar

stmpe touchscreen supports BTN_TOUCH event but doesn't report it. Add BTN_TOUCH reporting capability to the stmpe touchscreen driver.

---
 drivers/input/touchscreen/stmpe-ts.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/input/touchscreen/stmpe-ts.c +2 -0
index 076442a..c3399a1 100644
@@ -121,6 +121,7 @@ static void stmpe_work(struct work_struct *work)
 	__stmpe_reset_fifo(ts->stmpe);
 
 	input_report_abs(ts->idev, ABS_PRESSURE, 0);
+	input_report_key(ts->idev, BTN_TOUCH, 0);
 	input_sync(ts->idev);
 }
 
@@ -154,6 +155,7 @@ static irqreturn_t stmpe_ts_handler(int irq, void *data)
 	input_report_abs(ts->idev, ABS_X, x);
 	input_report_abs(ts->idev, ABS_Y, y);
 	input_report_abs(ts->idev, ABS_PRESSURE, z);
+	input_report_key(ts->idev, BTN_TOUCH, 1);
 	input_sync(ts->idev);
 
        /* flush the FIFO after we have read out our values. */
Signature · 1 line
1.7.2.2

So long as it's tested/working, the code looks fine so:

Signature · 4 lines
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer Applied
#3 lore raw

PATCH 1/1 input:stmpe-ts: Add support to report BTN_TOUCH event

Quoted 29 lines · Lee Jones
Quoted 27 lines · Vipul Kumar Samar

stmpe touchscreen supports BTN_TOUCH event but doesn't report it. Add BTN_TOUCH reporting capability to the stmpe touchscreen driver.

---
 drivers/input/touchscreen/stmpe-ts.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/input/touchscreen/stmpe-ts.c +2 -0
index 076442a..c3399a1 100644
@@ -121,6 +121,7 @@ static void stmpe_work(struct work_struct *work)
 	__stmpe_reset_fifo(ts->stmpe);
 
 	input_report_abs(ts->idev, ABS_PRESSURE, 0);
+	input_report_key(ts->idev, BTN_TOUCH, 0);
 	input_sync(ts->idev);
 }
 
@@ -154,6 +155,7 @@ static irqreturn_t stmpe_ts_handler(int irq, void *data)
 	input_report_abs(ts->idev, ABS_X, x);
 	input_report_abs(ts->idev, ABS_Y, y);
 	input_report_abs(ts->idev, ABS_PRESSURE, z);
+	input_report_key(ts->idev, BTN_TOUCH, 1);
 	input_sync(ts->idev);
 
Quoted 7 lines
Quoted 3 lines
drivers/input/touchscreen/stmpe-ts.c +0 -0
        /* flush the FIFO after we have read out our values. */
Signature · 1 line
1.7.2.2

So long as it's tested/working, the code looks fine so:

Applied, thank you.

Signature · 1 line
Dmitry