summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-10-10 22:16:53 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2014-04-02 15:20:04 +0200
commitd41e5d7891eb8b501e4690fea1e31974d445af2b (patch)
tree612c4350ee0f9e7b47be531a2efa7a71d7d7b007
parent816f26b3411b447e6637fa36bbd50b4bc720f417 (diff)
input: stmpe-ts: add BTN_TOUCH events
Add BTN_TOUCH event reporting to stmpe-ts touchscreen driver. This will make this touchscreen driver behave consistently wrt. BTN_TOUCH. cd2d64b1a0a12283d63c9d853d5b1403d5cd6c9d 65db86ac07e2f7f91a552490c0be6a99aab8e4a8
-rw-r--r--drivers/input/touchscreen/stmpe-ts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
index 215a1bd92c9e..15a4794204cf 100644
--- a/drivers/input/touchscreen/stmpe-ts.c
+++ b/drivers/input/touchscreen/stmpe-ts.c
@@ -107,6 +107,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);
}
@@ -140,6 +141,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, (z != 0));
input_sync(ts->idev);
/* flush the FIFO after we have read out our values. */