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

index 3699962987b220da8a1aa9a64547634fb99c8575..1c3d0fd658fa81bd31a60a7c59eec3c89bb0e5aa 100644 (file)
@@ -1383,13 +1383,24 @@ static void isp1760_udc_init_eps(struct isp1760_udc *udc)
                 */
                if (ep_num == 0) {
                        usb_ep_set_maxpacket_limit(&ep->ep, 64);
+                       ep->ep.caps.type_control = true;
+                       ep->ep.caps.dir_in = true;
+                       ep->ep.caps.dir_out = true;
                        ep->maxpacket = 64;
                        udc->gadget.ep0 = &ep->ep;
                } else {
                        usb_ep_set_maxpacket_limit(&ep->ep, 512);
+                       ep->ep.caps.type_iso = true;
+                       ep->ep.caps.type_bulk = true;
+                       ep->ep.caps.type_int = true;
                        ep->maxpacket = 0;
                        list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
                }
+
+               if (is_in)
+                       ep->ep.caps.dir_in = true;
+               else
+                       ep->ep.caps.dir_out = true;
        }
 }