Merge tag 'for-f2fs-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
[firefly-linux-kernel-4.4.55.git] / drivers / input / tablet / wacom_sys.c
index 611fc3905d00d9fafa7cf1088b28f6c22fccca28..2c613cd41dd68260b345141489c7c06defd94f89 100644 (file)
@@ -349,6 +349,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
                                                break;
 
                                        case MTTPC:
+                                       case MTTPC_B:
                                                features->pktlen = WACOM_PKGLEN_MTTPC;
                                                break;
 
@@ -380,6 +381,16 @@ static int wacom_parse_hid(struct usb_interface *intf,
                                                i += 12;
                                                break;
 
+                                       case MTTPC_B:
+                                               features->x_max =
+                                                       get_unaligned_le16(&report[i + 3]);
+                                               features->x_phy =
+                                                       get_unaligned_le16(&report[i + 6]);
+                                               features->unit = report[i - 5];
+                                               features->unitExpo = report[i - 3];
+                                               i += 9;
+                                               break;
+
                                        default:
                                                features->x_max =
                                                        get_unaligned_le16(&report[i + 3]);
@@ -430,6 +441,14 @@ static int wacom_parse_hid(struct usb_interface *intf,
                                                i += 12;
                                                break;
 
+                                       case MTTPC_B:
+                                               features->y_max =
+                                                       get_unaligned_le16(&report[i + 3]);
+                                               features->y_phy =
+                                                       get_unaligned_le16(&report[i + 6]);
+                                               i += 9;
+                                               break;
+
                                        default:
                                                features->y_max =
                                                        features->x_max;