NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/46391
The following reply was made to PR kern/46391; it has been noted by GNATS.
From: Nat Sloss <nathanialsloss%yahoo.com.au@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: Kooda <kooda%upyum.com@localhost>
Subject: Re: kern/46391
Date: Wed, 29 Aug 2012 00:56:18 +1000
Hi.
There was a problem with hid_is_collection for which I have submitted a patch.
Refer to kern/46868. This was a problem for me too when trying to match on
stylus usage.
So if you apply that patch along with the following patches to ums etc. the
problem should be solved. Hopefully :)
The following patches are just revisions of what has already been done:
Index: usbhid.h
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbhid.h,v
retrieving revision 1.14
diff -u -r1.14 usbhid.h
--- usbhid.h 17 Jan 2012 03:49:20 -0000 1.14
+++ usbhid.h 28 Aug 2012 14:53:33 -0000
@@ -133,7 +133,9 @@
/* Usages Digitizers */
#define HUD_UNDEFINED 0x0000
+#define HUD_PEN 0x0002
#define HUD_TOUCH_SCREEN 0x0004
+#define HUD_STYLUS 0x0020
#define HUD_FINGER 0x0022
#define HUD_TIP_PRESSURE 0x0030
#define HUD_BARREL_PRESSURE 0x0031
Index: ums.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/ums.c,v
retrieving revision 1.84
diff -u -r1.84 ums.c
--- ums.c 30 Apr 2012 17:27:50 -0000 1.84
+++ ums.c 28 Aug 2012 14:55:02 -0000
@@ -163,7 +163,9 @@
!hid_is_collection(desc, size, uha->reportid,
HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_POINTER)) &&
!hid_is_collection(desc, size, uha->reportid,
- HID_USAGE2(HUP_DIGITIZERS, 0x0002)))
+ HID_USAGE2(HUP_DIGITIZERS, HUD_PEN)) &&
+ !hid_is_collection(desc, size, uha->reportid,
+ HID_USAGE2(HUP_DIGITIZERS, HUD_STYLUS)))
return (UMATCH_NONE);
return (UMATCH_IFACECLASS);
@@ -198,7 +200,9 @@
uhidev_get_report_desc(uha->parent, &desc, &size);
isdigitizer = hid_is_collection(desc, size, uha->reportid,
- HID_USAGE2(HUP_DIGITIZERS, 0x0002));
+ HID_USAGE2(HUP_DIGITIZERS, HUD_PEN)) ||
+ hid_is_collection(desc, size, uha->reportid,
+ HID_USAGE2(HUP_DIGITIZERS, HUD_STYLUS));
if (!pmf_device_register(self, NULL, NULL))
aprint_error_dev(self, "couldn't establish power handler\n");
I hope this works, that is with the modified hid_is_collection.
Please post back with results.
Regards,
Nat.
Home |
Main Index |
Thread Index |
Old Index