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

index 731b13dfc512d6ca3ca66f5bfd586440e312ef11..3ee5b4c77a1f42eeecf1f222ab63e822b1530c9a 100644 (file)
@@ -3289,6 +3289,19 @@ static void s3c_hsotg_initep(struct dwc2_hsotg *hsotg,
        usb_ep_set_maxpacket_limit(&hs_ep->ep, epnum ? 1024 : EP0_MPS_LIMIT);
        hs_ep->ep.ops = &s3c_hsotg_ep_ops;
 
+       if (epnum == 0) {
+               hs_ep->ep.caps.type_control = true;
+       } else {
+               hs_ep->ep.caps.type_iso = true;
+               hs_ep->ep.caps.type_bulk = true;
+               hs_ep->ep.caps.type_int = true;
+       }
+
+       if (dir_in)
+               hs_ep->ep.caps.dir_in = true;
+       else
+               hs_ep->ep.caps.dir_out = true;
+
        /*
         * if we're using dma, we need to set the next-endpoint pointer
         * to be something valid.