Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753412AbbGOGgW (ORCPT ); Wed, 15 Jul 2015 02:36:22 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:52755 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753307AbbGOGgS (ORCPT ); Wed, 15 Jul 2015 02:36:18 -0400 X-AuditID: cbfee61b-f79416d0000014c0-0f-55a5ff5fe7cc 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 25/46] usb: gadget: omap_udc: add ep capabilities support Date: Wed, 15 Jul 2015 08:32:12 +0200 Message-id: <1436941953-1327-26-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+NgFupmkeLIzCtJLcpLzFFi42I5/e+xoG78/6WhBlN7FSxmvWxnsTh4v95i 74K7jBad9w8zWzT9fcVisefML3aL5sXr2SwurDO32H36EqPFrwdCFpseX2O16D93msXi8q45 bBazl/SzWCxa1sps8fv7P1aLtUfuslu8exlh8e1yM7vFsdl/mSweHN7JbjHrjbCDmMfkJxuZ PBb82sricW/fYRaP/nWfWT3+He5n8tg56y67x/65a9g9Ni+p9zg/YyGjR9+WVYweW/Z/ZvQ4 fmM7k8fnTXIeez//ZvHYvns5SwB/FJdNSmpOZllqkb5dAlfG+1e3GQvecFTMufmLrYFxKXsX IyeHhICJxIbj71khbDGJC/fWs3UxcnEICUxnlNg+9yIThPOTUWJL6wZmkCo2AR2JLd8nMILY IkD2ur87wDqYBdaySNx6s4AFJCEs4CPxffExoAYODhYBVYmuFluQMK+Aq8SEV/egtslJnDw2 GczmBIpP7/kFNl9IwEXi6a4PTBMYeRcwMqxiFE0tSC4oTkrPNdIrTswtLs1L10vOz93ECI6i Z9I7GFc1WBxiFOBgVOLhbVi0NFSINbGsuDL3EKMEB7OSCO/sj0Ah3pTEyqrUovz4otKc1OJD jNIcLErivCfzfUKFBNITS1KzU1MLUotgskwcnFINjEyn1v38bFR4xzty4dFe206OTds6vQu/ NpuZrbbtzU15a3Xj7nvpw8KrM0R1T+c+6Mm571BftD6yyKChrUI0/eDFY+x9nBXapaUa+S8f ijRLZcaFBbvPkes7fPaXyDpFQ9uSU9fz/1X+ZWOQXXg3+EuQiViZltuvBOeDve0lsg7lqzOn XhZTYinOSDTUYi4qTgQAle3Rkp4CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1334 Lines: 48 Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/omap_udc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c index e2fcdb8..9b7d394 100644 --- a/drivers/usb/gadget/udc/omap_udc.c +++ b/drivers/usb/gadget/udc/omap_udc.c @@ -2579,6 +2579,28 @@ omap_ep_setup(char *name, u8 addr, u8 type, ep->double_buf = dbuf; ep->udc = udc; + switch (type) { + case USB_ENDPOINT_XFER_CONTROL: + ep->ep.caps.type_control = true; + ep->ep.caps.dir_in = true; + ep->ep.caps.dir_out = true; + break; + case USB_ENDPOINT_XFER_ISOC: + ep->ep.caps.type_iso = true; + break; + case USB_ENDPOINT_XFER_BULK: + ep->ep.caps.type_bulk = true; + break; + case USB_ENDPOINT_XFER_INT: + ep->ep.caps.type_int = true; + break; + }; + + if (addr & USB_DIR_IN) + ep->ep.caps.dir_in = true; + else + ep->ep.caps.dir_out = true; + ep->ep.name = ep->name; ep->ep.ops = &omap_ep_ops; ep->maxpacket = maxp; -- 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/