diff mbox

[3/4] usb: musb: gadget: switch over to endpoint feature flags

Message ID 1393954366-22987-3-git-send-email-balbi@ti.com
State New
Headers show

Commit Message

Felipe Balbi March 4, 2014, 5:32 p.m. UTC
switch over to endpoint feature flags so we can
drop naming conventions.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/musb/musb_gadget.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index d4aa779..f121097 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1727,14 +1727,23 @@  init_peripheral_ep(struct musb *musb, struct musb_ep *ep, u8 epnum, int is_in)
 	ep->end_point.name = ep->name;
 	INIT_LIST_HEAD(&ep->end_point.ep_list);
 	if (!epnum) {
+		ep->end_point.has_dir_in = true;
+		ep->end_point.has_dir_out = true;
+		ep->end_point.has_control = true;
 		usb_ep_set_maxpacket_limit(&ep->end_point, 64);
 		ep->end_point.ops = &musb_g_ep0_ops;
 		musb->g.ep0 = &ep->end_point;
 	} else {
-		if (is_in)
+		if (is_in) {
+			ep->end_point.has_dir_in = true;
 			usb_ep_set_maxpacket_limit(&ep->end_point, hw_ep->max_packet_sz_tx);
-		else
+		} else {
+			ep->end_point.has_dir_out = true;
 			usb_ep_set_maxpacket_limit(&ep->end_point, hw_ep->max_packet_sz_rx);
+		}
+		ep->end_point.has_bulk = true;
+		ep->end_point.has_interrupt = true;
+		ep->end_point.has_isochronous = true;
 		ep->end_point.ops = &musb_ep_ops;
 		list_add_tail(&ep->end_point.ep_list, &musb->g.ep_list);
 	}