[PATCH v3 15/46] usb: gadget: fsl_udc_core: add ep capabilities support
Robert Baldyga
r.baldyga at samsung.com
Tue Jul 14 23:32:02 PDT 2015
Convert endpoint configuration to new capabilities model.
Signed-off-by: Robert Baldyga <r.baldyga at samsung.com>
---
drivers/usb/gadget/udc/fsl_udc_core.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
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
*/
--
1.9.1
More information about the linux-arm-kernel
mailing list