summaryrefslogtreecommitdiffstats
path: root/include/linux/usb/gadget.h
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2015-08-06 14:11:12 +0200
committerFelipe Balbi <balbi@ti.com>2015-08-06 09:33:14 -0500
commitb0aea0037c8896b8e69cad3f6e828782789c1edf (patch)
tree032c9179b1ad669368afa5311c3abdc00f0affe8 /include/linux/usb/gadget.h
parent4278c687f697b651ab0c771114564da5ed006f22 (diff)
downloadop-kernel-dev-b0aea0037c8896b8e69cad3f6e828782789c1edf.zip
op-kernel-dev-b0aea0037c8896b8e69cad3f6e828782789c1edf.tar.gz
usb: gadget: move find_ep() from epautoconf to udc-core
Move find_ep() to udc-core and rename it to gadget_find_ep_by_name(). It can be used in UDC drivers, especially in 'match_ep' callback after moving chip-specific endpoint matching logic from epautoconf to UDC drivers. Replace all calls of find_ep() function with gadget_find_ep_by_name(). Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r--include/linux/usb/gadget.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index e04fd63..c14a69b 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -639,7 +639,6 @@ static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev)
#define gadget_for_each_ep(tmp, gadget) \
list_for_each_entry(tmp, &(gadget)->ep_list, ep_list)
-
/**
* usb_ep_align_maybe - returns @len aligned to ep's maxpacketsize if gadget
* requires quirk_ep_out_aligned_size, otherwise reguens len.
@@ -1204,6 +1203,13 @@ extern void usb_gadget_giveback_request(struct usb_ep *ep,
/*-------------------------------------------------------------------------*/
+/* utility to find endpoint by name */
+
+extern struct usb_ep *gadget_find_ep_by_name(struct usb_gadget *g,
+ const char *name);
+
+/*-------------------------------------------------------------------------*/
+
/* utility to check if endpoint caps match descriptor needs */
extern int usb_gadget_ep_match_desc(struct usb_gadget *gadget,
OpenPOWER on IntegriCloud