aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/input/uep.c21
-rw-r--r--sys/dev/usb/input/ukbd.c7
-rw-r--r--sys/dev/usb/input/ums.c7
3 files changed, 25 insertions, 10 deletions
diff --git a/sys/dev/usb/input/uep.c b/sys/dev/usb/input/uep.c
index 048452d84b18..e90298bd1d0c 100644
--- a/sys/dev/usb/input/uep.c
+++ b/sys/dev/usb/input/uep.c
@@ -288,6 +288,12 @@ static const struct usb_config uep_config[UEP_N_TRANSFER] = {
},
};
+static const STRUCT_USB_HOST_ID uep_devs[] = {
+ {USB_VPI(USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL, 0)},
+ {USB_VPI(USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL2, 0)},
+ {USB_VPI(USB_VENDOR_EGALAX2, USB_PRODUCT_EGALAX2_TPANEL, 0)},
+};
+
static int
uep_probe(device_t dev)
{
@@ -295,17 +301,12 @@ uep_probe(device_t dev)
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
+ if (uaa->info.bConfigIndex != 0)
+ return (ENXIO);
+ if (uaa->info.bIfaceIndex != 0)
+ return (ENXIO);
- if ((uaa->info.idVendor == USB_VENDOR_EGALAX) &&
- ((uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL) ||
- (uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL2)))
- return (BUS_PROBE_SPECIFIC);
-
- if ((uaa->info.idVendor == USB_VENDOR_EGALAX2) &&
- (uaa->info.idProduct == USB_PRODUCT_EGALAX2_TPANEL))
- return (BUS_PROBE_SPECIFIC);
-
- return (ENXIO);
+ return (usbd_lookup_id_by_uaa(uep_devs, sizeof(uep_devs), uaa));
}
static int
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index 918266389a49..b03f884ce031 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -745,6 +745,13 @@ static const struct usb_config ukbd_config[UKBD_N_TRANSFER] = {
},
};
+/* A match on these entries will load ukbd */
+static const STRUCT_USB_HOST_ID __used ukbd_devs[] = {
+ {USB_IFACE_CLASS(UICLASS_HID),
+ USB_IFACE_SUBCLASS(UISUBCLASS_BOOT),
+ USB_IFACE_PROTOCOL(UIPROTO_BOOT_KEYBOARD),},
+};
+
static int
ukbd_probe(device_t dev)
{
diff --git a/sys/dev/usb/input/ums.c b/sys/dev/usb/input/ums.c
index af9aa1f3a980..3c4f36e21ab0 100644
--- a/sys/dev/usb/input/ums.c
+++ b/sys/dev/usb/input/ums.c
@@ -355,6 +355,13 @@ static const struct usb_config ums_config[UMS_N_TRANSFER] = {
},
};
+/* A match on these entries will load ums */
+static const STRUCT_USB_HOST_ID __used ums_devs[] = {
+ {USB_IFACE_CLASS(UICLASS_HID),
+ USB_IFACE_SUBCLASS(UISUBCLASS_BOOT),
+ USB_IFACE_PROTOCOL(UIPROTO_MOUSE),},
+};
+
static int
ums_probe(device_t dev)
{