22 #include <linux/module.h>
23 #include <linux/slab.h>
24 #include <linux/videodev2.h>
40 static unsigned int disable_usb_speed_check;
43 "override min bandwidth requirement of 480M bps");
45 #define _AU0828_BULKPIPE 0x03
46 #define _BULKPIPESIZE 0xffff
54 #define CMD_REQUEST_IN 0x00
55 #define CMD_REQUEST_OUT 0x01
62 dprintk(8,
"%s(0x%04x) = 0x%02x\n", __func__, reg, result);
69 dprintk(8,
"%s(0x%04x, 0x%02x)\n", __func__, reg, val);
82 usb_sndctrlpipe(dev->
usbdev, 0),
86 value, index,
NULL, 0, 1000);
88 status =
min(status, 0);
91 printk(
KERN_ERR "%s() Failed sending control message, error %d.\n",
107 usb_rcvctrlpipe(dev->
usbdev, 0),
113 status =
min(status, 0);
116 printk(
KERN_ERR "%s() Failed receiving control message, error %d.\n",
130 struct au0828_dev *dev = usb_get_intfdata(interface);
132 dprintk(1,
"%s()\n", __func__);
145 usb_set_intfdata(interface,
NULL);
160 struct usb_device *usbdev = interface_to_usbdev(interface);
162 ifnum = interface->altsetting->desc.bInterfaceNumber;
167 dprintk(1,
"%s() vendor id 0x%x device id 0x%x ifnum:%d\n", __func__,
177 if (usbdev->speed !=
USB_SPEED_HIGH && disable_usb_speed_check == 0) {
180 "high-speed USB 2.0 port.\n");
195 dev->
boardnr =
id->driver_info;
228 usb_set_intfdata(interface, dev);
238 static struct usb_driver au0828_usb_driver = {
240 .probe = au0828_usb_probe,
241 .disconnect = au0828_usb_disconnect,
245 static int __init au0828_init(
void)
264 ret = usb_register(&au0828_usb_driver);
271 static void __exit au0828_exit(
void)