diff options
author | Stephane Chatty <chatty@lii-enac.fr> | 2011-09-17 16:27:30 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-20 09:14:30 -0400 |
commit | a062cc5a76fa1d12f0821e56e3746cad2dc2fc65 (patch) | |
tree | 633b11a13257e15f6fdc44d4e8800a023a6a406f /drivers | |
parent | c50bb1a4005630f47b5da26336f74a485033a515 (diff) |
HID: hid-multitouch: add support for the IDEACOM 6650 chip
The IDEACOM 6650 multitouch chip, present in various all-in-one computers,
uses the serial version of the HID multitouch protocol. No existing class
supports this.
In principle, the new MT_CLS_SERIAL should work for other
serial panels as well, perhaps including some eGalax panels.
Signed-off-by: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 3 | ||||
-rw-r--r-- | drivers/hid/hid-multitouch.c | 31 |
3 files changed, 25 insertions, 10 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 11b3b39401ee..956f84968fa4 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1388,6 +1388,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
1388 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, | 1388 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, |
1389 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, | 1389 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, |
1390 | { HID_USB_DEVICE(USB_VENDOR_ID_HANVON, USB_DEVICE_ID_HANVON_MULTITOUCH) }, | 1390 | { HID_USB_DEVICE(USB_VENDOR_ID_HANVON, USB_DEVICE_ID_HANVON_MULTITOUCH) }, |
1391 | { HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6650) }, | ||
1391 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) }, | 1392 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) }, |
1392 | { HID_USB_DEVICE(USB_VENDOR_ID_ILITEK, USB_DEVICE_ID_ILITEK_MULTITOUCH) }, | 1393 | { HID_USB_DEVICE(USB_VENDOR_ID_ILITEK, USB_DEVICE_ID_ILITEK_MULTITOUCH) }, |
1393 | { HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS, USB_DEVICE_ID_IRTOUCH_INFRARED_USB) }, | 1394 | { HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS, USB_DEVICE_ID_IRTOUCH_INFRARED_USB) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 637e6e96a0d7..33b983413dbe 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -347,6 +347,9 @@ | |||
347 | #define USB_DEVICE_ID_UGCI_FLYING 0x0020 | 347 | #define USB_DEVICE_ID_UGCI_FLYING 0x0020 |
348 | #define USB_DEVICE_ID_UGCI_FIGHTING 0x0030 | 348 | #define USB_DEVICE_ID_UGCI_FIGHTING 0x0030 |
349 | 349 | ||
350 | #define USB_VENDOR_ID_IDEACOM 0x1cb6 | ||
351 | #define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650 | ||
352 | |||
350 | #define USB_VENDOR_ID_ILITEK 0x222a | 353 | #define USB_VENDOR_ID_ILITEK 0x222a |
351 | #define USB_DEVICE_ID_ILITEK_MULTITOUCH 0x0001 | 354 | #define USB_DEVICE_ID_ILITEK_MULTITOUCH 0x0001 |
352 | 355 | ||
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index b03a0b0e9b63..f1c909f1b239 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -47,10 +47,11 @@ MODULE_LICENSE("GPL"); | |||
47 | #define MT_QUIRK_SLOT_IS_CONTACTID (1 << 1) | 47 | #define MT_QUIRK_SLOT_IS_CONTACTID (1 << 1) |
48 | #define MT_QUIRK_CYPRESS (1 << 2) | 48 | #define MT_QUIRK_CYPRESS (1 << 2) |
49 | #define MT_QUIRK_SLOT_IS_CONTACTNUMBER (1 << 3) | 49 | #define MT_QUIRK_SLOT_IS_CONTACTNUMBER (1 << 3) |
50 | #define MT_QUIRK_VALID_IS_INRANGE (1 << 4) | 50 | #define MT_QUIRK_ALWAYS_VALID (1 << 4) |
51 | #define MT_QUIRK_VALID_IS_CONFIDENCE (1 << 5) | 51 | #define MT_QUIRK_VALID_IS_INRANGE (1 << 5) |
52 | #define MT_QUIRK_EGALAX_XYZ_FIXUP (1 << 6) | 52 | #define MT_QUIRK_VALID_IS_CONFIDENCE (1 << 6) |
53 | #define MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE (1 << 7) | 53 | #define MT_QUIRK_EGALAX_XYZ_FIXUP (1 << 7) |
54 | #define MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE (1 << 8) | ||
54 | 55 | ||
55 | struct mt_slot { | 56 | struct mt_slot { |
56 | __s32 x, y, p, w, h; | 57 | __s32 x, y, p, w, h; |
@@ -86,11 +87,12 @@ struct mt_class { | |||
86 | /* classes of device behavior */ | 87 | /* classes of device behavior */ |
87 | #define MT_CLS_DEFAULT 0x0001 | 88 | #define MT_CLS_DEFAULT 0x0001 |
88 | 89 | ||
89 | #define MT_CLS_CONFIDENCE 0x0002 | 90 | #define MT_CLS_SERIAL 0x0002 |
90 | #define MT_CLS_CONFIDENCE_MINUS_ONE 0x0003 | 91 | #define MT_CLS_CONFIDENCE 0x0003 |
91 | #define MT_CLS_DUAL_INRANGE_CONTACTID 0x0004 | 92 | #define MT_CLS_CONFIDENCE_MINUS_ONE 0x0004 |
92 | #define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 0x0005 | 93 | #define MT_CLS_DUAL_INRANGE_CONTACTID 0x0005 |
93 | #define MT_CLS_DUAL_NSMU_CONTACTID 0x0006 | 94 | #define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 0x0006 |
95 | #define MT_CLS_DUAL_NSMU_CONTACTID 0x0007 | ||
94 | 96 | ||
95 | /* vendor specific classes */ | 97 | /* vendor specific classes */ |
96 | #define MT_CLS_3M 0x0101 | 98 | #define MT_CLS_3M 0x0101 |
@@ -134,6 +136,8 @@ static int find_slot_from_contactid(struct mt_device *td) | |||
134 | struct mt_class mt_classes[] = { | 136 | struct mt_class mt_classes[] = { |
135 | { .name = MT_CLS_DEFAULT, | 137 | { .name = MT_CLS_DEFAULT, |
136 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP }, | 138 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP }, |
139 | { .name = MT_CLS_SERIAL, | ||
140 | .quirks = MT_QUIRK_ALWAYS_VALID}, | ||
137 | { .name = MT_CLS_CONFIDENCE, | 141 | { .name = MT_CLS_CONFIDENCE, |
138 | .quirks = MT_QUIRK_VALID_IS_CONFIDENCE }, | 142 | .quirks = MT_QUIRK_VALID_IS_CONFIDENCE }, |
139 | { .name = MT_CLS_CONFIDENCE_MINUS_ONE, | 143 | { .name = MT_CLS_CONFIDENCE_MINUS_ONE, |
@@ -445,7 +449,9 @@ static int mt_event(struct hid_device *hid, struct hid_field *field, | |||
445 | if (hid->claimed & HID_CLAIMED_INPUT && td->slots) { | 449 | if (hid->claimed & HID_CLAIMED_INPUT && td->slots) { |
446 | switch (usage->hid) { | 450 | switch (usage->hid) { |
447 | case HID_DG_INRANGE: | 451 | case HID_DG_INRANGE: |
448 | if (quirks & MT_QUIRK_VALID_IS_INRANGE) | 452 | if (quirks & MT_QUIRK_ALWAYS_VALID) |
453 | td->curvalid = true; | ||
454 | else if (quirks & MT_QUIRK_VALID_IS_INRANGE) | ||
449 | td->curvalid = value; | 455 | td->curvalid = value; |
450 | break; | 456 | break; |
451 | case HID_DG_TIPSWITCH: | 457 | case HID_DG_TIPSWITCH: |
@@ -672,6 +678,11 @@ static const struct hid_device_id mt_devices[] = { | |||
672 | HID_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH, | 678 | HID_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH, |
673 | USB_DEVICE_ID_GOODTOUCH_000f) }, | 679 | USB_DEVICE_ID_GOODTOUCH_000f) }, |
674 | 680 | ||
681 | /* Ideacom panel */ | ||
682 | { .driver_data = MT_CLS_SERIAL, | ||
683 | HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, | ||
684 | USB_DEVICE_ID_IDEACOM_IDC6650) }, | ||
685 | |||
675 | /* Ilitek dual touch panel */ | 686 | /* Ilitek dual touch panel */ |
676 | { .driver_data = MT_CLS_DEFAULT, | 687 | { .driver_data = MT_CLS_DEFAULT, |
677 | HID_USB_DEVICE(USB_VENDOR_ID_ILITEK, | 688 | HID_USB_DEVICE(USB_VENDOR_ID_ILITEK, |