Home
last modified time | relevance | path

Searched refs:gadget (Results 1 – 25 of 308) sorted by relevance

12345678910>>...13

/linux-6.15/drivers/usb/gadget/udc/
H A Dcore.c489 ret = gadget->ops->get_frame(gadget); in usb_gadget_frame_number()
519 ret = gadget->ops->wakeup(gadget); in usb_gadget_wakeup()
662 ret = gadget->ops->vbus_draw(gadget, mA); in usb_gadget_vbus_draw()
723 ret = gadget->ops->pullup(gadget, 1); in usb_gadget_connect_locked()
777 ret = gadget->ops->pullup(gadget, 0); in usb_gadget_disconnect_locked()
783 gadget->udc->driver->disconnect(gadget); in usb_gadget_disconnect_locked()
1249 udc->gadget->ops->udc_stop(udc->gadget); in usb_gadget_udc_stop_locked()
1266 struct usb_gadget *gadget = udc->gadget; in usb_gadget_udc_set_speed() local
1275 gadget->ops->udc_set_ssp_rate(gadget, gadget->max_ssp_rate); in usb_gadget_udc_set_speed()
1277 gadget->ops->udc_set_speed(gadget, s); in usb_gadget_udc_set_speed()
[all …]
H A Dfsl_udc_core.c312 dev_vdbg(&udc->gadget.dev, in dr_controller_setup()
384 if (udc->gadget.is_otg) { in dr_controller_stop()
1154 struct fsl_udc *udc = container_of(gadget, struct fsl_udc, gadget); in fsl_wakeup()
1183 udc = container_of(gadget, struct fsl_udc, gadget); in fsl_vbus_session()
1208 udc = container_of(gadget, struct fsl_udc, gadget); in fsl_vbus_draw()
1221 udc = container_of(gadget, struct fsl_udc, gadget); in fsl_pullup()
1639 dev_err(&udc->gadget.dev, in process_ep_req()
1658 dev_vdbg(&udc->gadget.dev, in process_ep_req()
1711 dev_vdbg(&udc->gadget.dev, in dtd_complete_irq()
1751 udc->gadget.speed = in port_change_irq()
[all …]
/linux-6.15/include/linux/usb/
H A Dgadget.h335 int (*check_config)(struct usb_gadget *gadget);
463 { dev_set_drvdata(&gadget->dev, data); } in set_gadget_data()
465 { return dev_get_drvdata(&gadget->dev); } in get_gadget_data()
472 get_device(&gadget->dev); in usb_get_gadget()
473 return gadget; in usb_get_gadget()
477 put_device(&gadget->dev); in usb_put_gadget()
492 #define gadget_for_each_ep(tmp, gadget) \ argument
611 int usb_gadget_wakeup(struct usb_gadget *gadget);
618 int usb_gadget_connect(struct usb_gadget *gadget);
739 int (*bind)(struct usb_gadget *gadget,
[all …]
/linux-6.15/Documentation/ABI/testing/
H A Dconfigfs-usb-gadget1 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 …]
H A Dconfigfs-usb-gadget-uvc1 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 …]
H A Dsysfs-devices-platform-_UDC_-gadget1 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.15/drivers/usb/gadget/
H A Depautoconf.c64 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 …]
H A Dcomposite.c505 struct usb_gadget *gadget = func->config->cdev->gadget; in usb_func_wakeup() local
525 return gadget->ops->func_wakeup(gadget, id); in usb_func_wakeup()
616 struct usb_gadget *gadget = cdev->gadget; in config_desc() local
623 speed = gadget->speed; in config_desc()
679 struct usb_gadget *gadget = cdev->gadget; in count_configs() local
740 cdev->gadget->ops->get_config_params(cdev->gadget, in bos_desc()
950 struct usb_gadget *gadget = cdev->gadget; in set_config() local
1896 if (gadget->otg_caps && in composite_setup()
1983 if (gadget_is_otg(gadget) && gadget->hnp_polling_support && in composite_setup()
2432 struct usb_gadget *gadget = cdev->gadget; in composite_dev_prepare() local
[all …]
/linux-6.15/drivers/usb/gadget/udc/bdc/
H A Dbdc_udc.c98 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.15/drivers/usb/gadget/legacy/
H A Ddbgp.c27 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 …]
H A Draw_gadget.c304 dev->gadget = gadget; in gadget_bind()
452 if (!dev->gadget) { in raw_release()
630 if (!dev->gadget) { in raw_ioctl_event_fetch()
694 if (!dev->gadget) { in raw_process_ep0_io()
808 if (!dev->gadget) { in raw_ioctl_ep0_stall()
867 if (!dev->gadget) { in raw_ioctl_ep_enable()
930 if (!dev->gadget) { in raw_ioctl_ep_disable()
985 if (!dev->gadget) { in raw_ioctl_ep_set_clear_halt_wedge()
1071 if (!dev->gadget) { in raw_process_ep_io()
1194 if (!dev->gadget) { in raw_ioctl_configure()
[all …]
H A Dether.c214 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 …]
H A Dcdc2.c93 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()
H A Dprinter.c116 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()
H A Dinode.c148 struct usb_gadget *gadget; member
961 && (dev->gadget->speed in ep0_read()
1153 dev->gadget->ep0, dev->req, in ep0_write()
1256 struct usb_gadget *gadget = dev->gadget; in gadget_dev_ioctl() local
1263 } else if (gadget->ops->ioctl) { in gadget_dev_ioctl()
1267 ret = gadget->ops->ioctl (gadget, code, value); in gadget_dev_ioctl()
1667 set_gadget_data (gadget, NULL); in gadgetfs_unbind()
1691 set_gadget_data (gadget, dev); in gadgetfs_bind()
1692 dev->gadget = gadget; in gadgetfs_bind()
1693 gadget->ep0->driver_data = dev; in gadgetfs_bind()
[all …]
H A Dncm.c99 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()
H A Dmulti.c138 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.15/drivers/usb/gadget/udc/aspeed-vhub/
H A Ddev.c104 d->gadget.speed = USB_SPEED_UNKNOWN; in ast_vhub_dev_disable()
243 d->gadget.speed); in ast_vhub_std_dev_request()
352 d->gadget.is_selfpowered = 1; in ast_vhub_udc_start()
395 if (gadget_is_dualspeed(gadget)) in ast_vhub_udc_match_ep()
401 if (gadget_is_dualspeed(gadget)) in ast_vhub_udc_match_ep()
407 if (gadget_is_dualspeed(gadget)) in ast_vhub_udc_match_ep()
479 d->driver->suspend(&d->gadget); in ast_vhub_dev_suspend()
488 d->driver->resume(&d->gadget); in ast_vhub_dev_resume()
532 usb_del_gadget_udc(&d->gadget); in ast_vhub_del_dev()
588 d->gadget.ep0 = &d->ep0.ep; in ast_vhub_init_dev()
[all …]
/linux-6.15/drivers/usb/phy/
H A Dphy-gpio-vbus-usb.c98 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.15/Documentation/usb/
H A Dgadget_serial.rst27 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 …]
H A Dgadget_configfs.rst2 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 …]
H A Dgadget_multi.rst8 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 …]
/linux-6.15/drivers/usb/isp1760/
H A Disp1760-udc.c37 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.15/drivers/usb/renesas_usbhs/
H A Dmod_gadget.c40 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.15/drivers/usb/chipidea/
H A Dudc.c994 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in _gadget_stop_activity()
998 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity()
1005 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity()
1182 ci->gadget.is_selfpowered; in isr_get_status_response()
1302 dev_warn(&ci->gadget.dev, in otg_a_alt_hnp_support()
1987 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in ci_udc_match_ep()
2105 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in ci_udc_start()
2158 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in ci_udc_stop()
2271 ci->gadget.sg_supported = 1; in udc_start()
2272 ci->gadget.irq = ci->irq; in udc_start()
[all …]

12345678910>>...13