usb: gadget: fsl_udc_core: add ep capabilities support
authorRobert Baldyga <r.baldyga@samsung.com>
Fri, 31 Jul 2015 14:00:27 +0000 (16:00 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 4 Aug 2015 17:26:43 +0000 (12:26 -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/gadget/udc/fsl_udc_core.c

index c60022b46a4835b4cc2b151b7a46193fe0f5554b..aab5221d6c2e35050edccaaa170f960f90c40887 100644 (file)
@@ -2313,6 +2313,19 @@ static int struct_ep_setup(struct fsl_udc *udc, unsigned char index,
        ep->ep.ops = &fsl_ep_ops;
        ep->stopped = 0;
 
+       if (index == 0) {
+               ep->ep.caps.type_control = true;
+       } else {
+               ep->ep.caps.type_iso = true;
+               ep->ep.caps.type_bulk = true;
+               ep->ep.caps.type_int = true;
+       }
+
+       if (index & 1)
+               ep->ep.caps.dir_in = true;
+       else
+               ep->ep.caps.dir_out = true;
+
        /* for ep0: maxP defined in desc
         * for other eps, maxP is set by epautoconfig() called by gadget layer
         */