Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754970AbbGaOVj (ORCPT ); Fri, 31 Jul 2015 10:21:39 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:51832 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753185AbbGaOCK (ORCPT ); Fri, 31 Jul 2015 10:02:10 -0400 X-AuditID: cbfee61b-f79706d000001b96-4c-55bb7fe0b8c1 From: Robert Baldyga To: balbi@ti.com Cc: gregkh@linuxfoundation.org, 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, stern@rowland.harvard.edu, petr.cvek@tul.cz, Robert Baldyga Subject: [PATCH v5 07/46] usb: dwc3: gadget: add ep capabilities support Date: Fri, 31 Jul 2015 16:00:19 +0200 Message-id: <1438351258-31578-8-git-send-email-r.baldyga@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1438351258-31578-1-git-send-email-r.baldyga@samsung.com> References: <1438351258-31578-1-git-send-email-r.baldyga@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsVy+t9jAd0H9btDDaZfNLCY9bKdxeLg/XqL vQvuMlp03j/MbNH09xWLxZ4zv9gtmhevZ7O4sM7cYvfpS4wWvx4IWWx6fI3Vov/caRaLy7vm sFnMXtLPYrFoWSuzxe/v/1gt1h65y27x7mWExbfLzewWx2b/ZbKY3zGV1eLB4Z3sFrPeCFtM +H2BzUHCY/KTjUweC35tZfG4t+8wi0f/us+sHv8O9zN57Jx1l91j/9w17B6bl9R7nJ+xkNFj 9t0fjB59W1YxemzZ/5nR4/iN7UweM1f2snl83iTnsffzb5YAwSgum5TUnMyy1CJ9uwSujD0T DzAWTGKvOPllBUsD43PWLkZODgkBE4mXPaeZIGwxiQv31rOB2EICSxkl/q3z6mLkArJ/Mkpc v32QBSTBJqAjseX7BEYQW0RAQGL9i0vsIEXMAj9YJM7O62YHSQgLeEhs/PcNyObgYBFQlZi2 0RYkzCvgKrHt4hNmiGVyEiePTQY7glPATeLr+rPsEItdJY4cO8U8gZF3ASPDKkaJ1ILkguKk 9FyjvNRyveLE3OLSvHS95PzcTYzgOHsmvYPx8C73Q4wCHIxKPLwCi3eFCrEmlhVX5h5ilOBg VhLhva+2O1SINyWxsiq1KD++qDQntfgQozQHi5I4r77JplAhgfTEktTs1NSC1CKYLBMHp1QD o7+27Uz3laZnG74lzfJnNDrx/4N2iOwzv8bAC/4vospPv5dccuC6K1f3i/ueB2cltx6XfyY4 sfLonvnZa3++lGKOuT31LZ/lpterZY/YsnGs7jsmySHx0pS9M9zOZXnSpEa+etezITbxtho9 bXxFmZLbNq1UULLZ92zSxy8e5kbz5L9+URPtVmIpzkg01GIuKk4EACmFqxKvAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1125 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 2feed9e..bd4c3db 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1715,6 +1715,19 @@ 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; + } + + if (direction) + 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/