summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-multitouch.c
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@enac.fr>2011-04-22 11:51:48 +0200
committerJiri Kosina <jkosina@suse.cz>2011-04-22 14:14:52 +0200
commit4a6ee685fbcba4a440cf86f41557752ba81e2ccf (patch)
treec3b1383b216c9b6adff73e2499d60c082e44f9aa /drivers/hid/hid-multitouch.c
parent6ab3a9a63fc16b04f7de48eb0190d516dd7574df (diff)
downloadlinux-3.10-4a6ee685fbcba4a440cf86f41557752ba81e2ccf.tar.gz
linux-3.10-4a6ee685fbcba4a440cf86f41557752ba81e2ccf.tar.bz2
linux-3.10-4a6ee685fbcba4a440cf86f41557752ba81e2ccf.zip
HID: hid-multitouch: merge hid-mosart into hid-multitouch
This patch include MosArt devices into hid-multitouch. MosArt devices now support mt-protocol B. We also need to introduce a new quirk for mosart devices to support their contactID. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-multitouch.c')
-rw-r--r--drivers/hid/hid-multitouch.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 51b5d272458..bf46804670c 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -50,6 +50,7 @@ MODULE_LICENSE("GPL");
#define MT_QUIRK_VALID_IS_INRANGE (1 << 4)
#define MT_QUIRK_VALID_IS_CONFIDENCE (1 << 5)
#define MT_QUIRK_EGALAX_XYZ_FIXUP (1 << 6)
+#define MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE (1 << 7)
struct mt_slot {
__s32 x, y, p, w, h;
@@ -90,6 +91,7 @@ struct mt_class {
#define MT_CLS_STANTUM 6
#define MT_CLS_3M 7
#define MT_CLS_CONFIDENCE 8
+#define MT_CLS_CONFIDENCE_MINUS_ONE 9
#define MT_DEFAULT_MAXCONTACT 10
@@ -140,7 +142,9 @@ struct mt_class mt_classes[] = {
.quirks = MT_QUIRK_NOT_SEEN_MEANS_UP |
MT_QUIRK_CYPRESS,
.maxcontacts = 10 },
-
+ { .name = MT_CLS_CONFIDENCE_MINUS_ONE,
+ .quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
+ MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE },
{ .name = MT_CLS_EGALAX,
.quirks = MT_QUIRK_SLOT_IS_CONTACTID |
MT_QUIRK_VALID_IS_INRANGE |
@@ -325,6 +329,9 @@ static int mt_compute_slot(struct mt_device *td)
if (quirks & MT_QUIRK_SLOT_IS_CONTACTNUMBER)
return td->num_received;
+ if (quirks & MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE)
+ return td->curdata.contactid - 1;
+
return find_slot_from_contactid(td);
}
@@ -587,6 +594,17 @@ static const struct hid_device_id mt_devices[] = {
HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
+ /* MosArt panels */
+ { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
+ HID_USB_DEVICE(USB_VENDOR_ID_ASUS,
+ USB_DEVICE_ID_ASUS_T91MT)},
+ { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
+ HID_USB_DEVICE(USB_VENDOR_ID_ASUS,
+ USB_DEVICE_ID_ASUSTEK_MULTITOUCH_YFO) },
+ { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
+ HID_USB_DEVICE(USB_VENDOR_ID_TURBOX,
+ USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },
+
/* PenMount panels */
{ .driver_data = MT_CLS_CONFIDENCE,
HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,