]> Pileus Git - ~andy/linux/blobdiff - drivers/input/tablet/wacom_sys.c
Merge tag 'v3.13-rc4' into next
[~andy/linux] / drivers / input / tablet / wacom_sys.c
index 867e7c33ac55072b19f2ff339705c4e90f6b428d..8318826d976eabdc55a5cd1c13269d720901edcf 100644 (file)
@@ -304,7 +304,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
        struct usb_device *dev = interface_to_usbdev(intf);
        char limit = 0;
        /* result has to be defined as int for some devices */
-       int result = 0;
+       int result = 0, touch_max = 0;
        int i = 0, usage = WCM_UNDEFINED, finger = 0, pen = 0;
        unsigned char *report;
 
@@ -351,7 +351,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
                                if (usage == WCM_DESKTOP) {
                                        if (finger) {
                                                features->device_type = BTN_TOOL_FINGER;
-
+                                               /* touch device at least supports one touch point */
+                                               touch_max = 1;
                                                switch (features->type) {
                                                case TABLETPC2FG:
                                                        features->pktlen = WACOM_PKGLEN_TPC2FG;
@@ -504,6 +505,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
        }
 
  out:
+       if (!features->touch_max && touch_max)
+               features->touch_max = touch_max;
        result = 0;
        kfree(report);
        return result;
@@ -1199,7 +1202,8 @@ static void wacom_wireless_work(struct work_struct *work)
                        goto fail;
 
                /* Touch interface */
-               if (wacom_wac1->features.touch_max) {
+               if (wacom_wac1->features.touch_max ||
+                   wacom_wac1->features.type == INTUOSHT) {
                        wacom_wac2->features =
                                *((struct wacom_features *)id->driver_info);
                        wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3;
@@ -1322,7 +1326,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
         * HID descriptor. If this is the touch interface (wMaxPacketSize
         * of WACOM_PKGLEN_BBTOUCH3), override the table values.
         */
-       if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
+       if (features->type >= INTUOS5S && features->type <= INTUOSHT) {
                if (endpoint->wMaxPacketSize == WACOM_PKGLEN_BBTOUCH3) {
                        features->device_type = BTN_TOOL_FINGER;
                        features->pktlen = WACOM_PKGLEN_BBTOUCH3;
@@ -1392,7 +1396,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
                        goto fail5;
                }
        }
-
        return 0;
 
  fail5: wacom_destroy_leds(wacom);