usb: gadget: mv_u3d_core: add ep capabilities support
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
8ddbf94fd5
commit
c12a30629f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue