summaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2015-08-06 14:11:11 +0200
committerFelipe Balbi <balbi@ti.com>2015-08-06 09:32:57 -0500
commit4278c687f697b651ab0c771114564da5ed006f22 (patch)
tree7ce7c64369bba53a2087b60e284f5accf47fd1c5 /include/linux/usb
parent596c154d62330ea0bb4e3c3e50afa3682e50b617 (diff)
usb: gadget: move ep_matches() from epautoconf to udc-core
Move ep_matches() function to udc-core and rename it to usb_gadget_ep_match_desc(). This function can be used by UDC drivers in 'match_ep' callback to avoid writing lots of repetitive code. Replace all calls of ep_matches() with usb_gadget_ep_match_desc(). Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/gadget.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 303214bb2f8b..e04fd6381ae8 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -1204,6 +1204,14 @@ extern void usb_gadget_giveback_request(struct usb_ep *ep,
/*-------------------------------------------------------------------------*/
+/* utility to check if endpoint caps match descriptor needs */
+
+extern int usb_gadget_ep_match_desc(struct usb_gadget *gadget,
+ struct usb_ep *ep, struct usb_endpoint_descriptor *desc,
+ struct usb_ss_ep_comp_descriptor *ep_comp);
+
+/*-------------------------------------------------------------------------*/
+
/* utility to update vbus status for udc core, it may be scheduled */
extern void usb_udc_vbus_handler(struct usb_gadget *gadget, bool status);