OSDN Git Service

hid-multitouch: correct eGalax a001 protocol
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>
Wed, 23 Nov 2011 08:43:20 +0000 (09:43 +0100)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 25 Jun 2012 12:53:46 +0000 (20:53 +0800)
This device use another protocol while sending the events.
It's the same as the one described as "serial" by Microsoft.
We are keeping here the sn_move and sn_pressure parameters for
egalax devices.

CC: Cedric Sodhi <manday@gmx.net>
CC: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
drivers/hid/hid-multitouch.c

index 48c38d5..092ae15 100644 (file)
@@ -97,6 +97,7 @@ struct mt_device {
 #define MT_CLS_3M                              0x0101
 #define MT_CLS_CYPRESS                         0x0102
 #define MT_CLS_EGALAX                          0x0103
+#define MT_CLS_EGALAX_SERIAL                   0x0104
 
 #define MT_DEFAULT_MAXCONTACT  10
 
@@ -174,6 +175,12 @@ struct mt_class mt_classes[] = {
                .sn_move = 4096,
                .sn_pressure = 32,
        },
+       { .name = MT_CLS_EGALAX_SERIAL,
+               .quirks =  MT_QUIRK_SLOT_IS_CONTACTID |
+                       MT_QUIRK_ALWAYS_VALID,
+               .sn_move = 4096,
+               .sn_pressure = 32,
+       },
 
        { }
 };
@@ -708,7 +715,7 @@ static const struct hid_device_id mt_devices[] = {
        { .driver_data = MT_CLS_EGALAX,
                HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
                        USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) },
-       { .driver_data = MT_CLS_EGALAX,
+       { .driver_data = MT_CLS_EGALAX_SERIAL,
                HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
                        USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) },