diff options
author | Robert Baldyga <r.baldyga@samsung.com> | 2015-07-31 17:00:37 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-08-04 20:26:50 +0300 |
commit | 7d4ba80d3a91222de577b652a8936f935de8b409 (patch) | |
tree | d84744c18debb7dfbf13000a55368377fbd6211c /drivers/usb/gadget/udc | |
parent | c23c3c3c3059f3dc47268cd7a28b96b9efdbc1ea (diff) | |
download | linux-7d4ba80d3a91222de577b652a8936f935de8b409.tar.xz |
usb: gadget: omap_udc: 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>
Diffstat (limited to 'drivers/usb/gadget/udc')
-rw-r--r-- | drivers/usb/gadget/udc/omap_udc.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c index e2fcdb8e5596..9b7d39484ed3 100644 --- a/drivers/usb/gadget/udc/omap_udc.c +++ b/drivers/usb/gadget/udc/omap_udc.c @@ -2579,6 +2579,28 @@ omap_ep_setup(char *name, u8 addr, u8 type, ep->double_buf = dbuf; ep->udc = udc; + switch (type) { + case USB_ENDPOINT_XFER_CONTROL: + ep->ep.caps.type_control = true; + ep->ep.caps.dir_in = true; + ep->ep.caps.dir_out = true; + break; + case USB_ENDPOINT_XFER_ISOC: + ep->ep.caps.type_iso = true; + break; + case USB_ENDPOINT_XFER_BULK: + ep->ep.caps.type_bulk = true; + break; + case USB_ENDPOINT_XFER_INT: + ep->ep.caps.type_int = true; + break; + }; + + if (addr & USB_DIR_IN) + ep->ep.caps.dir_in = true; + else + ep->ep.caps.dir_out = true; + ep->ep.name = ep->name; ep->ep.ops = &omap_ep_ops; ep->maxpacket = maxp; |