Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754853AbbGaOON (ORCPT ); Fri, 31 Jul 2015 10:14:13 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:34202 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754205AbbGaOEV (ORCPT ); Fri, 31 Jul 2015 10:04:21 -0400 X-AuditID: cbfee61b-f79706d000001b96-f3-55bb8064ec85 From: Robert Baldyga To: balbi@ti.com Cc: gregkh@linuxfoundation.org, 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, stern@rowland.harvard.edu, petr.cvek@tul.cz, Robert Baldyga Subject: [PATCH v5 25/46] usb: gadget: omap_udc: add ep capabilities support Date: Fri, 31 Jul 2015 16:00:37 +0200 Message-id: <1438351258-31578-26-git-send-email-r.baldyga@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1438351258-31578-1-git-send-email-r.baldyga@samsung.com> References: <1438351258-31578-1-git-send-email-r.baldyga@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWRXUiTYRTHfbb3y+nwdVo+WHmxyLBS0wY9YIQ31RPZB9RAu7E3fVPJzbGp pQVKIqZWM0xIpza/oiQdmWlzmeRkZsscCpHYdKWkLi1K/JoptVl3v/M/v3POxWGEkloimElT ZvJqJZcupUSEdWOSDU/ON8n3O0b9UNVsEYFeT+Shbr0doOIJsxDdWHcS6OU7F40KGgwUsrUe RCbrMEAuhwS1TX4gkfa9lUAjXdUU0jVqCVT/sFCI1pY3SNTSZ6fR99l4tDRSQCOLbl2AHtys IJHDbKRR1VwAKluzUbEQl089FWC96zmBx1+ZCaxtXSDxhlkrwMYqO417ap7Q+FljHh66Xwew zr4C8J32ZoDbexYA7v/YKcCVj29TeKEtBHcvrBFn/M+LDiXz6WnZvDry8AVR6g/nGFDNMVer R11UPmiiS4A3A1kZdI4VCDZ5K7SNG6gSIGIkbBOA49MdYLNYBXCxaJJyWxS7D7YvlwE3B7Is NMwM025JyK4QcLC21LM2gI2DS82lHolgd0F94bpnWMwehTMVjf9Oh8ABSznpZu+/+aJh0JNL 2COwz/JWWAbEeuDVDCCvSlJpLqYoopX8lQgNp9BkKVMikjIUbcDzta/bXgBz17FewDJA6itm G7rkEpLL1uQoegFkhNJA8USoSS4RJ3M5ubw6I1Gdlc5resE2hpAGiSNlbXIJm8Jl8pd5XsWr /3cFjHdwPjCIrmVOx8RX1vvF3vN3lpulZasnzXHFeDm7Jbv9eG7N71O7v4QlOKaC3nReL5nq rBjYuyNe+ilwtb9Y9ZP8tYWZRwmyS6LwsBjSq5ydX41OvXs6NPZAh8in7tEJX5NlnB9KRDJH RtQ5q1EM7We/LQlMxu07fTjdLYXtc5giRkpoUrmoPUK1hvsDoWsDjbECAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1334 Lines: 48 Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- 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/