usb: dwc3: gadget: add ep capabilities support
[deliverable/linux.git] / drivers / usb / dwc3 / gadget.c
index 2feed9e03583fd4f422b7757167abd92d2ebb3c5..0c25704dcb6ba398a98012cf0d9480c9de4f44e2 100644 (file)
@@ -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);
        }
This page took 0.029488 seconds and 5 git commands to generate.