summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/epautoconf.c
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2015-08-06 15:11:15 +0300
committerFelipe Balbi <balbi@ti.com>2015-08-06 17:35:11 +0300
commit26b8aa458c7d99181ceb07f27da9bd7d94185e35 (patch)
tree2a2b9230f01000c70a560cac5114bc82b1ec0e69 /drivers/usb/gadget/epautoconf.c
parent8cc67b7bff2fc1adfd080233d35aacba4411cf87 (diff)
downloadlinux-26b8aa458c7d99181ceb07f27da9bd7d94185e35.tar.xz
usb: musb: gadget: add musb_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. 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.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index 574b6a4df646..16c1cc90c406 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -83,29 +83,6 @@ struct usb_ep *usb_ep_autoconfig_ss(
goto found_ep;
}
- /* First, apply chip-specific "best usage" knowledge.
- * This might make a good usb_gadget_ops hook ...
- */
-#ifdef CONFIG_BLACKFIN
- if (gadget_is_musbhdrc(gadget)) {
- if ((USB_ENDPOINT_XFER_BULK == type) ||
- (USB_ENDPOINT_XFER_ISOC == type)) {
- if (USB_DIR_IN & desc->bEndpointAddress)
- ep = gadget_find_ep_by_name(gadget, "ep5in");
- else
- ep = gadget_find_ep_by_name(gadget, "ep6out");
- } else if (USB_ENDPOINT_XFER_INT == type) {
- if (USB_DIR_IN & desc->bEndpointAddress)
- ep = gadget_find_ep_by_name(gadget, "ep1in");
- else
- ep = gadget_find_ep_by_name(gadget, "ep2out");
- } else
- ep = NULL;
- if (ep && usb_gadget_ep_match_desc(gadget, ep, desc, ep_comp))
- goto found_ep;
- }
-#endif
-
/* Second, look at endpoints until an unclaimed one looks usable */
list_for_each_entry (ep, &gadget->ep_list, ep_list) {
if (usb_gadget_ep_match_desc(gadget, ep, desc, ep_comp))