aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/ucb1400_ts.c
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2009-03-04 01:12:49 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-03-08 16:35:17 -0700
commitcd2d64b1a0a12283d63c9d853d5b1403d5cd6c9d (patch)
tree9f8f7cbe3834aeb428b93cf9c5c3fdc2f578b446 /drivers/input/touchscreen/ucb1400_ts.c
parentInput: wm97xx - use disable_irq_nosync() for Mainstone (diff)
downloadlinux-dev-cd2d64b1a0a12283d63c9d853d5b1403d5cd6c9d.tar.xz
linux-dev-cd2d64b1a0a12283d63c9d853d5b1403d5cd6c9d.zip
Input: ucb1400_ts, mainstone-wm97xx - add BTN_TOUCH events
Add BTN_TOUCH event reporting to ucb1400_ts and accelerated mainstone-wm97xx touchscreen drivers. Together with previously posted similar patch for wm97xx-core this will make all touchscreen drivers behave consistently wrt. BTN_TOUCH. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen/ucb1400_ts.c')
-rw-r--r--drivers/input/touchscreen/ucb1400_ts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index 54986627def0..e868264fe799 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -151,12 +151,14 @@ static void ucb1400_ts_evt_add(struct input_dev *idev, u16 pressure, u16 x, u16
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);
}
static void ucb1400_ts_event_release(struct input_dev *idev)
{
input_report_abs(idev, ABS_PRESSURE, 0);
+ input_report_key(idev, BTN_TOUCH, 0);
input_sync(idev);
}
@@ -377,7 +379,8 @@ static int ucb1400_ts_probe(struct platform_device *dev)
ucb->ts_idev->id.product = ucb->id;
ucb->ts_idev->open = ucb1400_ts_open;
ucb->ts_idev->close = ucb1400_ts_close;
- ucb->ts_idev->evbit[0] = BIT_MASK(EV_ABS);
+ ucb->ts_idev->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY);
+ ucb->ts_idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
ucb1400_adc_enable(ucb->ac97);
x_res = ucb1400_ts_read_xres(ucb);