summaryrefslogtreecommitdiff
path: root/include/linux/usb/gadget.h
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-03-26 12:08:35 +0000
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-03-26 12:08:35 +0000
commitf843bc9bc952bdeb21586ee921d29f5c2ae5a863 (patch)
tree05daf639c7add0e0fcb94f65143f10d7d87bd0b5 /include/linux/usb/gadget.h
parent3c688a55831db128cc709396992886396d4f1654 (diff)
parent3d5a640ecf92e4c8d6e157849217b68984a819bc (diff)
Merge branches 'sa1100-for-next' and 'unstable/sa11x0-asoc' into sa1100
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r--include/linux/usb/gadget.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 75bda0783395..6532beb587b1 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -711,6 +711,15 @@ static inline int usb_gadget_check_config(struct usb_gadget *gadget)
* get_interface. Setting a configuration (or interface) is where
* endpoints should be activated or (config 0) shut down.
*
+ * The gadget driver's setup() callback does not have to queue a response to
+ * ep0 within the setup() call, the driver can do it after setup() returns.
+ * The UDC driver must wait until such a response is queued before proceeding
+ * with the data/status stages of the control transfer.
+ *
+ * NOTE: Currently, a number of UDC drivers rely on USB_GADGET_DELAYED_STATUS
+ * being returned from the setup() callback, which is a bug. See the comment
+ * next to USB_GADGET_DELAYED_STATUS for details.
+ *
* (Note that only the default control endpoint is supported. Neither
* hosts nor devices generally support control traffic except to ep0.)
*