diff options
author | Robert Baldyga <r.baldyga@samsung.com> | 2015-07-31 16:00:27 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-08-04 12:26:43 -0500 |
commit | 60a28c63712f190b45e9d8f0ca593c927970fd51 (patch) | |
tree | bd3e79f4bc2a76047512ca22be5bc5eb86be0d90 /drivers/usb/gadget/udc/fsl_udc_core.c | |
parent | e8fc42f6a19af320d7a4718c05c3f249bf5d3151 (diff) | |
download | op-kernel-dev-60a28c63712f190b45e9d8f0ca593c927970fd51.zip op-kernel-dev-60a28c63712f190b45e9d8f0ca593c927970fd51.tar.gz |
usb: gadget: fsl_udc_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>
Diffstat (limited to 'drivers/usb/gadget/udc/fsl_udc_core.c')
-rw-r--r-- | drivers/usb/gadget/udc/fsl_udc_core.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index c60022b..aab5221 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -2313,6 +2313,19 @@ static int struct_ep_setup(struct fsl_udc *udc, unsigned char index, ep->ep.ops = &fsl_ep_ops; ep->stopped = 0; + if (index == 0) { + ep->ep.caps.type_control = true; + } else { + ep->ep.caps.type_iso = true; + ep->ep.caps.type_bulk = true; + ep->ep.caps.type_int = true; + } + + if (index & 1) + ep->ep.caps.dir_in = true; + else + ep->ep.caps.dir_out = true; + /* for ep0: maxP defined in desc * for other eps, maxP is set by epautoconfig() called by gadget layer */ |