Home
last modified time | relevance | path

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

12345678910>>...13

/linux/Documentation/usb/
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A Dgadget_uvc.rst2 Linux UVC Gadget Driver
7 The UVC Gadget driver is a driver for hardware on the *device* side of a USB
14 On the host side (once connected via USB cable), a device running the UVC Gadget
26 USB_F_UVC must be selected to enable support for the UVC gadget.
28 Configuring the gadget through configfs
30 The UVC Gadget expects to be configured through configfs using the UVC function.
35 see Documentation/ABI/testing/configfs-usb-gadget-uvc
40 created a gadget as `/sys/kernel/config/usb_gadget/g1`.
51 GADGET="$CONFIGFS/usb_gadget/g1"
52 FUNCTION="$GADGET/functions/uvc.0"
[all …]
/linux/drivers/usb/gadget/legacy/
H A 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 …]
H A 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 …]
H A Dprinter.c3 * printer.c -- Printer gadget driver
15 #include <linux/usb/gadget.h>
20 #define DRIVER_DESC "Printer Gadget"
36 #define PRINTER_PRODUCT_NUM 0xa4a8 /* Linux-USB Printer Gadget */
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()
[all …]
H A Dinode.c3 * inode.c -- user mode filesystem api for usb gadget controllers
34 #include <linux/usb/gadget.h>
56 * - First, dev_config() is called when /dev/gadget/$CHIP is configured
62 * called when each /dev/gadget/ep* file is configured (by writing
73 #define DRIVER_DESC "USB Gadget filesystem"
90 /* /dev/gadget/$CHIP represents ep0 and the whole device */
95 /* Only one open() of /dev/gadget/$CHIP; only one file tracks
148 struct usb_gadget *gadget;
190 /* other /dev/gadget/$ENDPOINT files represent endpoints */
243 /* NOTE: don't use dev_printk calls before binding to the gadget
147 struct usb_gadget *gadget; global() member
1255 struct usb_gadget *gadget = dev->gadget; gadget_dev_ioctl() local
1334 gadgetfs_setup(struct usb_gadget * gadget,const struct usb_ctrlrequest * ctrl) gadgetfs_setup() argument
1649 gadgetfs_unbind(struct usb_gadget * gadget) gadgetfs_unbind() argument
1677 gadgetfs_bind(struct usb_gadget * gadget,struct usb_gadget_driver * driver) gadgetfs_bind() argument
1717 gadgetfs_disconnect(struct usb_gadget * gadget) gadgetfs_disconnect() argument
1735 gadgetfs_suspend(struct usb_gadget * gadget) gadgetfs_suspend() argument
[all...]
H A Dether.c3 * ether.c -- Ethernet gadget driver, with CDC and non-CDC options
26 * Ethernet gadget driver -- with CDC and non-CDC options
60 #define DRIVER_DESC "Ethernet Gadget"
116 #define CDC_PRODUCT_NUM 0xa4a1 /* Linux-USB Ethernet Gadget */
138 #define RNDIS_PRODUCT_NUM 0xa4a2 /* Ethernet/RNDIS Gadget */
142 #define EEM_PRODUCT_NUM 0x0102 /* EEM Gadget */
214 if (gadget_is_otg(c->cdev->gadget)) { in rndis_do_config()
256 if (gadget_is_otg(c->cdev->gadget)) { in eth_do_config()
271 } else if (can_support_ecm(c->cdev->gadget)) { in eth_do_config()
306 struct usb_gadget *gadget = cdev->gadget; in eth_bind() local
[all …]
/linux/Documentation/ABI/testing/
H A 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 …]
/linux/include/linux/usb/
H A 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 …]
H A Dcomposite.h12 * This framework is an optional layer on top of the USB Gadget interface,
27 #include <linux/usb/gadget.h>
42 * the gadget driver's setup() callback.
138 * @bind: Before the gadget can register, all of its functions bind() to the
152 * include host resetting or reconfiguring the gadget, and disconnection.
169 * setting up a gadget driver. Those resources include endpoints, which
262 * struct usb_configuration - represents one gadget configuration
280 * Configurations are building blocks for gadget drivers structured around
354 * struct usb_composite_driver - groups configurations into a gadget
363 * @needs_serial: set to 1 if the gadget needs userspace to provide
[all …]
/linux/Documentation/driver-api/usb/
H A 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/drivers/usb/gadget/udc/aspeed-vhub/
H A 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/drivers/usb/gadget/udc/bdc/
H A 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/drivers/usb/gadget/
H A 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 …]
H A 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 …]
H A 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/drivers/usb/gadget/udc/
H A 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 …]
/linux/drivers/usb/renesas_usbhs/
H A 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/drivers/usb/isp1760/
H A 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/drivers/usb/cdns3/
H A 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 …]
/linux/drivers/usb/chipidea/
H A Ddebug.c10 #include <linux/usb/gadget.h>
27 struct usb_gadget *gadget = &ci->gadget; in ci_device_show() local
29 seq_printf(s, "speed = %d\n", gadget->speed); in ci_device_show()
30 seq_printf(s, "max_speed = %d\n", gadget->max_speed); in ci_device_show()
31 seq_printf(s, "is_otg = %d\n", gadget->is_otg); in ci_device_show()
32 seq_printf(s, "is_a_peripheral = %d\n", gadget->is_a_peripheral); in ci_device_show()
33 seq_printf(s, "b_hnp_enable = %d\n", gadget->b_hnp_enable); in ci_device_show()
34 seq_printf(s, "a_hnp_support = %d\n", gadget->a_hnp_support); in ci_device_show()
35 seq_printf(s, "a_alt_hnp_support = %d\n", gadget->a_alt_hnp_support); in ci_device_show()
37 (gadget->name ? gadget->name : "")); in ci_device_show()
[all …]

12345678910>>...13