From patchwork Tue Jul 14 09:39:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Baldyga X-Patchwork-Id: 494998 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AB8161402BC for ; Tue, 14 Jul 2015 20:21:09 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 8F5C71A370F for ; Tue, 14 Jul 2015 20:21:09 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 16B781A19EB for ; Tue, 14 Jul 2015 19:43:49 +1000 (AEST) 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 <0NRH012FM1O1C910@mailout4.samsung.com> for linuxppc-dev@lists.ozlabs.org; Tue, 14 Jul 2015 18:43:13 +0900 (KST) X-AuditID: cbfee61b-f79416d0000014c0-ff-55a4d9b10693 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 7B.43.05312.1B9D4A55; Tue, 14 Jul 2015 18:43:13 +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:43:13 +0900 (KST) From: Robert Baldyga To: gregkh@linuxfoundation.org, balbi@ti.com Subject: [PATCH v2 26/48] usb: gadget: pch_ud: add ep capabilities support Date: Tue, 14 Jul 2015 11:39:14 +0200 Message-id: <1436866776-5004-27-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+NgFuphkeLIzCtJLcpLzFFi42I5/e+xgO7Gm0tCDab+1LSY9bKdxeLg/XqL vQvuMlp03j/MbNH09xWLxZ4zv9gtmhevZ7O4sM7cYvfpS4wWvx4IWWx6fI3Vov/caRaLy7vm sFnMXtLPYrFoWSuzxe/v/1gt1h65y27x7mWExbfLzewWx2b/ZbJ4cHgnu8WsN8IOYh6Tn2xk 8ljwayuLx719h1k8+td9ZvX4d7ifyWPnrLvsHvvnrmH32Lyk3uP8jIWMHn1bVjF6bNn/mdHj +I3tTB6fN8l57P38m8Vj++7lLAH8UVw2Kak5mWWpRfp2CVwZ/9/2MRd846z43LSFqYGxh6OL kZNDQsBEYsupjYwQtpjEhXvr2boYuTiEBBYxSkw7+5UVwvnJKNG9cx9YFZuAjsSW7xPAbBEg e93fHWAdzAJrWSRuvVnAApIQFvCSOPtmDTuIzSKgKrFn7wNmEJtXwFWie9VeqHVyEiePTWYF sTmB4m92/WEDsYUEXCRONF9mnsDIu4CRYRWjaGpBckFxUnqukV5xYm5xaV66XnJ+7iZGcBw9 k97BuKrB4hCjAAejEg/vBMsloUKsiWXFlbmHGCU4mJVEeC02AoV4UxIrq1KL8uOLSnNSiw8x SnOwKInznsz3CRUSSE8sSc1OTS1ILYLJMnFwSjUwGhs0xv9hXTLla7JZ348FPeZCzzUeXU6/ vkfu3VvBh6c2PJi7/GC7HPf2L18qy4PmiffNyD59Mtnvu/77WJVjbCv+3mOJLy1IFT+903IS 34M1JV+ieGfWPu7uy10iuMQxxVEy4ZnCV3fXxDfPSrVydffwhdeWf2nt9Hi8L2DJpYpL9+5m rZ14XImlOCPRUIu5qDgRAE6QoRWfAgAA X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, linux-usb@vger.kernel.org, m.szyprowski@samsung.com, linux-arm-kernel@lists.infradead.org, johnyoun@synopsys.com, linuxppc-dev@lists.ozlabs.org, cernekee@gmail.com, nicolas.ferre@atmel.com, michal.simek@xilinx.com, haojian.zhuang@gmail.com, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Robert Baldyga , Peter.Chen@freescale.com, dahlmann.thomas@arcor.de, andrzej.p@samsung.com, robert.jarzmik@free.fr, daniel@zonque.org, linux-geode@lists.infradead.org MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/pch_udc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c index 613547f..cc8fb3c 100644 --- a/drivers/usb/gadget/udc/pch_udc.c +++ b/drivers/usb/gadget/udc/pch_udc.c @@ -2895,11 +2895,21 @@ static void pch_udc_pcd_reinit(struct pch_udc_dev *dev) ep->in = ~i & 1; ep->ep.name = ep_string[i]; ep->ep.ops = &pch_udc_ep_ops; - if (ep->in) + if (ep->in) { ep->offset_addr = ep->num * UDC_EP_REG_SHIFT; - else + ep->ep.caps.dir_in = true; + } else { ep->offset_addr = (UDC_EPINT_OUT_SHIFT + ep->num) * UDC_EP_REG_SHIFT; + ep->ep.caps.dir_out = true; + } + if (i == UDC_EP0IN_IDX || i == UDC_EP0OUT_IDX) { + 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; + } /* need to set ep->ep.maxpacket and set Default Configuration?*/ usb_ep_set_maxpacket_limit(&ep->ep, UDC_BULK_MAX_PKT_SIZE); list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list);