Home
last modified time | relevance | path

Searched full:gadget (Results 1 – 25 of 412) sorted by relevance

12345678910>>...17

/linux-6.12.1/drivers/usb/gadget/udc/
Dcore.c22 #include <linux/usb/gadget.h>
33 * @driver: the gadget driver pointer. For use by the class code
35 * @gadget: the gadget. For use by the class code
41 * Set/cleared by gadget_(un)bind_driver() after gadget driver is bound or
44 * @connect_lock: protects udc->started, gadget->connect,
45 * gadget->allow_connect and gadget->deactivate. The routines
51 * to hold information about udc driver and gadget together.
55 struct usb_gadget *gadget; member
149 * gadget drivers must call usb_ep_enable() again before queueing
232 * request queued; they complete in FIFO order. Once a gadget driver
[all …]
DKconfig3 # USB Gadget support on a system involves
5 # (b) the gadget driver using it.
7 # NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
25 # - debug/dummy gadget+hcd is last.
44 gadget drivers to also be dynamically linked.
56 gadget drivers to also be dynamically linked.
103 all gadget drivers to also be dynamically linked.
130 gadget drivers to also be dynamically linked.
146 gadget drivers to also be dynamically linked.
148 # if there's only one gadget driver, using only two bulk endpoints,
[all …]
Dfsl_udc_core.c33 #include <linux/usb/gadget.h>
183 usb_gadget_unmap_request(&ep->udc->gadget, &req->req, ep_is_in(ep)); in done()
186 dev_vdbg(&udc->gadget.dev, "complete %s req %p stat %d len %u/%u\n", in done()
288 dev_err(&udc->gadget.dev, "udc reset timeout!\n"); in dr_controller_setup()
311 dev_vdbg(&udc->gadget.dev, in dr_controller_setup()
383 if (udc->gadget.is_otg) { in dr_controller_stop()
502 dev_vdbg(&udc->gadget.dev, "error ep type is %d\n", ep_type); in struct_ep_qh_setup()
535 * for example the do_set_interface() in gadget layer,
558 if (!udc->driver || (udc->gadget.speed == USB_SPEED_UNKNOWN)) in fsl_ep_enable()
568 /* Assume the max packet size from gadget is always correct */ in fsl_ep_enable()
[all …]
/linux-6.12.1/Documentation/usb/
Draw-gadget.rst2 USB Raw Gadget
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
12 Raw Gadget is currently a strictly debugging feature and should not be used
20 Raw Gadget is similar to GadgetFS but provides more direct access to the
21 USB gadget layer for userspace. The key differences are:
23 1. Raw Gadget passes every USB request to userspace to get a response, while
26 its own and never forward them to the gadget layer.
[all …]
Dgadget_serial.rst2 Linux Gadget Serial Driver v2.0
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
61 The gadget serial driver talks over USB to either a CDC ACM driver
75 Gadget |
77 | Gadget USB Periph. | |
78 | Device-Side | Gadget | Controller | |
[all …]
Dgadget_multi.rst2 Multifunction Composite Gadget
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.
33 Since the gadget uses standard composite framework and appears as such
45 For the gadget to work under Windows two conditions have to be met:
47 Detecting as composite gadget
50 First of all, Windows need to detect the gadget as an USB composite
[all …]
Dgadget_configfs.rst2 Linux USB gadget configured through configfs
14 A USB Linux Gadget is a device which has a UDC (USB Device Controller) and can
18 A gadget is seen by its host as a set of configurations, each of which contains
19 a number of interfaces which, from the gadget's perspective, are known as
24 Creating a gadget means deciding what configurations there will be
31 It also describes how configfs integration into gadget is designed.
62 For each gadget to be created its corresponding directory must be created::
64 $ mkdir $CONFIGFS_HOME/usb_gadget/<gadget name>
76 Each gadget needs to have its vendor id <VID> and product id <PID> specified::
81 A gadget also needs its serial number, manufacturer and product strings.
[all …]
Dmass-storage.rst2 Mass Storage Gadget (MSG)
8 Mass Storage Gadget (or MSG) acts as a USB Mass Storage device,
12 to read-only, and gadget can indicate that it is removable and/or
26 This document describes how to use the gadget from user space, its
28 using it, and how it differs from File Storage Gadget (or FSG)
35 The mass storage gadget accepts the following mass storage specific
62 If this option is set for a logical unit, gadget will accept an
75 true. This has been changed to better match File Storage Gadget
83 reader). It does *not* mean that the entire gadget can be
99 backing file could not be opened in read/write mode, the gadget
[all …]
/linux-6.12.1/drivers/usb/gadget/legacy/
DKconfig3 # USB Gadget support on a system involves
5 # (b) the gadget driver using it.
7 # NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
16 # A Linux "Gadget Driver" talks to the USB Peripheral Controller
17 # driver through the abstract "gadget" API. Some other operating
20 # A gadget driver implements one or more USB functions using
23 # Gadget drivers are hardware-neutral, or "platform independent",
27 # enough of the right types of endpoints, the gadget driver might
32 # gadget configuration. In the device model, each option contains
33 # both the device instantiation as a child for a USB gadget
[all …]
Draw_gadget.c3 * USB Raw Gadget driver.
4 * See Documentation/usb/raw-gadget.rst for more details.
27 #include <linux/usb/gadget.h>
32 #define DRIVER_DESC "USB Raw Gadget"
33 #define DRIVER_NAME "raw-gadget"
175 struct usb_gadget *gadget; member
216 usb_ep_dequeue(dev->gadget->ep0, dev->req); in dev_free()
217 usb_ep_free_request(dev->gadget->ep0, dev->req); in dev_free()
280 static int gadget_bind(struct usb_gadget *gadget, in gadget_bind() argument
289 if (strcmp(gadget->name, dev->udc_name) != 0) in gadget_bind()
[all …]
Ddbgp.c3 * dbgp.c -- EHCI Debug Port device gadget
15 #include <linux/usb/gadget.h>
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()
204 dev_dbg(&dbgp.gadget->dev, "enable ep: failure (%d:%d)\n", stp, err); in dbgp_enable_ep()
209 static void dbgp_disconnect(struct usb_gadget *gadget) in dbgp_disconnect() argument
218 static void dbgp_unbind(struct usb_gadget *gadget) in dbgp_unbind() argument
226 usb_ep_free_request(gadget->ep0, dbgp.req); in dbgp_unbind()
235 static int dbgp_configure_endpoints(struct usb_gadget *gadget) in dbgp_configure_endpoints() argument
[all …]
/linux-6.12.1/Documentation/ABI/testing/
Dconfigfs-usb-gadget1 What: /config/usb-gadget
8 What: /config/usb-gadget/gadget
13 The attributes of a gadget:
16 UDC bind a gadget to UDC/unbind a gadget;
18 to bind a gadget, empty string "" to unbind.
34 What: /config/usb-gadget/gadget/configs
38 This group contains a USB gadget's configurations
40 What: /config/usb-gadget/gadget/configs/config
51 What: /config/usb-gadget/gadget/configs/config/strings
58 What: /config/usb-gadget/gadget/configs/config/strings/language
[all …]
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
47 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output
52 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output/default
69 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera
74 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera/default
[all …]
/linux-6.12.1/include/linux/usb/
Dgadget.h3 * <linux/usb/gadget.h>
5 * We call the USB code inside a Linux-based peripheral device a "gadget"
66 * @list: For use by the gadget driver.
200 * @ep_list:the gadget's ep_list holds all of its endpoints
214 * @driver_data:for use by the gadget driver.
223 * gadget->ep_list. the control endpoint (gadget->ep0) is not in that list,
315 int (*func_wakeup)(struct usb_gadget *gadget, int intf_id);
329 void (*udc_set_ssp_rate)(struct usb_gadget *gadget,
331 void (*udc_async_callbacks)(struct usb_gadget *gadget, bool enable);
335 int (*check_config)(struct usb_gadget *gadget);
[all …]
/linux-6.12.1/Documentation/driver-api/usb/
Dgadget.rst2 USB Gadget API for Linux
11 This document presents a Linux-USB "Gadget" kernel mode API, for use
21 just two fixed-function ones. Gadget drivers can be written so
46 are "USB gadget drivers". In USB protocol interactions, the device
47 driver is the master (or "client driver") and the gadget driver is the
50 The gadget API resembles the host side Linux-USB API in that both use
56 details and assumptions that are inappropriate for a gadget API. While
62 Structure of Gadget Drivers
67 additional layers in user space code. The ``gadget`` API is used by the
76 ``<linux/usb/gadget.h>`` API abstracts the peripheral controller
[all …]
/linux-6.12.1/drivers/usb/gadget/udc/aspeed-vhub/
Ddev.c3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget
5 * dev.c - Individual device/gadget management (ie, a port = a gadget)
22 #include <linux/usb/gadget.h>
60 if (d->gadget.speed == USB_SPEED_HIGH) in ast_vhub_dev_enable()
104 d->gadget.speed = USB_SPEED_UNKNOWN; in ast_vhub_dev_disable()
173 st0 = d->gadget.is_selfpowered << USB_DEVICE_SELF_POWERED; in ast_vhub_dev_status()
238 if (d->gadget.speed == USB_SPEED_UNKNOWN) { in ast_vhub_std_dev_request()
239 d->gadget.speed = ep->vhub->speed; in ast_vhub_std_dev_request()
240 if (d->gadget.speed > d->driver->max_speed) in ast_vhub_std_dev_request()
241 d->gadget.speed = d->driver->max_speed; in ast_vhub_std_dev_request()
[all …]
/linux-6.12.1/drivers/usb/gadget/udc/bdc/
Dbdc_udc.c9 * Based on drivers under drivers/usb/gadget/udc/
27 #include <linux/usb/gadget.h>
86 bdc->gadget.ep0->maxpacket = EP0_MAX_PKT_SIZE; in bdc_uspc_connected()
87 bdc->gadget.speed = USB_SPEED_SUPER; in bdc_uspc_connected()
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()
[all …]
/linux-6.12.1/drivers/usb/gadget/
Depautoconf.c3 * epautoconf.c -- endpoint autoconfiguration for usb gadget drivers
17 #include <linux/usb/gadget.h>
22 * @gadget: The device to which the endpoint must belong.
37 * this routine simplifies writing gadget drivers that work with
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()
79 if (usb_gadget_ep_match_desc(gadget, ep, desc, ep_comp)) in usb_ep_autoconfig_ss()
100 if (++gadget->in_epnum > 15) in usb_ep_autoconfig_ss()
[all …]
Dcomposite.c27 * struct usb_os_string - represents OS String to be reported by a gadget
43 * The code in this file is utility code, used to build a gadget driver
69 * NOTE: we try to help gadget drivers which might not be setting in function_descriptors()
94 * if we can't find any descriptors at all, then this gadget deserves to in function_descriptors()
134 * according to gadget speed.
135 * @g: pointer to the gadget
143 * endpoint according to gadget speed and saves it in the
272 * according to gadget speed.
273 * @g: pointer to the gadget
280 * endpoint according to gadget speed and saves it in the
[all …]
DKconfig3 # USB Gadget support on a system involves
5 # (b) the gadget driver using it.
7 # NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
18 tristate "USB Gadget Support"
37 peripheral/device side bus controller, and a "gadget driver" for
38 your peripheral protocol. (If you use modular gadget drivers,
44 For more information, see <http://www.linux-usb.org/gadget> and
53 Many controller and gadget drivers will print some debugging
67 Many controller and gadget drivers will print verbose debugging
81 Some of the drivers in the "gadget" framework can expose
[all …]
/linux-6.12.1/drivers/usb/phy/
Dphy-gpio-vbus-usb.c19 #include <linux/usb/gadget.h>
98 if (!gpio_vbus->phy.otg->gadget) in gpio_vbus_work()
116 usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
126 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
135 usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
141 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
153 dev_dbg(&pdev->dev, "VBUS %s (gadget: %s)\n", in gpio_vbus_irq()
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
[all …]
Dphy-tahvo.c23 #include <linux/usb/gadget.h>
79 /* Enable the gadget driver */ in check_vbus_state()
80 if (tu->phy.otg->gadget) in check_vbus_state()
81 usb_gadget_vbus_connect(tu->phy.otg->gadget); in check_vbus_state()
99 if (tu->phy.otg->gadget) in check_vbus_state()
100 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in check_vbus_state()
156 if (tu->phy.otg->gadget) in tahvo_usb_stop_peripheral()
157 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in tahvo_usb_stop_peripheral()
165 /* Disable gadget controller if any */ in tahvo_usb_power_off()
166 if (tu->phy.otg->gadget) in tahvo_usb_power_off()
[all …]
/linux-6.12.1/drivers/usb/renesas_usbhs/
Dmod_gadget.c15 #include <linux/usb/gadget.h>
40 struct usb_gadget gadget; member
88 container_of(g, struct usbhsg_gpriv, gadget)
107 #define usbhsg_is_not_connected(gp) ((gp)->gadget.speed == USB_SPEED_UNKNOWN)
462 gpriv->gadget.speed = usbhs_bus_get_speed(priv); in usbhsg_irq_dev_state()
464 dev_dbg(dev, "state = %x : speed : %d\n", state, gpriv->gadget.speed); in usbhsg_irq_dev_state()
466 if (gpriv->gadget.speed != USB_SPEED_UNKNOWN && in usbhsg_irq_dev_state()
469 gpriv->driver->suspend(&gpriv->gadget); in usbhsg_irq_dev_state()
470 usb_gadget_set_state(&gpriv->gadget, USB_STATE_SUSPENDED); in usbhsg_irq_dev_state()
543 ret = gpriv->driver->setup(&gpriv->gadget, &ctrl); in usbhsg_irq_ctrl_stage()
[all …]
/linux-6.12.1/drivers/usb/isp1760/
Disp1760-udc.c35 static inline struct isp1760_udc *gadget_to_udc(struct usb_gadget *gadget) in gadget_to_udc() argument
37 return container_of(gadget, struct isp1760_udc, gadget); in gadget_to_udc()
199 * calling the request complete callback. This gives the gadget an in isp1760_udc_request_complete()
278 * any gadget driver either. in isp1760_udc_receive()
492 * TODO: Does the gadget framework require synchronizatino with in __isp1760_udc_set_halt()
566 if (udc->gadget.state != USB_STATE_DEFAULT && in isp1760_udc_set_address()
567 udc->gadget.state != USB_STATE_ADDRESS) { in isp1760_udc_set_address()
569 udc->gadget.state); in isp1760_udc_set_address()
573 usb_gadget_set_state(&udc->gadget, addr ? USB_STATE_ADDRESS : in isp1760_udc_set_address()
617 * If the endpoint is wedged only the gadget can clear in isp1760_ep0_setup_standard()
[all …]
/linux-6.12.1/drivers/usb/cdns3/
Dcdns3-ep0.c3 * Cadence USBSS DRD Driver - gadget side.
16 #include "cdns3-gadget.h"
27 * @priv_dev: extended gadget object
77 * Setup is handled by gadget driver
78 * @priv_dev: extended gadget object
90 ret = priv_dev->gadget_driver->setup(&priv_dev->gadget, ctrl_req); in cdns3_ep0_delegate_req()
130 * @priv_dev: extended gadget object
139 enum usb_device_state device_state = priv_dev->gadget.state; in cdns3_req_ep0_set_configuration()
167 usb_gadget_set_state(&priv_dev->gadget, in cdns3_req_ep0_set_configuration()
175 * @priv_dev: extended gadget object
[all …]

12345678910>>...17