Merge branch 'hid-battery' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy...
[linux-2.6.git] / drivers / hid / hid-multitouch.c
index fd2fa59..24fc442 100644 (file)
@@ -88,15 +88,18 @@ struct mt_device {
 
 #define MT_CLS_SERIAL                          0x0002
 #define MT_CLS_CONFIDENCE                      0x0003
-#define MT_CLS_CONFIDENCE_MINUS_ONE            0x0004
-#define MT_CLS_DUAL_INRANGE_CONTACTID          0x0005
-#define MT_CLS_DUAL_INRANGE_CONTACTNUMBER      0x0006
-#define MT_CLS_DUAL_NSMU_CONTACTID             0x0007
+#define MT_CLS_CONFIDENCE_CONTACT_ID           0x0004
+#define MT_CLS_CONFIDENCE_MINUS_ONE            0x0005
+#define MT_CLS_DUAL_INRANGE_CONTACTID          0x0006
+#define MT_CLS_DUAL_INRANGE_CONTACTNUMBER      0x0007
+#define MT_CLS_DUAL_NSMU_CONTACTID             0x0008
+#define MT_CLS_INRANGE_CONTACTNUMBER           0x0009
 
 /* vendor specific classes */
 #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
 
@@ -132,13 +135,16 @@ static int find_slot_from_contactid(struct mt_device *td)
        return -1;
 }
 
-struct mt_class mt_classes[] = {
+static struct mt_class mt_classes[] = {
        { .name = MT_CLS_DEFAULT,
                .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP },
        { .name = MT_CLS_SERIAL,
                .quirks = MT_QUIRK_ALWAYS_VALID},
        { .name = MT_CLS_CONFIDENCE,
                .quirks = MT_QUIRK_VALID_IS_CONFIDENCE },
+       { .name = MT_CLS_CONFIDENCE_CONTACT_ID,
+               .quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
+                       MT_QUIRK_SLOT_IS_CONTACTID },
        { .name = MT_CLS_CONFIDENCE_MINUS_ONE,
                .quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
                        MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE },
@@ -154,6 +160,9 @@ struct mt_class mt_classes[] = {
                .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP |
                        MT_QUIRK_SLOT_IS_CONTACTID,
                .maxcontacts = 2 },
+       { .name = MT_CLS_INRANGE_CONTACTNUMBER,
+               .quirks = MT_QUIRK_VALID_IS_INRANGE |
+                       MT_QUIRK_SLOT_IS_CONTACTNUMBER },
 
        /*
         * vendor specific classes
@@ -174,6 +183,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,
+       },
 
        { }
 };
@@ -646,12 +661,20 @@ static const struct hid_device_id mt_devices[] = {
        { .driver_data = MT_CLS_3M,
                HID_USB_DEVICE(USB_VENDOR_ID_3M,
                        USB_DEVICE_ID_3M2256) },
+       { .driver_data = MT_CLS_3M,
+               HID_USB_DEVICE(USB_VENDOR_ID_3M,
+                       USB_DEVICE_ID_3M3266) },
 
        /* ActionStar panels */
        { .driver_data = MT_CLS_DEFAULT,
                HID_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR,
                        USB_DEVICE_ID_ACTIONSTAR_1011) },
 
+       /* Atmel panels */
+       { .driver_data = MT_CLS_SERIAL,
+               HID_USB_DEVICE(USB_VENDOR_ID_ATMEL,
+                       USB_DEVICE_ID_ATMEL_MULTITOUCH) },
+
        /* Cando panels */
        { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
                HID_USB_DEVICE(USB_VENDOR_ID_CANDO,
@@ -705,7 +728,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) },
 
@@ -724,6 +747,11 @@ static const struct hid_device_id mt_devices[] = {
                HID_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH,
                        USB_DEVICE_ID_GOODTOUCH_000f) },
 
+       /* Hanvon panels */
+       { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
+               HID_USB_DEVICE(USB_VENDOR_ID_HANVON_ALT,
+                       USB_DEVICE_ID_HANVON_ALT_MULTITOUCH) },
+
        /* Ideacom panel */
        { .driver_data = MT_CLS_SERIAL,
                HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM,
@@ -768,6 +796,17 @@ static const struct hid_device_id mt_devices[] = {
                HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
                        USB_DEVICE_ID_PENMOUNT_PCI) },
 
+       /* PixArt optical touch screen */
+       { .driver_data = MT_CLS_INRANGE_CONTACTNUMBER,
+               HID_USB_DEVICE(USB_VENDOR_ID_PIXART,
+                       USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN) },
+       { .driver_data = MT_CLS_INRANGE_CONTACTNUMBER,
+               HID_USB_DEVICE(USB_VENDOR_ID_PIXART,
+                       USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1) },
+       { .driver_data = MT_CLS_INRANGE_CONTACTNUMBER,
+               HID_USB_DEVICE(USB_VENDOR_ID_PIXART,
+                       USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2) },
+
        /* PixCir-based panels */
        { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
                HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
@@ -776,6 +815,17 @@ static const struct hid_device_id mt_devices[] = {
                HID_USB_DEVICE(USB_VENDOR_ID_CANDO,
                        USB_DEVICE_ID_CANDO_PIXCIR_MULTI_TOUCH) },
 
+       /* Quanta-based panels */
+       { .driver_data = MT_CLS_CONFIDENCE_CONTACT_ID,
+               HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
+                       USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
+       { .driver_data = MT_CLS_CONFIDENCE_CONTACT_ID,
+               HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
+                       USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001) },
+       { .driver_data = MT_CLS_CONFIDENCE_CONTACT_ID,
+               HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
+                       USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008) },
+
        /* Stantum panels */
        { .driver_data = MT_CLS_CONFIDENCE,
                HID_USB_DEVICE(USB_VENDOR_ID_STANTUM,
@@ -804,6 +854,35 @@ static const struct hid_device_id mt_devices[] = {
                HID_USB_DEVICE(USB_VENDOR_ID_XAT,
                        USB_DEVICE_ID_XAT_CSR) },
 
+       /* Xiroku */
+       { .driver_data = MT_CLS_DEFAULT,
+               HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
+                       USB_DEVICE_ID_XIROKU_SPX) },
+       { .driver_data = MT_CLS_DEFAULT,
+               HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
+                       USB_DEVICE_ID_XIROKU_MPX) },
+       { .driver_data = MT_CLS_DEFAULT,
+               HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
+                       USB_DEVICE_ID_XIROKU_CSR) },
+       { .driver_data = MT_CLS_DEFAULT,
+               HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
+                       USB_DEVICE_ID_XIROKU_SPX1) },
+       { .driver_data = MT_CLS_DEFAULT,
+               HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
+                       USB_DEVICE_ID_XIROKU_MPX1) },
+       { .driver_data = MT_CLS_DEFAULT,
+               HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
+                       USB_DEVICE_ID_XIROKU_CSR1) },
+       { .driver_data = MT_CLS_DEFAULT,
+               HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
+                       USB_DEVICE_ID_XIROKU_SPX2) },
+       { .driver_data = MT_CLS_DEFAULT,
+               HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
+                       USB_DEVICE_ID_XIROKU_MPX2) },
+       { .driver_data = MT_CLS_DEFAULT,
+               HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
+                       USB_DEVICE_ID_XIROKU_CSR2) },
+
        { }
 };
 MODULE_DEVICE_TABLE(hid, mt_devices);