Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753454AbbGOGgo (ORCPT ); Wed, 15 Jul 2015 02:36:44 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:44271 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751815AbbGOGgj (ORCPT ); Wed, 15 Jul 2015 02:36:39 -0400 X-AuditID: cbfee61b-f79416d0000014c0-8e-55a5ff74f816 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 28/46] usb: gadget: pxa27x_udc: add ep capabilities support Date: Wed, 15 Jul 2015 08:32:15 +0200 Message-id: <1436941953-1327-29-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+xoG7p/6WhBqcmcFnMetnOYnHwfr3F 3gV3GS067x9mtmj6+4rFYs+ZX+wWzYvXs1lcWGdusfv0JUaLXw+ELDY9vsZq0X/uNIvF5V1z 2CxmL+lnsVi0rJXZ4vf3f6wWa4/cZbd49zLC4tvlZnaLY7P/Mlk8OLyT3WLWG2EHMY/JTzYy eSz4tZXF496+wywe/es+s3r8O9zP5LFz1l12j/1z17B7bF5S73F+xkJGj74tqxg9tuz/zOhx /MZ2Jo/Pm+Q89n7+zeKxffdylgD+KC6blNSczLLUIn27BK6Mc4072Qqmilbc6/jG1MD4VLCL kZNDQsBEYtmGZewQtpjEhXvr2boYuTiEBKYzSlye+5EJwvnJKDFpySlWkCo2AR2JLd8nMILY IkD2ur87wDqYBdaySNx6s4AFJCEs4Cdx/WYrG4jNIqAqMbftAFicV8BVYt6l12wQ6+QkTh6b DDaUEyg+vecXM4gtJOAi8XTXB6YJjLwLGBlWMYqmFiQXFCel5xrpFSfmFpfmpesl5+duYgTH 0TPpHYyrGiwOMQpwMCrx8DYsWhoqxJpYVlyZe4hRgoNZSYR39kegEG9KYmVValF+fFFpTmrx IUZpDhYlcd6T+T6hQgLpiSWp2ampBalFMFkmDk6pBka9IAZT65QUx5/nXV2aYqIubnTstGTM mrop351DOyD18AYbMe7wPU4hxRuUCzO1bnfwrL56/qf4+fMiQkWcJ8Tf7I7/rtz3Vtru/5W2 X1daTLcJzzD+XNzhr/6nfMrxVZmXlp7d0uhn07TsssSqOWfaIvZ1i5hpvuWec7jfp9DF1Pf7 BbFrEkosxRmJhlrMRcWJABkr+hWfAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2896 Lines: 63 Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/pxa27x_udc.h | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.h b/drivers/usb/gadget/udc/pxa27x_udc.h index 11e1423..ded058c 100644 --- a/drivers/usb/gadget/udc/pxa27x_udc.h +++ b/drivers/usb/gadget/udc/pxa27x_udc.h @@ -234,25 +234,28 @@ /* * Endpoint definition helpers */ -#define USB_EP_DEF(addr, bname, dir, type, maxpkt) \ -{ .usb_ep = { .name = bname, .ops = &pxa_ep_ops, .maxpacket = maxpkt, }, \ +#define USB_EP_DEF(addr, bname, dir, type, maxpkt, ctype, cdir) \ +{ .usb_ep = { .name = bname, .ops = &pxa_ep_ops, .maxpacket = maxpkt, \ + .caps = USB_EP_CAPS(USB_EP_CAPS_TYPE_ ## ctype, \ + USB_EP_CAPS_DIR_ ## cdir), }, \ .desc = { .bEndpointAddress = addr | (dir ? USB_DIR_IN : 0), \ - .bmAttributes = type, \ + .bmAttributes = USB_ENDPOINT_XFER_ ## type, \ .wMaxPacketSize = maxpkt, }, \ .dev = &memory \ } -#define USB_EP_BULK(addr, bname, dir) \ - USB_EP_DEF(addr, bname, dir, USB_ENDPOINT_XFER_BULK, BULK_FIFO_SIZE) -#define USB_EP_ISO(addr, bname, dir) \ - USB_EP_DEF(addr, bname, dir, USB_ENDPOINT_XFER_ISOC, ISO_FIFO_SIZE) -#define USB_EP_INT(addr, bname, dir) \ - USB_EP_DEF(addr, bname, dir, USB_ENDPOINT_XFER_INT, INT_FIFO_SIZE) -#define USB_EP_IN_BULK(n) USB_EP_BULK(n, "ep" #n "in-bulk", 1) -#define USB_EP_OUT_BULK(n) USB_EP_BULK(n, "ep" #n "out-bulk", 0) -#define USB_EP_IN_ISO(n) USB_EP_ISO(n, "ep" #n "in-iso", 1) -#define USB_EP_OUT_ISO(n) USB_EP_ISO(n, "ep" #n "out-iso", 0) -#define USB_EP_IN_INT(n) USB_EP_INT(n, "ep" #n "in-int", 1) -#define USB_EP_CTRL USB_EP_DEF(0, "ep0", 0, 0, EP0_FIFO_SIZE) +#define USB_EP_BULK(addr, bname, dir, cdir) \ + USB_EP_DEF(addr, bname, dir, BULK, BULK_FIFO_SIZE, BULK, cdir) +#define USB_EP_ISO(addr, bname, dir, cdir) \ + USB_EP_DEF(addr, bname, dir, ISOC, ISO_FIFO_SIZE, ISO, cdir) +#define USB_EP_INT(addr, bname, dir, cdir) \ + USB_EP_DEF(addr, bname, dir, INT, INT_FIFO_SIZE, INT, cdir) +#define USB_EP_IN_BULK(n) USB_EP_BULK(n, "ep" #n "in-bulk", 1, IN) +#define USB_EP_OUT_BULK(n) USB_EP_BULK(n, "ep" #n "out-bulk", 0, OUT) +#define USB_EP_IN_ISO(n) USB_EP_ISO(n, "ep" #n "in-iso", 1, IN) +#define USB_EP_OUT_ISO(n) USB_EP_ISO(n, "ep" #n "out-iso", 0, OUT) +#define USB_EP_IN_INT(n) USB_EP_INT(n, "ep" #n "in-int", 1, IN) +#define USB_EP_CTRL USB_EP_DEF(0, "ep0", 0, CONTROL, \ + EP0_FIFO_SIZE, CONTROL, ALL) #define PXA_EP_DEF(_idx, _addr, dir, _type, maxpkt, _config, iface, altset) \ { \ -- 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/