usb: gadget: atmel_usba_udc: add ep capabilities support on device tree binding

The recently added endpoint capabilities flags verification breaks Atmel
USBA because the endpoint configuration was only added when the driver
is bound using the legacy pdata interface.

Convert endpoint configuration to new capabilities model when driver is
bound to a device tree as well.

Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Fixes: 47bef38651 ("usb: gadget: atmel_usba_udc: add ep capabilities support")
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Sylvain Rochet 2015-09-18 16:58:28 +02:00 committed by Felipe Balbi
parent 762982db33
commit cf261fd1a4
1 changed files with 11 additions and 0 deletions

View File

@ -2002,6 +2002,17 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
ep->udc = udc; ep->udc = udc;
INIT_LIST_HEAD(&ep->queue); INIT_LIST_HEAD(&ep->queue);
if (ep->index == 0) {
ep->ep.caps.type_control = true;
} else {
ep->ep.caps.type_iso = ep->can_isoc;
ep->ep.caps.type_bulk = true;
ep->ep.caps.type_int = true;
}
ep->ep.caps.dir_in = true;
ep->ep.caps.dir_out = true;
if (i) if (i)
list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list); list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);