Input: wacom - add support for 0x116 sensor on Win8 Panasonic CF-H2
authorJason Gerecke <killertofu@gmail.com>
Wed, 14 May 2014 18:42:22 +0000 (11:42 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 14 May 2014 23:40:07 +0000 (16:40 -0700)
The Win8 version of the Panasonic CF-H2 includes a new Wacom device.
The pen interface appears to use the same protocol as before, but the
touch interface has been tweaked to send Win8-compatible reports.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/tablet/wacom_wac.c
drivers/input/tablet/wacom_wac.h

index 05f371df6c400a882621c13509f6a13a40eed077..4ab4b09e3d3520a88e0d8c2e480f9da0fb2e19e3 100644 (file)
@@ -1051,6 +1051,10 @@ static int wacom_tpc_single_touch(struct wacom_wac *wacom, size_t len)
                        prox = data[0] & 0x01;
                        x = get_unaligned_le16(&data[1]);
                        y = get_unaligned_le16(&data[3]);
+               } else if (len == WACOM_PKGLEN_TPC1FG_B) {
+                       prox = data[2] & 0x01;
+                       x = get_unaligned_le16(&data[3]);
+                       y = get_unaligned_le16(&data[5]);
                } else {
                        prox = data[1] & 0x01;
                        x = le16_to_cpup((__le16 *)&data[2]);
@@ -2242,6 +2246,9 @@ static const struct wacom_features wacom_features_0x10E =
 static const struct wacom_features wacom_features_0x10F =
        { "Wacom ISDv4 10F",      WACOM_PKGLEN_MTTPC,     27760, 15694,  255,
          0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0x116 =
+       { "Wacom ISDv4 116",      WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,
+         0, TABLETPCE, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x4001 =
        { "Wacom ISDv4 4001",      WACOM_PKGLEN_MTTPC,     26202, 16325,  255,
          0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
@@ -2456,6 +2463,7 @@ const struct usb_device_id wacom_ids[] = {
        { USB_DEVICE_WACOM(0x10D) },
        { USB_DEVICE_WACOM(0x10E) },
        { USB_DEVICE_WACOM(0x10F) },
+       { USB_DEVICE_WACOM(0x116) },
        { USB_DEVICE_WACOM(0x300) },
        { USB_DEVICE_WACOM(0x301) },
        { USB_DEVICE_DETAILED(0x302, USB_CLASS_HID, 0, 0) },
index f69c0ebe7fa90d66a65b065ea838550e538b742d..a066dc00989fa24eb32baf192adde67310554a68 100644 (file)
@@ -22,6 +22,7 @@
 #define WACOM_PKGLEN_BBFUN      9
 #define WACOM_PKGLEN_INTUOS    10
 #define WACOM_PKGLEN_TPC1FG     5
+#define WACOM_PKGLEN_TPC1FG_B  10
 #define WACOM_PKGLEN_TPC2FG    14
 #define WACOM_PKGLEN_BBTOUCH   20
 #define WACOM_PKGLEN_BBTOUCH3  64