Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jochen Friedrich and committed by
Samuel Ortiz
de8c8b06 ce5d4a43

+4 -1
+4 -1
drivers/mfd/ucb1x00-ts.c
··· 60 60 input_report_abs(idev, ABS_X, x); 61 61 input_report_abs(idev, ABS_Y, y); 62 62 input_report_abs(idev, ABS_PRESSURE, pressure); 63 + input_report_key(idev, BTN_TOUCH, 1); 63 64 input_sync(idev); 64 65 } 65 66 ··· 69 68 struct input_dev *idev = ts->idev; 70 69 71 70 input_report_abs(idev, ABS_PRESSURE, 0); 71 + input_report_key(idev, BTN_TOUCH, 0); 72 72 input_sync(idev); 73 73 } 74 74 ··· 386 384 idev->open = ucb1x00_ts_open; 387 385 idev->close = ucb1x00_ts_close; 388 386 389 - __set_bit(EV_ABS, idev->evbit); 387 + idev->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY); 388 + idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); 390 389 391 390 input_set_drvdata(idev, ts); 392 391