Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Support some Wacom pen tablets:
details: https://anonhg.NetBSD.org/src/rev/2f2d0cd03ee7
branches: trunk
changeset: 356106:2f2d0cd03ee7
user: ryoon <ryoon%NetBSD.org@localhost>
date: Sat Sep 02 04:35:51 2017 +0000
description:
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:
sys/dev/usb/ugraphire_rdesc.h | 4 +---
sys/dev/usb/uhidev.c | 30 ++++++++++++++++++++++++------
2 files changed, 25 insertions(+), 9 deletions(-)
diffs (91 lines):
diff -r 2ff9270c009d -r 2f2d0cd03ee7 sys/dev/usb/ugraphire_rdesc.h
--- a/sys/dev/usb/ugraphire_rdesc.h Fri Sep 01 20:58:14 2017 +0000
+++ b/sys/dev/usb/ugraphire_rdesc.h Sat Sep 02 04:35:51 2017 +0000
@@ -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@localhost>
* All rights reserved.
@@ -26,8 +26,6 @@
*/
/* Tested with
- * - Graphire
- * - Graphire2
* - Graphire3 4x5
* - Graphire3 6x8
* - Graphire4 4x5
diff -r 2ff9270c009d -r 2f2d0cd03ee7 sys/dev/usb/uhidev.c
--- a/sys/dev/usb/uhidev.c Fri Sep 01 20:58:14 2017 +0000
+++ b/sys/dev/usb/uhidev.c Sat Sep 02 04:35:51 2017 +0000
@@ -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 @@
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 @@
/* 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 @@
* 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;
Home |
Main Index |
Thread Index |
Old Index