diff options
Diffstat (limited to 'include/linux/usb_gadget.h')
-rw-r--r-- | include/linux/usb_gadget.h | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index 4f59b2aa8a9e..ec9732e7fea2 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h | |||
@@ -22,10 +22,10 @@ struct usb_ep; | |||
22 | /** | 22 | /** |
23 | * struct usb_request - describes one i/o request | 23 | * struct usb_request - describes one i/o request |
24 | * @buf: Buffer used for data. Always provide this; some controllers | 24 | * @buf: Buffer used for data. Always provide this; some controllers |
25 | * only use PIO, or don't use DMA for some endpoints. | 25 | * only use PIO, or don't use DMA for some endpoints. |
26 | * @dma: DMA address corresponding to 'buf'. If you don't set this | 26 | * @dma: DMA address corresponding to 'buf'. If you don't set this |
27 | * field, and the usb controller needs one, it is responsible | 27 | * field, and the usb controller needs one, it is responsible |
28 | * for mapping and unmapping the buffer. | 28 | * for mapping and unmapping the buffer. |
29 | * @length: Length of that data | 29 | * @length: Length of that data |
30 | * @no_interrupt: If true, hints that no completion irq is needed. | 30 | * @no_interrupt: If true, hints that no completion irq is needed. |
31 | * Helpful sometimes with deep request queues that are handled | 31 | * Helpful sometimes with deep request queues that are handled |
@@ -45,16 +45,16 @@ struct usb_ep; | |||
45 | * @context: For use by the completion callback | 45 | * @context: For use by the completion callback |
46 | * @list: For use by the gadget driver. | 46 | * @list: For use by the gadget driver. |
47 | * @status: Reports completion code, zero or a negative errno. | 47 | * @status: Reports completion code, zero or a negative errno. |
48 | * Normally, faults block the transfer queue from advancing until | 48 | * Normally, faults block the transfer queue from advancing until |
49 | * the completion callback returns. | 49 | * the completion callback returns. |
50 | * Code "-ESHUTDOWN" indicates completion caused by device disconnect, | 50 | * Code "-ESHUTDOWN" indicates completion caused by device disconnect, |
51 | * or when the driver disabled the endpoint. | 51 | * or when the driver disabled the endpoint. |
52 | * @actual: Reports bytes transferred to/from the buffer. For reads (OUT | 52 | * @actual: Reports bytes transferred to/from the buffer. For reads (OUT |
53 | * transfers) this may be less than the requested length. If the | 53 | * transfers) this may be less than the requested length. If the |
54 | * short_not_ok flag is set, short reads are treated as errors | 54 | * short_not_ok flag is set, short reads are treated as errors |
55 | * even when status otherwise indicates successful completion. | 55 | * even when status otherwise indicates successful completion. |
56 | * Note that for writes (IN transfers) some data bytes may still | 56 | * Note that for writes (IN transfers) some data bytes may still |
57 | * reside in a device-side FIFO when the request is reported as | 57 | * reside in a device-side FIFO when the request is reported as |
58 | * complete. | 58 | * complete. |
59 | * | 59 | * |
60 | * These are allocated/freed through the endpoint they're used with. The | 60 | * These are allocated/freed through the endpoint they're used with. The |
@@ -128,7 +128,7 @@ struct usb_ep_ops { | |||
128 | * value can sometimes be reduced (hardware allowing), according to | 128 | * value can sometimes be reduced (hardware allowing), according to |
129 | * the endpoint descriptor used to configure the endpoint. | 129 | * the endpoint descriptor used to configure the endpoint. |
130 | * @driver_data:for use by the gadget driver. all other fields are | 130 | * @driver_data:for use by the gadget driver. all other fields are |
131 | * read-only to gadget drivers. | 131 | * read-only to gadget drivers. |
132 | * | 132 | * |
133 | * the bus controller driver lists all the general purpose endpoints in | 133 | * the bus controller driver lists all the general purpose endpoints in |
134 | * gadget->ep_list. the control endpoint (gadget->ep0) is not in that list, | 134 | * gadget->ep_list. the control endpoint (gadget->ep0) is not in that list, |
@@ -148,10 +148,10 @@ struct usb_ep { | |||
148 | /** | 148 | /** |
149 | * usb_ep_enable - configure endpoint, making it usable | 149 | * usb_ep_enable - configure endpoint, making it usable |
150 | * @ep:the endpoint being configured. may not be the endpoint named "ep0". | 150 | * @ep:the endpoint being configured. may not be the endpoint named "ep0". |
151 | * drivers discover endpoints through the ep_list of a usb_gadget. | 151 | * drivers discover endpoints through the ep_list of a usb_gadget. |
152 | * @desc:descriptor for desired behavior. caller guarantees this pointer | 152 | * @desc:descriptor for desired behavior. caller guarantees this pointer |
153 | * remains valid until the endpoint is disabled; the data byte order | 153 | * remains valid until the endpoint is disabled; the data byte order |
154 | * is little-endian (usb-standard). | 154 | * is little-endian (usb-standard). |
155 | * | 155 | * |
156 | * when configurations are set, or when interface settings change, the driver | 156 | * when configurations are set, or when interface settings change, the driver |
157 | * will enable or disable the relevant endpoints. while it is enabled, an | 157 | * will enable or disable the relevant endpoints. while it is enabled, an |
@@ -232,7 +232,7 @@ usb_ep_free_request (struct usb_ep *ep, struct usb_request *req) | |||
232 | * @ep:the endpoint associated with the request | 232 | * @ep:the endpoint associated with the request |
233 | * @req:the request being submitted | 233 | * @req:the request being submitted |
234 | * @gfp_flags: GFP_* flags to use in case the lower level driver couldn't | 234 | * @gfp_flags: GFP_* flags to use in case the lower level driver couldn't |
235 | * pre-allocate all necessary memory with the request. | 235 | * pre-allocate all necessary memory with the request. |
236 | * | 236 | * |
237 | * This tells the device controller to perform the specified request through | 237 | * This tells the device controller to perform the specified request through |
238 | * that endpoint (reading or writing a buffer). When the request completes, | 238 | * that endpoint (reading or writing a buffer). When the request completes, |
@@ -415,7 +415,7 @@ struct usb_gadget_ops { | |||
415 | * struct usb_gadget - represents a usb slave device | 415 | * struct usb_gadget - represents a usb slave device |
416 | * @ops: Function pointers used to access hardware-specific operations. | 416 | * @ops: Function pointers used to access hardware-specific operations. |
417 | * @ep0: Endpoint zero, used when reading or writing responses to | 417 | * @ep0: Endpoint zero, used when reading or writing responses to |
418 | * driver setup() requests | 418 | * driver setup() requests |
419 | * @ep_list: List of other endpoints supported by the device. | 419 | * @ep_list: List of other endpoints supported by the device. |
420 | * @speed: Speed of current connection to USB host. | 420 | * @speed: Speed of current connection to USB host. |
421 | * @is_dualspeed: True if the controller supports both high and full speed | 421 | * @is_dualspeed: True if the controller supports both high and full speed |
@@ -432,7 +432,7 @@ struct usb_gadget_ops { | |||
432 | * @b_hnp_enable: OTG device feature flag, indicating that the A-Host | 432 | * @b_hnp_enable: OTG device feature flag, indicating that the A-Host |
433 | * enabled HNP support. | 433 | * enabled HNP support. |
434 | * @name: Identifies the controller hardware type. Used in diagnostics | 434 | * @name: Identifies the controller hardware type. Used in diagnostics |
435 | * and sometimes configuration. | 435 | * and sometimes configuration. |
436 | * @dev: Driver model state for this abstract device. | 436 | * @dev: Driver model state for this abstract device. |
437 | * | 437 | * |
438 | * Gadgets have a mostly-portable "gadget driver" implementing device | 438 | * Gadgets have a mostly-portable "gadget driver" implementing device |
@@ -655,23 +655,23 @@ usb_gadget_disconnect (struct usb_gadget *gadget) | |||
655 | * @function: String describing the gadget's function | 655 | * @function: String describing the gadget's function |
656 | * @speed: Highest speed the driver handles. | 656 | * @speed: Highest speed the driver handles. |
657 | * @bind: Invoked when the driver is bound to a gadget, usually | 657 | * @bind: Invoked when the driver is bound to a gadget, usually |
658 | * after registering the driver. | 658 | * after registering the driver. |
659 | * At that point, ep0 is fully initialized, and ep_list holds | 659 | * At that point, ep0 is fully initialized, and ep_list holds |
660 | * the currently-available endpoints. | 660 | * the currently-available endpoints. |
661 | * Called in a context that permits sleeping. | 661 | * Called in a context that permits sleeping. |
662 | * @setup: Invoked for ep0 control requests that aren't handled by | 662 | * @setup: Invoked for ep0 control requests that aren't handled by |
663 | * the hardware level driver. Most calls must be handled by | 663 | * the hardware level driver. Most calls must be handled by |
664 | * the gadget driver, including descriptor and configuration | 664 | * the gadget driver, including descriptor and configuration |
665 | * management. The 16 bit members of the setup data are in | 665 | * management. The 16 bit members of the setup data are in |
666 | * USB byte order. Called in_interrupt; this may not sleep. Driver | 666 | * USB byte order. Called in_interrupt; this may not sleep. Driver |
667 | * queues a response to ep0, or returns negative to stall. | 667 | * queues a response to ep0, or returns negative to stall. |
668 | * @disconnect: Invoked after all transfers have been stopped, | 668 | * @disconnect: Invoked after all transfers have been stopped, |
669 | * when the host is disconnected. May be called in_interrupt; this | 669 | * when the host is disconnected. May be called in_interrupt; this |
670 | * may not sleep. Some devices can't detect disconnect, so this might | 670 | * may not sleep. Some devices can't detect disconnect, so this might |
671 | * not be called except as part of controller shutdown. | 671 | * not be called except as part of controller shutdown. |
672 | * @unbind: Invoked when the driver is unbound from a gadget, | 672 | * @unbind: Invoked when the driver is unbound from a gadget, |
673 | * usually from rmmod (after a disconnect is reported). | 673 | * usually from rmmod (after a disconnect is reported). |
674 | * Called in a context that permits sleeping. | 674 | * Called in a context that permits sleeping. |
675 | * @suspend: Invoked on USB suspend. May be called in_interrupt. | 675 | * @suspend: Invoked on USB suspend. May be called in_interrupt. |
676 | * @resume: Invoked on USB resume. May be called in_interrupt. | 676 | * @resume: Invoked on USB resume. May be called in_interrupt. |
677 | * @driver: Driver model state for this driver. | 677 | * @driver: Driver model state for this driver. |