Lines Matching +full:ctrl +full:- +full:ids
1 // SPDX-License-Identifier: GPL-2.0+
3 * zero.c -- Gadget Zero, for USB development
5 * Copyright (C) 2003-2008 David Brownell
11 * can write a hardware-agnostic gadget driver running inside a USB device.
15 * test of your device-side usb stack, or with "usb-skeleton".
32 * driver assumes self-powered hardware, and
46 /*-------------------------------------------------------------------------*/
71 /*-------------------------------------------------------------------------*/
75 * DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!!
76 * Instead: allocate your own, using normal USB-IF procedures.
80 #define DRIVER_PRODUCT_NUM 0xa4a0 /* Linux-USB "Gadget Zero" */
83 #define DRIVER_VENDOR_NUM 0x1a0a /* OTG test device IDs */
89 * functional coverage for the "USBCV" test harness from USB-IF.
108 /*-------------------------------------------------------------------------*/
124 /* string IDs are assigned dynamically */
141 .language = 0x0409, /* en-us */
150 /*-------------------------------------------------------------------------*/
158 struct usb_gadget *g = cdev->gadget; in zero_autoresume()
161 if (!cdev->config) in zero_autoresume()
168 if (g->speed != USB_SPEED_UNKNOWN) { in zero_autoresume()
170 INFO(cdev, "%s --> %d\n", __func__, status); in zero_autoresume()
176 if (cdev->gadget->speed == USB_SPEED_UNKNOWN) in zero_suspend()
200 /*-------------------------------------------------------------------------*/
213 const struct usb_ctrlrequest *ctrl) in ss_config_setup() argument
215 switch (ctrl->bRequest) { in ss_config_setup()
218 return func_ss->setup(func_ss, ctrl); in ss_config_setup()
220 return -EOPNOTSUPP; in ss_config_setup()
238 MODULE_PARM_DESC(isoc_interval, "1 - 16");
242 MODULE_PARM_DESC(isoc_maxpacket, "0 - 1023 (fs), 0 - 1024 (hs/ss)");
245 MODULE_PARM_DESC(isoc_mult, "0 - 2 (hs/ss only)");
249 MODULE_PARM_DESC(isoc_maxburst, "0 - 15 (ss only)");
290 ss_opts->pattern = gzero_options.pattern; in zero_bind()
291 ss_opts->isoc_interval = gzero_options.isoc_interval; in zero_bind()
292 ss_opts->isoc_maxpacket = gzero_options.isoc_maxpacket; in zero_bind()
293 ss_opts->isoc_mult = gzero_options.isoc_mult; in zero_bind()
294 ss_opts->isoc_maxburst = gzero_options.isoc_maxburst; in zero_bind()
295 ss_opts->bulk_buflen = gzero_options.bulk_buflen; in zero_bind()
296 ss_opts->bulk_qlen = gzero_options.ss_bulk_qlen; in zero_bind()
297 ss_opts->iso_qlen = gzero_options.ss_iso_qlen; in zero_bind()
312 lb_opts->bulk_buflen = gzero_options.bulk_buflen; in zero_bind()
313 lb_opts->qlen = gzero_options.qlen; in zero_bind()
336 if (gadget_is_otg(cdev->gadget)) { in zero_bind()
340 usb_desc = usb_otg_descriptor_alloc(cdev->gadget); in zero_bind()
342 status = -ENOMEM; in zero_bind()
345 usb_otg_descriptor_init(cdev->gadget, usb_desc); in zero_bind()
369 usb_ep_autoconfig_reset(cdev->gadget); in zero_bind()
374 usb_ep_autoconfig_reset(cdev->gadget); in zero_bind()