43 #include <linux/kernel.h>
44 #include <linux/slab.h>
45 #include <linux/device.h>
66 #define DRIVER_VERSION "Cinco de Mayo 2008"
68 static const char longname[] =
"Gadget Zero";
79 static bool loopdefault = 0;
89 #ifndef CONFIG_USB_ZERO_HNPTEST
90 #define DRIVER_VENDOR_NUM 0x0525
91 #define DRIVER_PRODUCT_NUM 0xa4a0
92 #define DEFAULT_AUTORESUME 0
94 #define DRIVER_VENDOR_NUM 0x1a0a
95 #define DRIVER_PRODUCT_NUM 0xbadd
96 #define DEFAULT_AUTORESUME 5
110 .bLength =
sizeof device_desc,
118 .bNumConfigurations = 2,
121 #ifdef CONFIG_USB_OTG
123 .
bLength =
sizeof otg_descriptor,
140 static char serial[] =
"0123456789.0123456789.0123456789";
151 .strings = strings_dev,
173 usb_ep_free_request(ep, req);
183 usb_ep_free_request(ep, req);
191 value = usb_ep_disable(ep);
193 DBG(cdev,
"disable %s --> %d\n",
203 disable_ep(cdev, in);
204 disable_ep(cdev, out);
206 disable_ep(cdev, iso_in);
208 disable_ep(cdev, iso_out);
215 static void zero_autoresume(
unsigned long _c)
229 int status = usb_gadget_wakeup(g);
230 INFO(cdev,
"%s --> %d\n", __func__, status);
243 DBG(cdev,
"%s\n", __func__);
248 DBG(cdev,
"%s\n", __func__);
269 setup_timer(&autoresume_timer, zero_autoresume, (
unsigned long) cdev);
298 .strings = dev_strings,
301 .unbind = zero_unbind,
302 .suspend = zero_suspend,
303 .resume = zero_resume,
315 static void __exit cleanup(
void)