Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752760AbbGOGeM (ORCPT ); Wed, 15 Jul 2015 02:34:12 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:39741 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751565AbbGOGeJ (ORCPT ); Wed, 15 Jul 2015 02:34:09 -0400 X-AuditID: cbfee61a-f79516d000006302-e7-55a5fedfcc6b From: Robert Baldyga To: gregkh@linuxfoundation.org, balbi@ti.com Cc: Peter.Chen@freescale.com, johnyoun@synopsys.com, dahlmann.thomas@arcor.de, nicolas.ferre@atmel.com, cernekee@gmail.com, leoli@freescale.com, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, michal.simek@xilinx.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-geode@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, andrzej.p@samsung.com, m.szyprowski@samsung.com, Robert Baldyga Subject: [PATCH v3 07/46] usb: dwc3: gadget: add ep capabilities support Date: Wed, 15 Jul 2015 08:31:54 +0200 Message-id: <1436941953-1327-8-git-send-email-r.baldyga@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1436941953-1327-1-git-send-email-r.baldyga@samsung.com> References: <1436941953-1327-1-git-send-email-r.baldyga@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42I5/e+xoO79f0tDDf5e0LaY9bKdxeLg/XqL vQvuMlp03j/MbNH09xWLxZ4zv9gtmhevZ7O4sM7cYvfpS4wWvx4IWWx6fI3Vov/caRaLy7vm sFnMXtLPYrFoWSuzxe/v/1gt1h65y27x7mWExbfLzewWx2b/ZbJ4cHgnu8WsN8IOYh6Tn2xk 8ljwayuLx719h1k8+td9ZvX4d7ifyWPnrLvsHvvnrmH32Lyk3uP8jIWMHn1bVjF6bNn/mdHj +I3tTB6fN8l57P38m8Vj++7lLAH8UVw2Kak5mWWpRfp2CVwZ609eYyxoYa9o3zifsYHxNmsX IyeHhICJxL+369ghbDGJC/fWs3UxcnEICUxnlFh94ASU85NRYtu9uWBVbAI6Elu+T2AEsUWA 7HV/d4AVMQusZZG49WYBC0hCWMBD4tuhm0wgNouAqsSauQ/BmnkFXCTaLrdArZaTOHlsMpjN KeAqMb3nFzOILQRU83TXB6YJjLwLGBlWMYqmFiQXFCel5xrqFSfmFpfmpesl5+duYgTH0TOp HYwrGywOMQpwMCrx8N5csjRUiDWxrLgy9xCjBAezkgjv7I9AId6UxMqq1KL8+KLSnNTiQ4zS HCxK4rwn831ChQTSE0tSs1NTC1KLYLJMHJxSDYy6qYmBJw23rems4zyx/uKV8z7HP/gZd8rN fPZGpJffsfqg5III4/fXxV1D7qilCy79419m4NzQw/MyZH6lwHEtxi1mH9y/Mjgcu90/kYf/ 3PvNfM82p+2eufC8Ha+X70qjs/M1P9ac/VxZacEyr/JvbdaZs4+us+ulmm5oOfZy/9x9U9dv L6pWYinOSDTUYi4qTgQAFR52vZ8CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1111 Lines: 39 Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/dwc3/gadget.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 333a7c0..8d1f768 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1713,6 +1713,19 @@ static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc, return ret; } + if (epnum == 0) { + 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; + } + + if (epnum & 1) + dep->endpoint.caps.dir_in = true; + else + dep->endpoint.caps.dir_out = true; + INIT_LIST_HEAD(&dep->request_list); INIT_LIST_HEAD(&dep->req_queued); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/