Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753834AbbGOGrg (ORCPT ); Wed, 15 Jul 2015 02:47:36 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:57930 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753222AbbGOGfn (ORCPT ); Wed, 15 Jul 2015 02:35:43 -0400 X-AuditID: cbfee61b-f79416d0000014c0-7d-55a5ff2daaa3 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 18/46] usb: gadget: gr_udc: add ep capabilities support Date: Wed, 15 Jul 2015 08:32:05 +0200 Message-id: <1436941953-1327-19-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+NgFuphkeLIzCtJLcpLzFFi42I5/e+xoK7u/6WhBlP7TCxmvWxnsTh4v95i 74K7jBad9w8zWzT9fcVisefML3aL5sXr2SwurDO32H36EqPFrwdCFpseX2O16D93msXi8q45 bBazl/SzWCxa1sps8fv7P1aLtUfuslu8exlh8e1yM7vFsdl/mSweHN7JbjHrjbCDmMfkJxuZ PBb82sricW/fYRaP/nWfWT3+He5n8tg56y67x/65a9g9Ni+p9zg/YyGjR9+WVYweW/Z/ZvQ4 fmM7k8fnTXIeez//ZvHYvns5SwB/FJdNSmpOZllqkb5dAlfGzskd7AV9nBXrD91naWC8zN7F yMkhIWAicX3jTjYIW0ziwr31QDYXh5DAdEaJt3c2skA4Pxklvn5fwgxSxSagI7Hl+wRGEFsE yF73dwdYB7PAWhaJW28WsIAkhAW8JM7PnQA2lkVAVeLwqU+sIDavgKvEoTMnmSDWyUmcPDYZ LM4JFJ/e8wtsgZCAi8TTXR+YJjDyLmBkWMUomlqQXFCclJ5rpFecmFtcmpeul5yfu4kRHEfP pHcwrmqwOMQowMGoxMPbsGhpqBBrYllxZe4hRgkOZiUR3tkfgUK8KYmVValF+fFFpTmpxYcY pTlYlMR5T+b7hAoJpCeWpGanphakFsFkmTg4pRoY53ycW8IqkFn88fi0z/9rWH8szHw3n9ut ZZNIwAW5rLWXnl7qCD4d8prz7G8Pu36O7ZUBy1KcNNhbPc/s1DCKdN5/KNvzRe/d09Z+ihKd PpEhbnuYz9y5PT0yZNPDi087VFbOYoi9EDbj3MrJr36l6osJJ4QVzpH7evOvyZ7F/LxszuYP fe+KKbEUZyQaajEXFScCALEePQ+fAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1373 Lines: 43 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) -- 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/