summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/epautoconf.c
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2015-08-06 14:11:13 +0200
committerFelipe Balbi <balbi@ti.com>2015-08-06 09:33:38 -0500
commit3e8b231818c25a250c36f8bfb944aa1fd2b13396 (patch)
tree17605428f7e0f0a354e1eee4c731e50084d311c5 /drivers/usb/gadget/epautoconf.c
parentb0aea0037c8896b8e69cad3f6e828782789c1edf (diff)
usb: gadget: net2280: add net2280_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, 1 insertions, 22 deletions
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index a39ca033b9ce..0ff513400ecf 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -86,28 +86,7 @@ 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_net2280(gadget)) {
- char name[8];
-
- if (type == USB_ENDPOINT_XFER_INT) {
- /* ep-e, ep-f are PIO with only 64 byte fifos */
- ep = gadget_find_ep_by_name(gadget, "ep-e");
- if (ep && usb_gadget_ep_match_desc(gadget,
- ep, desc, ep_comp))
- goto found_ep;
- ep = gadget_find_ep_by_name(gadget, "ep-f");
- if (ep && usb_gadget_ep_match_desc(gadget,
- ep, desc, ep_comp))
- goto found_ep;
- }
-
- /* USB3380: use same address for usb and hardware endpoints */
- snprintf(name, sizeof(name), "ep%d%s", usb_endpoint_num(desc),
- usb_endpoint_dir_in(desc) ? "in" : "out");
- ep = gadget_find_ep_by_name(gadget, name);
- if (ep && usb_gadget_ep_match_desc(gadget, ep, desc, ep_comp))
- goto found_ep;
- } else if (gadget_is_goku (gadget)) {
+ if (gadget_is_goku(gadget)) {
if (USB_ENDPOINT_XFER_INT == type) {
/* single buffering is enough */
ep = gadget_find_ep_by_name(gadget, "ep3-bulk");