]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: gadget: mv_u3d_core: add ep capabilities support
authorRobert Baldyga <r.baldyga@samsung.com>
Fri, 31 Jul 2015 14:00:33 +0000 (16:00 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 4 Aug 2015 17:26:47 +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/mv_u3d_core.c

index ea35a248c8985fbc8ecc8b65fb4a02c1ab070738..4c489692745e0d9ee77209846ec0f63fc08e3608 100644 (file)
@@ -1324,6 +1324,9 @@ static int mv_u3d_eps_init(struct mv_u3d *u3d)
        ep->ep.ops = &mv_u3d_ep_ops;
        ep->wedge = 0;
        usb_ep_set_maxpacket_limit(&ep->ep, MV_U3D_EP0_MAX_PKT_SIZE);
+       ep->ep.caps.type_control = true;
+       ep->ep.caps.dir_in = true;
+       ep->ep.caps.dir_out = true;
        ep->ep_num = 0;
        ep->ep.desc = &mv_u3d_ep0_desc;
        INIT_LIST_HEAD(&ep->queue);
@@ -1339,14 +1342,20 @@ static int mv_u3d_eps_init(struct mv_u3d *u3d)
                if (i & 1) {
                        snprintf(name, sizeof(name), "ep%din", i >> 1);
                        ep->direction = MV_U3D_EP_DIR_IN;
+                       ep->ep.caps.dir_in = true;
                } else {
                        snprintf(name, sizeof(name), "ep%dout", i >> 1);
                        ep->direction = MV_U3D_EP_DIR_OUT;
+                       ep->ep.caps.dir_out = true;
                }
                ep->u3d = u3d;
                strncpy(ep->name, name, sizeof(ep->name));
                ep->ep.name = ep->name;
 
+               ep->ep.caps.type_iso = true;
+               ep->ep.caps.type_bulk = true;
+               ep->ep.caps.type_int = true;
+
                ep->ep.ops = &mv_u3d_ep_ops;
                usb_ep_set_maxpacket_limit(&ep->ep, (unsigned short) ~0);
                ep->ep_num = i / 2;