From 14e0d1fb0cd224dfcf33e153325ccc2a9361d490 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Wed, 10 Oct 2012 22:16:53 +0200 Subject: 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 --- drivers/input/touchscreen/stmpe-ts.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/input/touchscreen') diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c index ae88e13c99ff..5831318c4718 100644 --- a/drivers/input/touchscreen/stmpe-ts.c +++ b/drivers/input/touchscreen/stmpe-ts.c @@ -118,6 +118,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); } @@ -151,6 +152,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. */ -- cgit v1.2.3