Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1192843

[PATCH v4 28/46] usb: gadget: pxa27x_udc: add ep capabilities support

From Robert Baldyga <r.baldyga@samsung.com>
Newsgroups linux.kernel
Subject [PATCH v4 28/46] usb: gadget: pxa27x_udc: add ep capabilities support
Date 2015-07-27 11:30 +0200
Message-ID <pQMTo-5RC-9@gated-at.bofh.it> (permalink)
References <pQMJH-5Ga-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Convert endpoint configuration to new capabilities model.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 00/46] usb: gadget: rework ep matching and claiming mechanism Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:20 +0200
  [PATCH v4 37/46] usb: gadget: epautoconf: add endpoint capabilities  flags verification Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 46/46] usb: musb: gadget: add musb_match_ep() function Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 31/46] usb: gadget: s3c2410_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 34/46] usb: musb: gadget: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 28/46] usb: gadget: pxa27x_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 43/46] usb: gadget: move find_ep() from epautoconf to  gadget.h Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 27/46] usb: gadget: pxa25x_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 26/46] usb: gadget: pch_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 22/46] usb: gadget: mv_udc_core: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 36/46] usb: gadget: atmel_usba_udc: add ep capabilities  support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 44/46] usb: gadget: net2280: add net2280_match_ep() function Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 21/46] usb: gadget: mv_u3d_core: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 45/46] usb: gadget: goku_udc: add goku_match_ep() function Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 24/46] usb: gadget: net2280: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 33/46] usb: isp1760: udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 32/46] usb: gadget: udc-xilinx: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 35/46] usb: renesas: gadget: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 30/46] usb: gadget: s3c-hsudc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 29/46] usb: gadget: r8a66597-udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 41/46] usb: gadget: add 'ep_match' callback to usb_gadget_ops Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 38/46] usb: gadget: epautoconf: remove pxa quirk from  ep_matches() Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 25/46] usb: gadget: omap_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 39/46] usb: gadget: epautoconf: remove ep and desc  configuration from ep_matches() Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 23/46] usb: gadget: net2272: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 40/46] usb: gadget: epautoconf: rework ep_matches() function Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 42/46] usb: gadget: move ep_matches() from epautoconf to  udc-core Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 17/46] usb: gadget: goku_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:30 +0200
  [PATCH v4 18/46] usb: gadget: gr_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:40 +0200
  [PATCH v4 09/46] usb: gadget: at91_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:40 +0200
  [PATCH v4 15/46] usb: gadget: fsl_udc_core: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:40 +0200
  [PATCH v4 11/46] usb: gadget: bdc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:40 +0200
  [PATCH v4 05/46] usb: chipidea: udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-27 11:40 +0200

csiph-web