/linux-6.3-rc2/drivers/usb/gadget/udc/ |
A D | core.c | 477 ret = gadget->ops->get_frame(gadget); in usb_gadget_frame_number() 507 ret = gadget->ops->wakeup(gadget); in usb_gadget_wakeup() 623 ret = gadget->ops->vbus_draw(gadget, mA); in usb_gadget_vbus_draw() 691 ret = gadget->ops->pullup(gadget, 1); in usb_gadget_connect() 736 ret = gadget->ops->pullup(gadget, 0); in usb_gadget_disconnect() 1146 udc->gadget->ops->udc_stop(udc->gadget); in usb_gadget_udc_stop() 1163 struct usb_gadget *gadget = udc->gadget; in usb_gadget_udc_set_speed() local 1172 gadget->ops->udc_set_ssp_rate(gadget, gadget->max_ssp_rate); in usb_gadget_udc_set_speed() 1174 gadget->ops->udc_set_speed(gadget, s); in usb_gadget_udc_set_speed() 1189 struct usb_gadget *gadget = udc->gadget; in usb_gadget_enable_async_callbacks() local [all …]
|
/linux-6.3-rc2/include/linux/usb/ |
A D | gadget.h | 331 int (*check_config)(struct usb_gadget *gadget); 455 { dev_set_drvdata(&gadget->dev, data); } in set_gadget_data() 457 { return dev_get_drvdata(&gadget->dev); } in get_gadget_data() 464 get_device(&gadget->dev); in usb_get_gadget() 465 return gadget; in usb_get_gadget() 469 put_device(&gadget->dev); in usb_put_gadget() 484 #define gadget_for_each_ep(tmp, gadget) \ argument 603 int usb_gadget_wakeup(struct usb_gadget *gadget); 609 int usb_gadget_connect(struct usb_gadget *gadget); 719 int (*bind)(struct usb_gadget *gadget, [all …]
|
/linux-6.3-rc2/Documentation/ABI/testing/ |
A D | configfs-usb-gadget | 1 What: /config/usb-gadget 8 What: /config/usb-gadget/gadget 16 UDC bind a gadget to UDC/unbind a gadget; 34 What: /config/usb-gadget/gadget/configs 40 What: /config/usb-gadget/gadget/configs/config 51 What: /config/usb-gadget/gadget/configs/config/strings 69 What: /config/usb-gadget/gadget/functions 114 What: /config/usb-gadget/gadget/strings 121 What: /config/usb-gadget/gadget/strings/language 133 What: /config/usb-gadget/gadget/os_desc [all …]
|
A D | configfs-usb-gadget-uvc | 1 What: /config/usb-gadget/gadget/functions/uvc.name 13 What: /config/usb-gadget/gadget/functions/uvc.name/control 27 What: /config/usb-gadget/gadget/functions/uvc.name/control/class 32 What: /config/usb-gadget/gadget/functions/uvc.name/control/class/ss 37 What: /config/usb-gadget/gadget/functions/uvc.name/control/class/fs 42 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal 94 What: /config/usb-gadget/gadget/functions/uvc.name/control/processing 144 What: /config/usb-gadget/gadget/functions/uvc.name/control/header 156 What: /config/usb-gadget/gadget/functions/uvc.name/streaming 168 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class [all …]
|
A D | sysfs-devices-platform-_UDC_-gadget | 1 What: /sys/devices/platform/_UDC_/gadget/suspended 5 Show the suspend state of an USB composite gadget. 12 What: /sys/devices/platform/_UDC_/gadget/gadget-lunX/nofua 17 the SCSI WRITE(10,12) commands when a gadget in USB Mass
|
/linux-6.3-rc2/drivers/usb/gadget/ |
A D | epautoconf.c | 64 struct usb_gadget *gadget, in usb_ep_autoconfig_ss() argument 71 if (gadget->ops->match_ep) { in usb_ep_autoconfig_ss() 72 ep = gadget->ops->match_ep(gadget, desc, ep_comp); in usb_ep_autoconfig_ss() 78 list_for_each_entry (ep, &gadget->ep_list, ep_list) { in usb_ep_autoconfig_ss() 100 if (++gadget->in_epnum > 15) in usb_ep_autoconfig_ss() 104 if (++gadget->out_epnum > 15) in usb_ep_autoconfig_ss() 106 desc->bEndpointAddress |= gadget->out_epnum; in usb_ep_autoconfig_ss() 150 struct usb_gadget *gadget, in usb_ep_autoconfig() argument 157 ep = usb_ep_autoconfig_ss(gadget, desc, NULL); in usb_ep_autoconfig() 211 gadget->in_epnum = 0; in usb_ep_autoconfig_reset() [all …]
|
A D | composite.c | 569 struct usb_gadget *gadget = cdev->gadget; in config_desc() local 576 speed = gadget->speed; in config_desc() 632 struct usb_gadget *gadget = cdev->gadget; in count_configs() local 693 cdev->gadget->ops->get_config_params(cdev->gadget, in bos_desc() 900 struct usb_gadget *gadget = cdev->gadget; in set_config() local 1836 if (gadget->otg_caps && in composite_setup() 1855 if (gadget_is_otg(gadget)) { in composite_setup() 1856 if (gadget->a_hnp_support) in composite_setup() 1923 if (gadget_is_otg(gadget) && gadget->hnp_polling_support && in composite_setup() 2316 struct usb_gadget *gadget = cdev->gadget; in composite_dev_prepare() local [all …]
|
/linux-6.3-rc2/drivers/usb/gadget/udc/bdc/ |
A D | bdc_udc.c | 98 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected() 99 bdc->gadget.speed = USB_SPEED_HIGH; in bdc_uspc_connected() 104 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected() 105 bdc->gadget.speed = USB_SPEED_FULL; in bdc_uspc_connected() 110 bdc->gadget.ep0->maxpacket = 8; in bdc_uspc_connected() 111 bdc->gadget.speed = USB_SPEED_LOW; in bdc_uspc_connected() 374 bdc->gadget.name, in bdc_udc_start() 406 bdc->gadget.dev.driver = NULL; in bdc_udc_stop() 419 if (!gadget) in bdc_udc_pullup() 529 bdc->gadget.sg_supported = false; in bdc_udc_init() [all …]
|
/linux-6.3-rc2/drivers/usb/gadget/legacy/ |
A D | dbgp.c | 27 struct usb_gadget *gadget; member 124 dev_dbg(&dbgp.gadget->dev, in dbgp_complete() 162 dev_dbg(&dbgp.gadget->dev, in dbgp_enable_ep_req() 226 usb_ep_free_request(gadget->ep0, dbgp.req); in dbgp_unbind() 239 usb_ep_autoconfig_reset(gadget); in dbgp_configure_endpoints() 277 static int dbgp_bind(struct usb_gadget *gadget, in dbgp_bind() argument 282 dbgp.gadget = gadget; in dbgp_bind() 315 err = dbgp_configure_endpoints(gadget); in dbgp_bind() 326 dbgp_unbind(gadget); in dbgp_bind() 384 err = dbgp_configure_endpoints(gadget); in dbgp_setup() [all …]
|
A D | raw_gadget.c | 303 dev->gadget = gadget; in gadget_bind() 403 if (!dev->gadget) { in raw_release() 581 if (!dev->gadget) { in raw_ioctl_event_fetch() 645 if (!dev->gadget) { in raw_process_ep0_io() 757 if (!dev->gadget) { in raw_ioctl_ep0_stall() 816 if (!dev->gadget) { in raw_ioctl_ep_enable() 879 if (!dev->gadget) { in raw_ioctl_ep_disable() 934 if (!dev->gadget) { in raw_ioctl_ep_set_clear_halt_wedge() 1020 if (!dev->gadget) { in raw_process_ep_io() 1141 if (!dev->gadget) { in raw_ioctl_configure() [all …]
|
A D | ether.c | 214 if (gadget_is_otg(c->cdev->gadget)) { in rndis_do_config() 256 if (gadget_is_otg(c->cdev->gadget)) { in eth_do_config() 306 struct usb_gadget *gadget = cdev->gadget; in eth_bind() local 327 } else if (can_support_ecm(gadget)) { in eth_bind() 367 gether_set_gadget(net, cdev->gadget); in eth_bind() 374 else if (can_support_ecm(gadget)) in eth_bind() 402 if (gadget_is_otg(gadget) && !otg_desc[0]) { in eth_bind() 405 usb_desc = usb_otg_descriptor_alloc(gadget); in eth_bind() 410 usb_otg_descriptor_init(gadget, usb_desc); in eth_bind() 442 else if (can_support_ecm(gadget)) in eth_bind() [all …]
|
A D | cdc2.c | 93 if (gadget_is_otg(c->cdev->gadget)) { in cdc_do_config() 140 struct usb_gadget *gadget = cdev->gadget; in cdc_bind() local 144 if (!can_support_ecm(cdev->gadget)) { in cdc_bind() 145 dev_err(&gadget->dev, "controller '%s' not usable\n", in cdc_bind() 146 gadget->name); in cdc_bind() 178 if (gadget_is_otg(gadget) && !otg_desc[0]) { in cdc_bind() 181 usb_desc = usb_otg_descriptor_alloc(gadget); in cdc_bind() 186 usb_otg_descriptor_init(gadget, usb_desc); in cdc_bind() 197 dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n", in cdc_bind()
|
A D | printer.c | 116 struct usb_gadget *gadget = c->cdev->gadget; in printer_do_config() local 119 usb_ep_autoconfig_reset(gadget); in printer_do_config() 121 usb_gadget_set_selfpowered(gadget); in printer_do_config() 123 if (gadget_is_otg(gadget)) { in printer_do_config() 174 if (gadget_is_otg(cdev->gadget) && !otg_desc[0]) { in printer_bind() 177 usb_desc = usb_otg_descriptor_alloc(cdev->gadget); in printer_bind() 182 usb_otg_descriptor_init(cdev->gadget, usb_desc); in printer_bind()
|
A D | inode.c | 141 struct usb_gadget *gadget; member 955 && (dev->gadget->speed in ep0_read() 1147 dev->gadget->ep0, dev->req, in ep0_write() 1250 struct usb_gadget *gadget = dev->gadget; in gadget_dev_ioctl() local 1257 } else if (gadget->ops->ioctl) { in gadget_dev_ioctl() 1261 ret = gadget->ops->ioctl (gadget, code, value); in gadget_dev_ioctl() 1652 set_gadget_data (gadget, NULL); in gadgetfs_unbind() 1676 set_gadget_data (gadget, dev); in gadgetfs_bind() 1677 dev->gadget = gadget; in gadgetfs_bind() 1678 gadget->ep0->driver_data = dev; in gadgetfs_bind() [all …]
|
A D | ncm.c | 99 if (gadget_is_otg(c->cdev->gadget)) { in ncm_do_config() 129 struct usb_gadget *gadget = cdev->gadget; in gncm_bind() local 155 if (gadget_is_otg(gadget) && !otg_desc[0]) { in gncm_bind() 158 usb_desc = usb_otg_descriptor_alloc(gadget); in gncm_bind() 163 usb_otg_descriptor_init(gadget, usb_desc); in gncm_bind() 174 dev_info(&gadget->dev, "%s\n", DRIVER_DESC); in gncm_bind()
|
A D | multi.c | 138 if (gadget_is_otg(c->cdev->gadget)) { in rndis_do_config() 220 if (gadget_is_otg(c->cdev->gadget)) { in cdc_do_config() 296 struct usb_gadget *gadget = cdev->gadget; in multi_bind() local 307 if (!can_support_ecm(cdev->gadget)) { in multi_bind() 308 dev_err(&gadget->dev, "controller '%s' not usable\n", in multi_bind() 309 gadget->name); in multi_bind() 350 gether_set_gadget(ecm_opts->net, cdev->gadget); in multi_bind() 398 if (gadget_is_otg(gadget) && !otg_desc[0]) { in multi_bind() 401 usb_desc = usb_otg_descriptor_alloc(gadget); in multi_bind() 406 usb_otg_descriptor_init(gadget, usb_desc); in multi_bind() [all …]
|
/linux-6.3-rc2/drivers/usb/gadget/udc/aspeed-vhub/ |
A D | dev.c | 105 d->gadget.speed = USB_SPEED_UNKNOWN; in ast_vhub_dev_disable() 244 d->gadget.speed); in ast_vhub_std_dev_request() 353 d->gadget.is_selfpowered = 1; in ast_vhub_udc_start() 396 if (gadget_is_dualspeed(gadget)) in ast_vhub_udc_match_ep() 402 if (gadget_is_dualspeed(gadget)) in ast_vhub_udc_match_ep() 408 if (gadget_is_dualspeed(gadget)) in ast_vhub_udc_match_ep() 480 d->driver->suspend(&d->gadget); in ast_vhub_dev_suspend() 489 d->driver->resume(&d->gadget); in ast_vhub_dev_resume() 533 usb_del_gadget_udc(&d->gadget); in ast_vhub_del_dev() 586 d->gadget.ep0 = &d->ep0.ep; in ast_vhub_init_dev() [all …]
|
/linux-6.3-rc2/drivers/usb/phy/ |
A D | phy-gpio-vbus-usb.c | 98 if (!gpio_vbus->phy.otg->gadget) in gpio_vbus_work() 126 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 141 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 155 otg->gadget ? otg->gadget->name : "none"); in gpio_vbus_irq() 157 if (otg->gadget) in gpio_vbus_irq() 167 struct usb_gadget *gadget) in gpio_vbus_set_peripheral() argument 175 if (!gadget) { in gpio_vbus_set_peripheral() 177 otg->gadget->name); in gpio_vbus_set_peripheral() 185 usb_gadget_vbus_disconnect(otg->gadget); in gpio_vbus_set_peripheral() 188 otg->gadget = NULL; in gpio_vbus_set_peripheral() [all …]
|
/linux-6.3-rc2/Documentation/usb/ |
A D | gadget_serial.rst | 27 This document and the gadget serial driver itself are 36 Versions of the gadget serial driver are available for the 38 version 2.3 or later of the gadget serial driver in a 2.6 45 gadget and usb drivers as modules. 56 The gadget serial driver is a Linux USB gadget driver, a USB device 87 On the host-side system, the gadget serial device looks like a 98 With the gadget serial driver and the host side ACM or generic 103 The gadget serial driver only provides simple unreliable data 110 To use the gadget serial driver you must configure the Linux gadget 193 the gadget serial device. For example, the command:: [all …]
|
A D | gadget_configfs.rst | 2 Linux USB gadget configured through configfs 24 Creating a gadget means deciding what configurations there will be 64 $ mkdir $CONFIGFS_HOME/usb_gadget/<gadget name> 174 5. Enabling the gadget 226 6. Disabling the gadget 285 Remove strings directories in the gadget:: 293 and finally remove the gadget:: 296 $ rmdir <gadget name> 380 gadget's UDC attribute is written to, which means binding the gadget 387 - gadget's config_group [all …]
|
A D | gadget_multi.rst | 8 The Multifunction Composite Gadget (or g_multi) is a composite gadget 10 a... multifunction gadget. 17 and RNDIS can be turned off. If they are both enabled the gadget will 26 To make use of the gadget one needs to make it work on host side -- 27 without that there's no hope of achieving anything with the gadget. 47 Detecting as composite gadget 51 gadget which on its own have some conditions[4]. If they are met, 59 The only thing to worry is that the gadget has to have a single 80 of the gadget. 92 Customising the gadget [all …]
|
A D | raw-gadget.rst | 5 USB Raw Gadget is a gadget driver that gives userspace low-level control over 6 the gadget's communication process. 8 Like any other gadget driver, Raw Gadget implements USB devices via the 9 USB gadget API. Unlike most gadget drivers, Raw Gadget does not implement 21 USB gadget layer for userspace. The key differences are: 26 its own and never forward them to the gadget layer. 46 The user can interact with Raw Gadget by opening ``/dev/raw-gadget`` and 53 1. Create a Raw Gadget instance by opening ``/dev/raw-gadget``. 57 Raw Gadget and react to those depending on what kind of USB gadget must 66 endpoints for the gadget and assign addresses in the endpoint descriptors [all …]
|
/linux-6.3-rc2/drivers/usb/isp1760/ |
A D | isp1760-udc.c | 37 return container_of(gadget, struct isp1760_udc, gadget); in gadget_to_udc() 569 udc->gadget.state); in isp1760_udc_set_address() 1140 udc->gadget.state); in isp1760_udc_disconnect() 1199 udc->gadget.speed = USB_SPEED_FULL; in isp1760_udc_reset() 1212 udc->driver->suspend(&udc->gadget); in isp1760_udc_suspend() 1221 udc->driver->resume(&udc->gadget); in isp1760_udc_resume() 1418 udc->gadget.speed = USB_SPEED_HIGH; in isp1760_udc_irq() 1480 udc->gadget.ep0 = &ep->ep; in isp1760_udc_init_eps() 1568 udc->gadget.ops = &isp1760_udc_ops; in isp1760_udc_register() 1571 udc->gadget.name = "isp1761_udc"; in isp1760_udc_register() [all …]
|
/linux-6.3-rc2/drivers/usb/renesas_usbhs/ |
A D | mod_gadget.c | 40 struct usb_gadget gadget; member 88 container_of(g, struct usbhsg_gpriv, gadget) 469 gpriv->driver->suspend(&gpriv->gadget); in usbhsg_irq_dev_state() 906 gpriv->gadget.speed = USB_SPEED_UNKNOWN; in usbhsg_try_stop() 963 &gpriv->gadget); in usbhsg_gadget_start() 966 gpriv->gadget.name); in usbhsg_gadget_start() 1032 gadget->is_selfpowered = (is_self != 0); in usbhsg_set_selfpowered() 1125 gpriv->gadget.dev.parent = dev; in usbhs_mod_gadget_probe() 1132 INIT_LIST_HEAD(&gpriv->gadget.ep_list); in usbhs_mod_gadget_probe() 1149 gpriv->gadget.ep0 = &uep->ep; in usbhs_mod_gadget_probe() [all …]
|
/linux-6.3-rc2/drivers/usb/chipidea/ |
A D | udc.c | 836 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in _gadget_stop_activity() 840 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity() 847 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity() 1012 ci->gadget.is_selfpowered; in isr_get_status_response() 1132 dev_warn(&ci->gadget.dev, in otg_a_alt_hnp_support() 1807 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in ci_udc_match_ep() 1925 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in ci_udc_start() 1978 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in ci_udc_stop() 2088 ci->gadget.sg_supported = 1; in udc_start() 2089 ci->gadget.irq = ci->irq; in udc_start() [all …]
|