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


Groups > linux.kernel > #1183552

[PATCH v2 21/48] usb: gadget: mv_u3d_core: add ep capabilities support

From Robert Baldyga <r.baldyga@samsung.com>
Newsgroups linux.kernel
Subject [PATCH v2 21/48] usb: gadget: mv_u3d_core: add ep capabilities support
Date 2015-07-14 12:00 +0200
Message-ID <pM5ai-zl-19@gated-at.bofh.it> (permalink)
References <pM50B-w0-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/mv_u3d_core.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/gadget/udc/mv_u3d_core.c b/drivers/usb/gadget/udc/mv_u3d_core.c
index ea35a24..4c48969 100644
--- a/drivers/usb/gadget/udc/mv_u3d_core.c
+++ b/drivers/usb/gadget/udc/mv_u3d_core.c
@@ -1324,6 +1324,9 @@ static int mv_u3d_eps_init(struct mv_u3d *u3d)
 	ep->ep.ops = &mv_u3d_ep_ops;
 	ep->wedge = 0;
 	usb_ep_set_maxpacket_limit(&ep->ep, MV_U3D_EP0_MAX_PKT_SIZE);
+	ep->ep.caps.type_control = true;
+	ep->ep.caps.dir_in = true;
+	ep->ep.caps.dir_out = true;
 	ep->ep_num = 0;
 	ep->ep.desc = &mv_u3d_ep0_desc;
 	INIT_LIST_HEAD(&ep->queue);
@@ -1339,14 +1342,20 @@ static int mv_u3d_eps_init(struct mv_u3d *u3d)
 		if (i & 1) {
 			snprintf(name, sizeof(name), "ep%din", i >> 1);
 			ep->direction = MV_U3D_EP_DIR_IN;
+			ep->ep.caps.dir_in = true;
 		} else {
 			snprintf(name, sizeof(name), "ep%dout", i >> 1);
 			ep->direction = MV_U3D_EP_DIR_OUT;
+			ep->ep.caps.dir_out = true;
 		}
 		ep->u3d = u3d;
 		strncpy(ep->name, name, sizeof(ep->name));
 		ep->ep.name = ep->name;
 
+		ep->ep.caps.type_iso = true;
+		ep->ep.caps.type_bulk = true;
+		ep->ep.caps.type_int = true;
+
 		ep->ep.ops = &mv_u3d_ep_ops;
 		usb_ep_set_maxpacket_limit(&ep->ep, (unsigned short) ~0);
 		ep->ep_num = i / 2;
-- 
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 v2 00/48] usb: gadget: rework ep matching and claiming mechanism Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 11:50 +0200
  [PATCH v2 42/48] usb: gadget: epautoconf: use 'ep_match' gadget  callback Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 11:50 +0200
  [PATCH v2 19/48] usb: gadget: lpc32xx_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 02/48] usb: gadget: add endpoint capabilities flags Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 03/48] usb: gadget: add endpoint capabilities helper macros Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 33/48] usb: isp1760: udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 21/48] usb: gadget: mv_u3d_core: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 22/48] usb: gadget: mv_udc_core: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 34/48] usb: musb: gadget: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 16/48] usb: gadget: fusb300_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 13/48] usb: gadget: fotg210-udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 07/48] usb: dwc3: gadget: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 17/48] usb: gadget: goku_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 05/48] usb: chipidea: udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200
  [PATCH v2 27/48] usb: gadget: pxa25x_udc: add ep capabilities support Robert Baldyga <r.baldyga@samsung.com> - 2015-07-14 12:00 +0200

csiph-web