Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168962550
D17689.id49574.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17689.id49574.diff
View Options
Index: sys/dev/usb/input/uhid.c
===================================================================
--- sys/dev/usb/input/uhid.c
+++ sys/dev/usb/input/uhid.c
@@ -675,6 +675,8 @@
{
struct usb_attach_arg *uaa = device_get_ivars(dev);
int error;
+ void *buf;
+ uint16_t len;
DPRINTFN(11, "\n");
@@ -701,7 +703,23 @@
!usb_test_quirk(uaa, UQ_UMS_IGNORE))))
return (ENXIO);
- return (BUS_PROBE_GENERIC);
+ error = usbd_req_get_hid_desc(uaa->device, NULL,
+ &buf, &len, M_TEMP, uaa->info.bIfaceIndex);
+ if (error)
+ return (ENXIO);
+
+ /* Check for mandatory multitouch usages to give wmt(4) a chance */
+ if (hid_locate(buf, len, HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACT_MAX),
+ hid_feature, 0, NULL, NULL, NULL) &&
+ hid_locate(buf, len, HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACTID),
+ hid_input, 0, NULL, NULL, NULL) &&
+ !usb_test_quirk(uaa, UQ_WMT_IGNORE))
+ error = ENXIO;
+ else
+ error = BUS_PROBE_GENERIC;
+
+ free(buf, M_TEMP);
+ return (error);
}
static int
Index: sys/dev/usb/input/wmt.c
===================================================================
--- sys/dev/usb/input/wmt.c
+++ sys/dev/usb/input/wmt.c
@@ -856,6 +856,12 @@
}
}
+static const STRUCT_USB_HOST_ID wmt_devs[] = {
+ /* generic HID class w/o boot interface */
+ {USB_IFACE_CLASS(UICLASS_HID),
+ USB_IFACE_SUBCLASS(0),},
+};
+
static devclass_t wmt_devclass;
static device_method_t wmt_methods[] = {
@@ -876,3 +882,4 @@
MODULE_DEPEND(wmt, usb, 1, 1, 1);
MODULE_DEPEND(wmt, evdev, 1, 1, 1);
MODULE_VERSION(wmt, 1);
+USB_PNP_HOST_INFO(wmt_devs);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 31, 11:38 PM (3 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37731752
Default Alt Text
D17689.id49574.diff (1 KB)
Attached To
Mode
D17689: wmt(4): Add PNP metadata
Attached
Detach File
Event Timeline
Log In to Comment