aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorXianhan Yu <aroundight77@gmail.com>2012-09-27 22:18:59 -0400
committerJiri Kosina <jkosina@suse.cz>2012-10-01 04:15:02 -0400
commitf5ff4e1e62408327d27fb1e1ab00e96a52b7cd46 (patch)
tree2af7fbdef117f60e768b0016fbdb4db5b07008a1 /drivers
parentdfeefd108ab2ae2975abb126be7cef449a691e9e (diff)
HID: multitouch: add support for GeneralTouch multi-touchscreen
Fix the touch-up no response problem on GeneralTouch twofingers touchscreen and modify the driver for new GeneralTouch PWT touchscreen. Signed-off-by: Xianhan Yu <aroundight77@gmail.com> Reviewed-by Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-ids.h1
-rw-r--r--drivers/hid/hid-multitouch.c18
2 files changed, 18 insertions, 1 deletions
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 5f68149c2f7e..54e15c47b405 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -309,6 +309,7 @@
309 309
310#define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc 310#define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc
311#define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0003 311#define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0003
312#define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS 0x0100
312 313
313#define USB_VENDOR_ID_GLAB 0x06c2 314#define USB_VENDOR_ID_GLAB 0x06c2
314#define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038 315#define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index e170112e2b84..9f3c5bf4dde3 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -115,6 +115,8 @@ struct mt_device {
115#define MT_CLS_EGALAX_SERIAL 0x0104 115#define MT_CLS_EGALAX_SERIAL 0x0104
116#define MT_CLS_TOPSEED 0x0105 116#define MT_CLS_TOPSEED 0x0105
117#define MT_CLS_PANASONIC 0x0106 117#define MT_CLS_PANASONIC 0x0106
118#define MT_CLS_GENERALTOUCH_TWOFINGERS 0x0107
119#define MT_CLS_GENERALTOUCH_PWT_TENFINGERS 0x0108
118 120
119#define MT_DEFAULT_MAXCONTACT 10 121#define MT_DEFAULT_MAXCONTACT 10
120 122
@@ -215,6 +217,17 @@ static struct mt_class mt_classes[] = {
215 { .name = MT_CLS_PANASONIC, 217 { .name = MT_CLS_PANASONIC,
216 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP, 218 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP,
217 .maxcontacts = 4 }, 219 .maxcontacts = 4 },
220 { .name = MT_CLS_GENERALTOUCH_TWOFINGERS,
221 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP |
222 MT_QUIRK_VALID_IS_INRANGE |
223 MT_QUIRK_SLOT_IS_CONTACTNUMBER,
224 .maxcontacts = 2
225 },
226 { .name = MT_CLS_GENERALTOUCH_PWT_TENFINGERS,
227 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP |
228 MT_QUIRK_SLOT_IS_CONTACTNUMBER,
229 .maxcontacts = 10
230 },
218 231
219 { } 232 { }
220}; 233};
@@ -929,9 +942,12 @@ static const struct hid_device_id mt_devices[] = {
929 USB_DEVICE_ID_ELO_TS2515) }, 942 USB_DEVICE_ID_ELO_TS2515) },
930 943
931 /* GeneralTouch panel */ 944 /* GeneralTouch panel */
932 { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, 945 { .driver_data = MT_CLS_GENERALTOUCH_TWOFINGERS,
933 MT_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 946 MT_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH,
934 USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) }, 947 USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) },
948 { .driver_data = MT_CLS_GENERALTOUCH_PWT_TENFINGERS,
949 MT_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH,
950 USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS) },
935 951
936 /* Gametel game controller */ 952 /* Gametel game controller */
937 { .driver_data = MT_CLS_DEFAULT, 953 { .driver_data = MT_CLS_DEFAULT,