From patchwork Tue Jul 14 09:39:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Baldyga X-Patchwork-Id: 6785841 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C6AF7C05AC for ; Tue, 14 Jul 2015 09:55:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 076D92076E for ; Tue, 14 Jul 2015 09:55:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B296D20525 for ; Tue, 14 Jul 2015 09:55:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754044AbbGNJmI (ORCPT ); Tue, 14 Jul 2015 05:42:08 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:41624 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753379AbbGNJmB (ORCPT ); Tue, 14 Jul 2015 05:42:01 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NRH0126Z1LTXB10@mailout4.samsung.com>; Tue, 14 Jul 2015 18:41:53 +0900 (KST) X-AuditID: cbfee61b-f79416d0000014c0-28-55a4d961bff8 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 39.13.05312.169D4A55; Tue, 14 Jul 2015 18:41:53 +0900 (KST) Received: from AMDC2122.DIGITAL.local ([106.120.53.17]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NRH00G1M1I4C080@mmp1.samsung.com>; Tue, 14 Jul 2015 18:41:52 +0900 (KST) 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 v2 15/48] usb: gadget: fsl_udc_core: add ep capabilities support Date: Tue, 14 Jul 2015 11:39:03 +0200 Message-id: <1436866776-5004-16-git-send-email-r.baldyga@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1436866776-5004-1-git-send-email-r.baldyga@samsung.com> References: <1436866776-5004-1-git-send-email-r.baldyga@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42I5/e+xgG7izSWhBrfWi1nMetnOYnHwfr3F 3gV3GS067x9mtmj6+4rFYs+ZX+wWzYvXs1lcWGdusfv0JUaLXw+ELDY9vsZq0X/uNIvF5V1z 2CxmL+lnsVi0rJXZ4vf3f6wWa4/cZbd49zLC4tvlZnaLY7P/Mlk8OLyT3WLWG2EHMY/JTzYy eSz4tZXF496+wywe/es+s3r8O9zP5LFz1l12j/1z17B7bF5S73F+xkJGj74tqxg9tuz/zOhx /MZ2Jo/Pm+Q89n7+zeKxffdylgD+KC6blNSczLLUIn27BK6M1//bmAousFfcbVnH1MA4j62L kZNDQsBE4urku0wQtpjEhXvrgeJcHEICixglLs7dDOX8ZJT40tLLClLFJqAjseX7BEYQWwTI Xvd3B1gRs8BaFolbbxawdDFycAgLBEjMuSQBUsMioCpx8/1usDCvgKvEi+/hEMvkJE4emww2 khMo/GbXH7CDhARcJE40X2aewMi7gJFhFaNoakFyQXFSeq6RXnFibnFpXrpecn7uJkZwDD2T 3sG4qsHiEKMAB6MSD+8EyyWhQqyJZcWVuYcYJTiYlUR4LTYChXhTEiurUovy44tKc1KLDzFK c7AoifOezPcJFRJITyxJzU5NLUgtgskycXBKNTDyPhKQrj/eXae3ZIt9gs/jBZ/0D9xw9BCq CuWbmlZ0TeXH8fP39dN2L9m4TC5oVqLmDceGFs4KiyLFZ3+fr6vafO2gBb+sl3rMkf+Lzddd TItTc97VufFHn1ys2qZHM/2vtR6IS7g4keEUh2IUb0q++pwvX6XWvX6wztfVzON9quDGdfsv f/RRYinOSDTUYi4qTgQAGBy/WJ0CAAA= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/fsl_udc_core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index c60022b..aab5221 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -2313,6 +2313,19 @@ static int struct_ep_setup(struct fsl_udc *udc, unsigned char index, ep->ep.ops = &fsl_ep_ops; ep->stopped = 0; + if (index == 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; + } + + if (index & 1) + ep->ep.caps.dir_in = true; + else + ep->ep.caps.dir_out = true; + /* for ep0: maxP defined in desc * for other eps, maxP is set by epautoconfig() called by gadget layer */