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


Groups > linux.kernel > #1184344

[PATCH v3 25/46] usb: gadget: omap_udc: add ep capabilities support

From Robert Baldyga <r.baldyga@samsung.com>
Newsgroups linux.kernel
Subject [PATCH v3 25/46] usb: gadget: omap_udc: add ep capabilities support
Date 2015-07-15 08:40 +0200
Message-ID <pMowk-7Sm-79@gated-at.bofh.it> (permalink)
References <pMowh-7Sm-3@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/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/

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


Thread

[PATCH v3 00/46] usb: gadget: rework ep matching and claiming mechanism Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 21/46] usb: gadget: mv_u3d_core: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 33/46] usb: isp1760: udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 01/46] usb: gadget: encapsulate endpoint claiming mechanism Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 11/46] usb: gadget: bdc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 19/46] usb: gadget: lpc32xx_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 37/46] usb: gadget: epautoconf: add endpoint capabilities  flags verification Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 25/46] usb: gadget: omap_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 06/46] usb: dwc2: gadget: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 46/46] usb: musb: gadget: add musb_match_ep() function Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 24/46] usb: gadget: net2280: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:40 +0200
  [PATCH v3 10/46] usb: gadget: bcm63xx_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 29/46] usb: gadget: r8a66597-udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 41/46] usb: gadget: add 'ep_match' callback to usb_gadget_ops Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 23/46] usb: gadget: net2272: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 17/46] usb: gadget: goku_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 08/46] usb: gadget: amd5536udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 35/46] usb: renesas: gadget: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 40/46] usb: gadget: epautoconf: rework ep_matches() function Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 27/46] usb: gadget: pxa25x_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 18/46] usb: gadget: gr_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 43/46] usb: gadget: move find_ep() from epautoconf to  gadget.h Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 14/46] usb: gadget: fsl_qe_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200
  [PATCH v3 20/46] usb: gadget: m66592-udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-15 08:50 +0200

csiph-web