From: Nick Dyer <nick.dyer@xxxxxxxxxxx>...
Add support for the new T100 object which replaces the previous
T9 multitouch touchscreen object in recent maXTouch devices.
T100 provides improved reporting with selectable auxiliary
information, and a type field for hover/stylus/glove reporting.
The hovering finger support was based on Chung-Yih's work in
the ChromiumOS downstream kernel:
https://chromium-review.googlesource.com/#/c/219280/
Signed-off-by: Nick Dyer <nick.dyer@xxxxxxxxxxx>
Acked-by: Yufeng Shen <miletus@xxxxxxxxxxxx>
[javier: Factor out T9 and T100 init functions and rework hover support]
Signed-off-by: Javier Martinez Canillas <javier.martinez@xxxxxxxxxxxxxxx>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 323 +++++++++++++++++++++++++++++--
1 file changed, 302 insertions(+), 21 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 95ee92a91bd2..749371761669 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1612,9 +1856,8 @@ static int mxt_initialize_t9_input_device(struct mxt_data *data)
input_dev->open = mxt_input_open;
input_dev->close = mxt_input_close;
- __set_bit(EV_ABS, input_dev->evbit);
- __set_bit(EV_KEY, input_dev->evbit);
- __set_bit(BTN_TOUCH, input_dev->keybit);
+ set_bit(EV_ABS, input_dev->evbit);
+ input_set_capability(input_dev, EV_KEY, BTN_TOUCH);