summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/epautoconf.c
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2015-08-06 14:11:14 +0200
committerFelipe Balbi <balbi@ti.com>2015-08-06 09:34:46 -0500
commit8cc67b7bff2fc1adfd080233d35aacba4411cf87 (patch)
tree762dbc9951aab14ce959043c5f7151f71c2aa24f /drivers/usb/gadget/epautoconf.c
parent3e8b231818c25a250c36f8bfb944aa1fd2b13396 (diff)
usb: gadget: goku_udc: add goku_match_ep() function
Add 'match_ep' callback to utilize chip-specific knowledge in endpoint matching process. Function does the same that was done by chip-specific code inside of epautoconf. Now this code can be removed from there to separate generic code from platform specific logic. [ balbi@ti.com : fix build breakage ] Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/epautoconf.c')
-rw-r--r--drivers/usb/gadget/epautoconf.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index 0ff513400ecf..574b6a4df646 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -86,24 +86,8 @@ struct usb_ep *usb_ep_autoconfig_ss(
/* First, apply chip-specific "best usage" knowledge.
* This might make a good usb_gadget_ops hook ...
*/
- if (gadget_is_goku(gadget)) {
- if (USB_ENDPOINT_XFER_INT == type) {
- /* single buffering is enough */
- ep = gadget_find_ep_by_name(gadget, "ep3-bulk");
- if (ep && usb_gadget_ep_match_desc(gadget,
- ep, desc, ep_comp))
- goto found_ep;
- } else if (USB_ENDPOINT_XFER_BULK == type
- && (USB_DIR_IN & desc->bEndpointAddress)) {
- /* DMA may be available */
- ep = gadget_find_ep_by_name(gadget, "ep2-bulk");
- if (ep && usb_gadget_ep_match_desc(gadget,
- ep, desc, ep_comp))
- goto found_ep;
- }
-
#ifdef CONFIG_BLACKFIN
- } else if (gadget_is_musbhdrc(gadget)) {
+ if (gadget_is_musbhdrc(gadget)) {
if ((USB_ENDPOINT_XFER_BULK == type) ||
(USB_ENDPOINT_XFER_ISOC == type)) {
if (USB_DIR_IN & desc->bEndpointAddress)
@@ -119,8 +103,8 @@ struct usb_ep *usb_ep_autoconfig_ss(
ep = NULL;
if (ep && usb_gadget_ep_match_desc(gadget, ep, desc, ep_comp))
goto found_ep;
-#endif
}
+#endif
/* Second, look at endpoints until an unclaimed one looks usable */
list_for_each_entry (ep, &gadget->ep_list, ep_list) {