summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/udc/fotg210-udc.c
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2015-07-31 16:00:25 +0200
committerFelipe Balbi <balbi@ti.com>2015-08-04 12:26:41 -0500
commit8d29237a436dc8e2b5c44dd0ca662a680f16deb5 (patch)
treeaa81687968194a2bd790ae4ca73b39e9306d943d /drivers/usb/gadget/udc/fotg210-udc.c
parent7a3b8e7098946b44c014f3df0ceef27fb273c142 (diff)
downloadlinux-8d29237a436dc8e2b5c44dd0ca662a680f16deb5.tar.bz2
usb: gadget: fotg210-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/fotg210-udc.c')
-rw-r--r--drivers/usb/gadget/udc/fotg210-udc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/fotg210-udc.c b/drivers/usb/gadget/udc/fotg210-udc.c
index a99ed6d80e9a..6ba122cc7490 100644
--- a/drivers/usb/gadget/udc/fotg210-udc.c
+++ b/drivers/usb/gadget/udc/fotg210-udc.c
@@ -1143,6 +1143,17 @@ static int fotg210_udc_probe(struct platform_device *pdev)
ep->ep.name = fotg210_ep_name[i];
ep->ep.ops = &fotg210_ep_ops;
usb_ep_set_maxpacket_limit(&ep->ep, (unsigned short) ~0);
+
+ if (i == 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;
+ }
+
+ ep->ep.caps.dir_in = true;
+ ep->ep.caps.dir_out = true;
}
usb_ep_set_maxpacket_limit(&fotg210->ep[0]->ep, 0x40);
fotg210->gadget.ep0 = &fotg210->ep[0]->ep;