summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2015-07-31 14:00:19 (GMT)
committerFelipe Balbi <balbi@ti.com>2015-08-04 17:25:59 (GMT)
commita474d3b73ba7f22844e672ac004f01cd9b8be159 (patch)
tree3dc494b9d933c52577bb7016355cae10a2b58ccc /drivers/usb/dwc3
parent2954522f135246287c36524bc96e9dae8c40f8a9 (diff)
downloadlinux-a474d3b73ba7f22844e672ac004f01cd9b8be159.tar.xz
usb: dwc3: gadget: 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/dwc3')
-rw-r--r--drivers/usb/dwc3/gadget.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 2feed9e..0c25704 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1715,6 +1715,17 @@ static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc,
return ret;
}
+ if (epnum == 0 || epnum == 1) {
+ dep->endpoint.caps.type_control = true;
+ } else {
+ dep->endpoint.caps.type_iso = true;
+ dep->endpoint.caps.type_bulk = true;
+ dep->endpoint.caps.type_int = true;
+ }
+
+ dep->endpoint.caps.dir_in = !!direction;
+ dep->endpoint.caps.dir_out = !direction;
+
INIT_LIST_HEAD(&dep->request_list);
INIT_LIST_HEAD(&dep->req_queued);
}