summaryrefslogtreecommitdiff
path: root/include/linux/usb/gadget.h
diff options
context:
space:
mode:
authorThinh Nguyen <thinh.nguyen@synopsys.com>2018-11-16 06:03:21 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-12-05 12:14:11 +0300
commit6b69753fa0078c5222d6b4aeb5017c5503e0dc8e (patch)
tree1cb61cf03701bc4b1f0445cb31d8c1eb4c68d3ae /include/linux/usb/gadget.h
parentd54d334e75b93f3a372d1cbb7e805380b3281482 (diff)
downloadlinux-6b69753fa0078c5222d6b4aeb5017c5503e0dc8e.tar.xz
usb: gadget: Introduce frame_number to usb_request
Add a field frame_number to the usb_request to report the interval number in (micro)frames in which the isochronous transfer was transmitted or received. The gadget driver can use this knowledge to synchronize with the host. Also, this option is useful for debugging purposes. Signed-off-by: Thinh Nguyen <thinhn@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r--include/linux/usb/gadget.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index e5cd84a0f84a..7595056b96c1 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -61,6 +61,8 @@ struct usb_ep;
* invalidated by the error may first be dequeued.
* @context: For use by the completion callback
* @list: For use by the gadget driver.
+ * @frame_number: Reports the interval number in (micro)frame in which the
+ * isochronous transfer was transmitted or received.
* @status: Reports completion code, zero or a negative errno.
* Normally, faults block the transfer queue from advancing until
* the completion callback returns.
@@ -112,6 +114,8 @@ struct usb_request {
void *context;
struct list_head list;
+ unsigned frame_number; /* ISO ONLY */
+
int status;
unsigned actual;
};