diff options
| -rw-r--r-- | drivers/hid/hid-uclogic.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/hid/hid-uclogic.c b/drivers/hid/hid-uclogic.c index 64abd8d73125..1509d7287ff3 100644 --- a/drivers/hid/hid-uclogic.c +++ b/drivers/hid/hid-uclogic.c | |||
| @@ -938,6 +938,7 @@ static int uclogic_probe(struct hid_device *hdev, | |||
| 938 | { | 938 | { |
| 939 | int rc; | 939 | int rc; |
| 940 | struct usb_interface *intf = to_usb_interface(hdev->dev.parent); | 940 | struct usb_interface *intf = to_usb_interface(hdev->dev.parent); |
| 941 | struct usb_device *udev = hid_to_usb_dev(hdev); | ||
| 941 | struct uclogic_drvdata *drvdata; | 942 | struct uclogic_drvdata *drvdata; |
| 942 | 943 | ||
| 943 | /* | 944 | /* |
| @@ -988,6 +989,28 @@ static int uclogic_probe(struct hid_device *hdev, | |||
| 988 | drvdata->ignore_pen_usage = true; | 989 | drvdata->ignore_pen_usage = true; |
| 989 | } | 990 | } |
| 990 | break; | 991 | break; |
| 992 | case USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60: | ||
| 993 | /* | ||
| 994 | * If it is the three-interface version, which is known to | ||
| 995 | * respond to initialization. | ||
| 996 | */ | ||
| 997 | if (udev->config->desc.bNumInterfaces == 3) { | ||
| 998 | /* If it is the pen interface */ | ||
| 999 | if (intf->cur_altsetting->desc.bInterfaceNumber == 0) { | ||
| 1000 | rc = uclogic_tablet_enable(hdev); | ||
| 1001 | if (rc) { | ||
| 1002 | hid_err(hdev, "tablet enabling failed\n"); | ||
| 1003 | return rc; | ||
| 1004 | } | ||
| 1005 | drvdata->invert_pen_inrange = true; | ||
| 1006 | |||
| 1007 | rc = uclogic_button_enable(hdev); | ||
| 1008 | drvdata->has_virtual_pad_interface = !rc; | ||
| 1009 | } else { | ||
| 1010 | drvdata->ignore_pen_usage = true; | ||
| 1011 | } | ||
| 1012 | } | ||
| 1013 | break; | ||
| 991 | } | 1014 | } |
| 992 | 1015 | ||
| 993 | rc = hid_parse(hdev); | 1016 | rc = hid_parse(hdev); |
