summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2011-06-24 22:01:56 +0000
committerhselasky <hselasky@FreeBSD.org>2011-06-24 22:01:56 +0000
commit97be6feacb7ff2fabc0576a8d100d3c75e5e7645 (patch)
tree074fc8f451b606050e9f82f5fab340d930ea091d /sys/dev
parent960e1ff18c7cb3dcf4b5df7ce4af59f81edcfc80 (diff)
downloadFreeBSD-src-97be6feacb7ff2fabc0576a8d100d3c75e5e7645.zip
FreeBSD-src-97be6feacb7ff2fabc0576a8d100d3c75e5e7645.tar.gz
- Export more USB device ID's.
- Update bus_auto.conf accordingly. MFC after: 3 days
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 048452d..e90298b 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 9182663..b03f884 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 af9aa1f..3c4f36e 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)
{
OpenPOWER on IntegriCloud