summaryrefslogtreecommitdiff
path: root/drivers/mfd/ucb1x00-ts.c
diff options
context:
space:
mode:
authorJochen Friedrich <jochen@scram.de>2011-01-30 15:40:56 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 12:41:45 +0300
commitde8c8b0683043e81d2001e446f2bcb143affb0b2 (patch)
tree732fa925ec53b0c0477a0fc923ecda4345fd0b10 /drivers/mfd/ucb1x00-ts.c
parentce5d4a435af2839771210aeda2b649f5a183b63c (diff)
downloadlinux-de8c8b0683043e81d2001e446f2bcb143affb0b2.tar.xz
mfd: Add BTN_TOUCH event to ucb1x00-ts
Add BTN_TOUCH event reporting to ucb1x00_ts touchscreen driver. This will make this touchscreen driver behave consistently wrt. BTN_TOUCH. Signed-off-by: Jochen Friedrich <jochen@scram.de> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/ucb1x00-ts.c')
-rw-r--r--drivers/mfd/ucb1x00-ts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
index 92b85e28a15e..38ffbd50a0d2 100644
--- a/drivers/mfd/ucb1x00-ts.c
+++ b/drivers/mfd/ucb1x00-ts.c
@@ -60,6 +60,7 @@ static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x
input_report_abs(idev, ABS_X, x);
input_report_abs(idev, ABS_Y, y);
input_report_abs(idev, ABS_PRESSURE, pressure);
+ input_report_key(idev, BTN_TOUCH, 1);
input_sync(idev);
}
@@ -68,6 +69,7 @@ static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
struct input_dev *idev = ts->idev;
input_report_abs(idev, ABS_PRESSURE, 0);
+ input_report_key(idev, BTN_TOUCH, 0);
input_sync(idev);
}
@@ -384,7 +386,8 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
idev->open = ucb1x00_ts_open;
idev->close = ucb1x00_ts_close;
- __set_bit(EV_ABS, idev->evbit);
+ idev->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY);
+ idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
input_set_drvdata(idev, ts);