Commit 89226992 authored by Robert Baldyga's avatar Robert Baldyga Committed by Felipe Balbi

usb: gadget: gr_udc: add ep capabilities support

Convert endpoint configuration to new capabilities model.
Signed-off-by: default avatarRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent b0bf5fbf
...@@ -2018,12 +2018,23 @@ static int gr_ep_init(struct gr_udc *dev, int num, int is_in, u32 maxplimit) ...@@ -2018,12 +2018,23 @@ static int gr_ep_init(struct gr_udc *dev, int num, int is_in, u32 maxplimit)
usb_ep_set_maxpacket_limit(&ep->ep, MAX_CTRL_PL_SIZE); usb_ep_set_maxpacket_limit(&ep->ep, MAX_CTRL_PL_SIZE);
ep->bytes_per_buffer = MAX_CTRL_PL_SIZE; ep->bytes_per_buffer = MAX_CTRL_PL_SIZE;
ep->ep.caps.type_control = true;
} else { } else {
usb_ep_set_maxpacket_limit(&ep->ep, (u16)maxplimit); usb_ep_set_maxpacket_limit(&ep->ep, (u16)maxplimit);
list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list); list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list);
ep->ep.caps.type_iso = true;
ep->ep.caps.type_bulk = true;
ep->ep.caps.type_int = true;
} }
list_add_tail(&ep->ep_list, &dev->ep_list); list_add_tail(&ep->ep_list, &dev->ep_list);
if (is_in)
ep->ep.caps.dir_in = true;
else
ep->ep.caps.dir_out = true;
ep->tailbuf = dma_alloc_coherent(dev->dev, ep->ep.maxpacket_limit, ep->tailbuf = dma_alloc_coherent(dev->dev, ep->ep.maxpacket_limit,
&ep->tailbuf_paddr, GFP_ATOMIC); &ep->tailbuf_paddr, GFP_ATOMIC);
if (!ep->tailbuf) if (!ep->tailbuf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment