Lines Matching +full:pre +full:- +full:packaged
1 .. _usb-hostside-api:
4 The Linux-USB Host Side API
18 That master/slave asymmetry was designed-in for a number of reasons, one
22 distributed auto-configuration since the pre-designated master node
37 USB Host-Side API Model
40 Host-side drivers for USB devices talk to the "usbcore" APIs. There are
41 two. One is intended for *general-purpose* drivers (exposed through
49 - USB supports four kinds of data transfers (control, bulk, interrupt,
54 - The device description model includes one or more "configurations"
60 - From USB 3.0 on configurations have one or more "functions", which
64 - Configurations or functions have one or more "interfaces", each of which may have
74 - Interfaces have one or more "endpoints", each of which supports one
79 - Data transfer on USB is packetized; each endpoint has a maximum
84 - The Linux USB API supports synchronous calls for control and bulk
94 The only host-side drivers that actually touch hardware (reading/writing
101 faults (including software-induced ones like unlinking an URB) isn't yet
105 well as to make sure they aren't relying on some HCD-specific behavior.
109 USB-Standard Types
120 .. kernel-doc:: drivers/usb/common/common.c
128 Host-Side Data Types and Macros
136 .. kernel-doc:: include/linux/usb.h
148 per-packet fault reports). Built on top of that is synchronous API
151 wrappers for single-buffer control and bulk transfers (which are awkward
161 .. kernel-doc:: drivers/usb/core/urb.c
165 .. kernel-doc:: drivers/usb/core/message.c
168 .. kernel-doc:: drivers/usb/core/file.c
171 .. kernel-doc:: drivers/usb/core/driver.c
174 .. kernel-doc:: drivers/usb/core/usb.c
177 .. kernel-doc:: drivers/usb/core/hub.c
194 based controllers (and a few non-PCI based ones) use one of those
204 significantly reduce hcd-specific behaviors.
206 .. kernel-doc:: drivers/usb/core/hcd.c
209 .. kernel-doc:: drivers/usb/core/hcd-pci.c
212 .. kernel-doc:: drivers/usb/core/buffer.c
220 drivers are usually packaged as applications or libraries, and may use
224 - `libusb <http://libusb.sourceforge.net>`__ for C/C++, and
225 - `jUSB <http://jUSB.sourceforge.net>`__ for Java.
229 at http://www.linux-usb.org/
233 - They were used to be implemented via *usbfs*, but this is not part of
236 - This particular documentation is incomplete, especially with respect
238 (new) documentation need to be cross-reviewed.
241 -----------------------------
245 - ``/dev/bus/usb/BBB/DDD`` ... magic files exposing the each device's
261 --------------------
265 - *They can be read,* producing first the device descriptor (18 bytes) and
270 the BCD-encoded fields, and the vendor and product IDs) will be
275 - *Perform USB operations* using *ioctl()* requests to make endpoint I/O
289 it's relatively common for devices to re-enumerate while they are
296 configuration of the device. Multi-byte fields in the device descriptor
304 These files may also be used to write user-level drivers for the USB
321 -------------------------------
340 (An example might be software using vendor-specific control requests for
344 More likely, you need a more complex style driver: one using non-control
353 Your user-mode driver should never need to worry about cleaning up
358 --------------------
375 :ref:`usb-error-codes`).
380 hub_wq (in the kernel) setting a device-wide *configuration* that
453 * 'request' becomes the driver->ioctl() 'code' parameter.
455 * is copied to or from the driver->ioctl() 'buf' parameter.
474 devices what device special file should be used. Two pre-defined
550 returning ``-EPIPE`` status to a data transfer request. Do not issue
632 These requests are packaged into a structure that resembles the URB used
637 (It's usually a pointer to per-request data.) Flags can modify requests
696 - ``/sys/kernel/debug/usb/devices`` ... a text file showing each of the USB
701 -----------------------------
705 (including class and vendor status) is available from device-specific
718 poll(&pfd, 1, -1);
726 udev or HAL to initialize a device or start a user-mode helper program,
737 Each line is tagged with a one-character ID for that line::
880 rather differently. For example, a bus-powered configuration
881 might be much less capable than one that is self-powered. Only
910 of bus bandwidth, drivers must select a non-default altsetting.
934 the per-microframe data transfer size. For "high bandwidth"
938 With the Linux-USB stack, periodic bandwidth reservations use the
948 ``grep -i ^[tdp]: /sys/kernel/debug/usb/devices`` can be used to list
1027 +------------------+
1029 +------------------+ (nn) is Mbps.
1031 +------------------+
1034 +-----------------------+
1035 Level 1 | Dev#2: 4-port hub (12)|
1036 +-----------------------+
1038 +-----------------------+
1042 +--------------------+ +--------------------+
1044 +--------------------+ +--------------------+
1048 Or, in a more tree-like structure (ports [Connectors] without