From patchwork Fri Jul 31 14:00:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Baldyga X-Patchwork-Id: 6913011 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 13FEAC05AE for ; Fri, 31 Jul 2015 14:16:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C9242055B for ; Fri, 31 Jul 2015 14:16:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CC63205B1 for ; Fri, 31 Jul 2015 14:16:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752419AbbGaODi (ORCPT ); Fri, 31 Jul 2015 10:03:38 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:52228 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751562AbbGaODf (ORCPT ); Fri, 31 Jul 2015 10:03:35 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NSC00BZZV1M5O30@mailout2.samsung.com>; Fri, 31 Jul 2015 23:03:29 +0900 (KST) X-AuditID: cbfee61b-f79706d000001b96-b9-55bb8030fcdb Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 8B.61.07062.0308BB55; Fri, 31 Jul 2015 23:03:29 +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 <0NSC00HHWUXPZL20@mmp1.samsung.com>; Fri, 31 Jul 2015 23:03:28 +0900 (KST) 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 18/46] usb: gadget: gr_udc: add ep capabilities support Date: Fri, 31 Jul 2015 16:00:30 +0200 Message-id: <1438351258-31578-19-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+NgFprLIsWRmVeSWpSXmKPExsVy+t9jAV3Dht2hBn83c1vMetnOYnHwfr3F 3gV3GS067x9mtmj6+4rFYs+ZX+wWzYvXs1lcWGdusfv0JUaLXw+ELDY9vsZq0X/uNIvF5V1z 2CxmL+lnsVi0rJXZ4vf3f6wWa4/cZbd49zLC4tvlZnaLY7P/MlnM75jKavHg8E52i1lvhC0m /L7A5iDhMfnJRiaPBb+2snjc23eYxaN/3WdWj3+H+5k8ds66y+6xf+4ado/NS+o9zs9YyOgx ++4PRo++LasYPbbs/8zocfzGdiaPmSt72Tw+b5Lz2Pv5N0uAYBSXTUpqTmZZapG+XQJXxs7J HewFfZwV6w/dZ2lgvMzexcjJISFgInFjx3IoW0ziwr31bCC2kMBSRom+385djFxA9k9Gid3t 0xhBEmwCOhJbvk8As0UEBCTWv7jEDlLELPCDReLsvG6wScICXhL9R++D2SwCqhI3G5aygti8 Am4Sq5b2MkFsk5M4eWwyWJwTKP51/Vl2iM2uEkeOnWKewMi7gJFhFaNEakFyQXFSeq5RXmq5 XnFibnFpXrpecn7uJkZwpD2T3sF4eJf7IUYBDkYlHl6BxbtChVgTy4orcw8xSnAwK4nw3lfb HSrEm5JYWZValB9fVJqTWnyIUZqDRUmcV99kU6iQQHpiSWp2ampBahFMlomDU6qBMbf2stAG ed791y2THn+ZysD+Y5XXpJKXJS9WO6wWNKp6xsBm137hmFaeCMe68JmRd02+WOxl/T4jy/ah oqH+0kbByNciAdbPux/dSveSUl+RUZPWbPCw4ov3fKdVCyd3af++U/gsRUDDPNDI9HHTb4ll 1x6oeQlelJM6lysfsHRiiye/3P11SizFGYmGWsxFxYkANN+4a7ACAAA= 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/gr_udc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c index c886887..8aa2593 100644 --- a/drivers/usb/gadget/udc/gr_udc.c +++ b/drivers/usb/gadget/udc/gr_udc.c @@ -2018,12 +2018,23 @@ static int gr_ep_init(struct gr_udc *dev, int num, int is_in, u32 maxplimit) usb_ep_set_maxpacket_limit(&ep->ep, MAX_CTRL_PL_SIZE); ep->bytes_per_buffer = MAX_CTRL_PL_SIZE; + + ep->ep.caps.type_control = true; } else { usb_ep_set_maxpacket_limit(&ep->ep, (u16)maxplimit); list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list); + + ep->ep.caps.type_iso = true; + ep->ep.caps.type_bulk = true; + ep->ep.caps.type_int = true; } list_add_tail(&ep->ep_list, &dev->ep_list); + if (is_in) + ep->ep.caps.dir_in = true; + else + ep->ep.caps.dir_out = true; + ep->tailbuf = dma_alloc_coherent(dev->dev, ep->ep.maxpacket_limit, &ep->tailbuf_paddr, GFP_ATOMIC); if (!ep->tailbuf)