diff options
| author | ryoon <ryoon@NetBSD.org> | 2017-09-02 04:35:51 +0000 |
|---|---|---|
| committer | ryoon <ryoon@NetBSD.org> | 2017-09-02 04:35:51 +0000 |
| commit | 3df9bbf42ac209a17c0038203e7cd764f51042e7 (patch) | |
| tree | ee04bf06d5c490a77f3fcafb09236d6b053d93da /sys/dev/usb | |
| parent | e9691278d03ca400350db45bd46f0f4a64a57c44 (diff) | |
Support some Wacom pen tablets:
* Graphire (pen)
* Graphire2 (pen)
* Intuos2 A4 (pen)
* Intuos Art (pen, no finger touch)
Remove report descriptor override workaround for
Graphire and Graphire2.
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/ugraphire_rdesc.h | 4 | ||||
| -rw-r--r-- | sys/dev/usb/uhidev.c | 30 |
2 files changed, 25 insertions, 9 deletions
diff --git a/sys/dev/usb/ugraphire_rdesc.h b/sys/dev/usb/ugraphire_rdesc.h index 978e3b1c362..bc891a343ae 100644 --- a/sys/dev/usb/ugraphire_rdesc.h +++ b/sys/dev/usb/ugraphire_rdesc.h @@ -1,4 +1,4 @@ -/* $NetBSD: ugraphire_rdesc.h,v 1.9 2011/12/23 00:51:46 jakllsch Exp $ */ +/* $NetBSD: ugraphire_rdesc.h,v 1.10 2017/09/02 04:35:51 ryoon Exp $ */ /* * Copyright (c) 2000 Nick Hibma <n_hibma@freebsd.org> * All rights reserved. @@ -26,8 +26,6 @@ */ /* Tested with - * - Graphire - * - Graphire2 * - Graphire3 4x5 * - Graphire3 6x8 * - Graphire4 4x5 diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c index dd1232193f7..11ea72704ab 100644 --- a/sys/dev/usb/uhidev.c +++ b/sys/dev/usb/uhidev.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhidev.c,v 1.71 2017/08/13 22:29:42 jakllsch Exp $ */ +/* $NetBSD: uhidev.c,v 1.72 2017/09/02 04:35:51 ryoon Exp $ */ /* * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.71 2017/08/13 22:29:42 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.72 2017/09/02 04:35:51 ryoon Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -152,6 +152,15 @@ uhidev_attach(device_t parent, device_t self, void *aux) if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); + if (uiaa->uiaa_vendor == USB_VENDOR_WACOM) { + if (uiaa->uiaa_product == USB_PRODUCT_WACOM_XD0912U) { + /* + * Wacom Intuos2 (XD-0912-U) requires longer idle time to + * initialize the device with 0x0202. + */ + DELAY(500000); + } + } (void)usbd_set_idle(iface, 0, 0); if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0) @@ -202,12 +211,10 @@ uhidev_attach(device_t parent, device_t self, void *aux) /* XXX need to extend this */ descptr = NULL; if (uiaa->uiaa_vendor == USB_VENDOR_WACOM) { - static uByte reportbuf[] = {2, 2, 2}; + static uByte reportbuf[3]; /* The report descriptor for the Wacom Graphire is broken. */ switch (uiaa->uiaa_product) { - case USB_PRODUCT_WACOM_GRAPHIRE: - case USB_PRODUCT_WACOM_GRAPHIRE2: case USB_PRODUCT_WACOM_GRAPHIRE3_4X5: case USB_PRODUCT_WACOM_GRAPHIRE3_6X8: case USB_PRODUCT_WACOM_GRAPHIRE4_4X5: /* The 6x8 too? */ @@ -216,12 +223,23 @@ uhidev_attach(device_t parent, device_t self, void *aux) * feature report ID 2 before it'll start * returning digitizer data. */ + reportbuf[0] = 0x02; + reportbuf[1] = 0x02; usbd_set_report(uiaa->uiaa_iface, UHID_FEATURE_REPORT, 2, - &reportbuf, sizeof(reportbuf)); + &reportbuf, 2); size = sizeof(uhid_graphire3_4x5_report_descr); descptr = uhid_graphire3_4x5_report_descr; break; + case USB_PRODUCT_WACOM_GRAPHIRE: + case USB_PRODUCT_WACOM_GRAPHIRE2: + case USB_PRODUCT_WACOM_XD0912U: + case USB_PRODUCT_WACOM_CTH690K0: + reportbuf[0] = 0x02; + reportbuf[1] = 0x02; + usbd_set_report(uiaa->uiaa_iface, UHID_FEATURE_REPORT, 2, + &reportbuf, 2); + break; default: /* Keep descriptor */ break; |
