]> git.karo-electronics.de Git - linux-beck.git/commitdiff
HID: uclogic: Support UGTizer GP0610 partially
authorNikolai Kondrashov <spbnick@gmail.com>
Wed, 14 Sep 2016 18:38:18 +0000 (21:38 +0300)
committerJiri Kosina <jkosina@suse.cz>
Mon, 19 Sep 2016 12:32:23 +0000 (14:32 +0200)
Add partial support for the UGTizer GP0610 tablet (aka iBall PF1064U,
aka UGTizer GT1060) to the hid-uclogic.c driver.

The pen input is supported fully, but frame buttons and wheel don't work
yet.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
drivers/hid/hid-uclogic.c

index df2770a5291f2b2812d45dc102b6360d32fc4d49..e21ac0b9f566a21ad5f2af85470f3a7b1d9dc59c 100644 (file)
@@ -2087,6 +2087,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UGEE_TABLET_81) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UGEE_TABLET_45) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_DRAWIMAGE_G3) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_UGTIZER, USB_DEVICE_ID_UGTIZER_TABLET_GP0610) },
        { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SUPER_JOY_BOX_3) },
        { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD) },
index 6ef9dbf84059f400e4e88bf6966fd893d359b1ee..15067a902e8ea851d92201c6a17afb8ac99857bd 100644 (file)
 #define USB_DEVICE_ID_RAPHNET_2NES2SNES        0x0002
 #define USB_DEVICE_ID_RAPHNET_4NES4SNES        0x0003
 
+#define USB_VENDOR_ID_UGTIZER                  0x2179
+#define USB_DEVICE_ID_UGTIZER_TABLET_GP0610    0x0053
+
 #endif
index f4377c45878756792087f87ff8edeadd32cee821..72778b34046e360c3644a4b3b3312470d1696596 100644 (file)
@@ -974,6 +974,19 @@ static int uclogic_probe(struct hid_device *hdev,
                        drvdata->ignore_pen_usage = true;
                }
                break;
+       case USB_DEVICE_ID_UGTIZER_TABLET_GP0610:
+               /* If this is the pen interface */
+               if (intf->cur_altsetting->desc.bInterfaceNumber == 1) {
+                       rc = uclogic_tablet_enable(hdev);
+                       if (rc) {
+                               hid_err(hdev, "tablet enabling failed\n");
+                               return rc;
+                       }
+                       drvdata->invert_pen_inrange = true;
+               } else {
+                       drvdata->ignore_pen_usage = true;
+               }
+               break;
        }
 
        rc = hid_parse(hdev);
@@ -1031,6 +1044,7 @@ static const struct hid_device_id uclogic_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UGEE_TABLET_81) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UGEE_TABLET_45) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_DRAWIMAGE_G3) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_UGTIZER, USB_DEVICE_ID_UGTIZER_TABLET_GP0610) },
        { }
 };
 MODULE_DEVICE_TABLE(hid, uclogic_devices);