usb: chipidea: udc: add ep capabilities support
authorRobert Baldyga <r.baldyga@samsung.com>
Fri, 31 Jul 2015 14:00:17 +0000 (16:00 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 4 Aug 2015 17:25:33 +0000 (12:25 -0500)
Convert endpoint configuration to new capabilities model.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/chipidea/udc.c

index f5fbe78..c592b6f 100644 (file)
@@ -1624,6 +1624,20 @@ static int init_eps(struct ci_hdrc *ci)
 
                        hwep->ep.name      = hwep->name;
                        hwep->ep.ops       = &usb_ep_ops;
+
+                       if (i == 0) {
+                               hwep->ep.caps.type_control = true;
+                       } else {
+                               hwep->ep.caps.type_iso = true;
+                               hwep->ep.caps.type_bulk = true;
+                               hwep->ep.caps.type_int = true;
+                       }
+
+                       if (j == TX)
+                               hwep->ep.caps.dir_in = true;
+                       else
+                               hwep->ep.caps.dir_out = true;
+
                        /*
                         * for ep0: maxP defined in desc, for other
                         * eps, maxP is set by epautoconfig() called