version 1.21.34.6, 2015/03/21 09:13:23 |
version 1.21.34.7, 2015/03/21 11:33:37 |
Line 162 static const struct video_hw_if pseye_hw |
|
Line 162 static const struct video_hw_if pseye_hw |
|
static int |
static int |
pseye_match(device_t parent, cfdata_t match, void *opaque) |
pseye_match(device_t parent, cfdata_t match, void *opaque) |
{ |
{ |
struct usbif_attach_arg *uaa = opaque; |
struct usbif_attach_arg *uiaa = opaque; |
|
|
if (uaa->class != UICLASS_VENDOR) |
if (uiaa->uiaa_class != UICLASS_VENDOR) |
return UMATCH_NONE; |
return UMATCH_NONE; |
|
|
if (uaa->vendor == USB_VENDOR_OMNIVISION2) { |
if (uiaa->uiaa_vendor == USB_VENDOR_OMNIVISION2) { |
switch (uaa->product) { |
switch (uiaa->uiaa_product) { |
case USB_PRODUCT_OMNIVISION2_PSEYE: |
case USB_PRODUCT_OMNIVISION2_PSEYE: |
if (uaa->ifaceno != 0) |
if (uiaa->uiaa_ifaceno != 0) |
return UMATCH_NONE; |
return UMATCH_NONE; |
return UMATCH_VENDOR_PRODUCT; |
return UMATCH_VENDOR_PRODUCT; |
} |
} |
|
|
pseye_attach(device_t parent, device_t self, void *opaque) |
pseye_attach(device_t parent, device_t self, void *opaque) |
{ |
{ |
struct pseye_softc *sc = device_private(self); |
struct pseye_softc *sc = device_private(self); |
struct usbif_attach_arg *uaa = opaque; |
struct usbif_attach_arg *uiaa = opaque; |
struct usbd_device *dev = uaa->device; |
struct usbd_device *dev = uiaa->uiaa_device; |
usb_interface_descriptor_t *id = NULL; |
usb_interface_descriptor_t *id = NULL; |
usb_endpoint_descriptor_t *ed = NULL, *ed_bulkin = NULL; |
usb_endpoint_descriptor_t *ed = NULL, *ed_bulkin = NULL; |
char *devinfop; |
char *devinfop; |
Line 199 pseye_attach(device_t parent, device_t s |
|
Line 199 pseye_attach(device_t parent, device_t s |
|
|
|
sc->sc_dev = self; |
sc->sc_dev = self; |
sc->sc_udev = dev; |
sc->sc_udev = dev; |
sc->sc_iface = uaa->iface; |
sc->sc_iface = uiaa->uiaa_iface; |
snprintf(sc->sc_businfo, sizeof(sc->sc_businfo), "usb:%08x", |
snprintf(sc->sc_businfo, sizeof(sc->sc_businfo), "usb:%08x", |
sc->sc_udev->ud_cookie.cookie); |
sc->sc_udev->ud_cookie.cookie); |
sc->sc_bulkin_bufferlen = PSEYE_BULKIN_BUFLEN; |
sc->sc_bulkin_bufferlen = PSEYE_BULKIN_BUFLEN; |