Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752710AbbGOGeG (ORCPT ); Wed, 15 Jul 2015 02:34:06 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:39091 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751966AbbGOGeC (ORCPT ); Wed, 15 Jul 2015 02:34:02 -0400 X-AuditID: cbfee61b-f79416d0000014c0-ac-55a5fed8c823 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 06/46] usb: dwc2: gadget: add ep capabilities support Date: Wed, 15 Jul 2015 08:31:53 +0200 Message-id: <1436941953-1327-7-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+NgFupikeLIzCtJLcpLzFFi42I5/e+xoO6Nf0tDDTZcVbOY9bKdxeLg/XqL vQvuMlp03j/MbNH09xWLxZ4zv9gtmhevZ7O4sM7cYvfpS4wWvx4IWWx6fI3Vov/caRaLy7vm sFnMXtLPYrFoWSuzxe/v/1gt1h65y27x7mWExbfLzewWx2b/ZbJ4cHgnu8WsN8IOYh6Tn2xk 8ljwayuLx719h1k8+td9ZvX4d7ifyWPnrLvsHvvnrmH32Lyk3uP8jIWMHn1bVjF6bNn/mdHj +I3tTB6fN8l57P38m8Vj++7lLAH8UVw2Kak5mWWpRfp2CVwZB87cZSw4wl4x8c0O5gbG6Wxd jBwcEgImEi/3MXcxcgKZYhIX7q0HCnNxCAlMZ5Q48vIhO4Tzk1FiysNHrCBVbAI6Elu+T2AE sUWA7HV/d4B1MAusZZG49WYBC0hCWMBDYufCiUwgG1gEVCUWrPICCfMKuEisfvoEapucxMlj k8Fmcgq4Skzv+QUWFwKqebrrA9MERt4FjAyrGEVTC5ILipPSc430ihNzi0vz0vWS83M3MYJj 6Jn0DsZVDRaHGAU4GJV4eBsWLQ0VYk0sK67MPcQowcGsJMI7+yNQiDclsbIqtSg/vqg0J7X4 EKM0B4uSOO/JfJ9QIYH0xJLU7NTUgtQimCwTB6dUAyO/Se7K/a0qH1IPT/2yNfnVLdlQzSXX 8jI+P7PfGrH8eL+Vfuy93uZfn9e6vmue+9gnfhZ78ovAVTGNNvcYazz8RX5ME1VrKj+QZr8p hbGFu9Kv6sCPuK4Xy522/t3+65z/9oCs3IDIPLeeYuXdic4PlNuDpkxXaX7PHuju5MnjO9N+ 5/npt5VYijMSDbWYi4oTAeDxp5mdAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1175 Lines: 39 Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/dwc2/gadget.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 4d47b7c..8771b66 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -3289,6 +3289,19 @@ static void s3c_hsotg_initep(struct dwc2_hsotg *hsotg, usb_ep_set_maxpacket_limit(&hs_ep->ep, epnum ? 1024 : EP0_MPS_LIMIT); hs_ep->ep.ops = &s3c_hsotg_ep_ops; + if (epnum == 0) { + hs_ep->ep.caps.type_control = true; + } else { + hs_ep->ep.caps.type_iso = true; + hs_ep->ep.caps.type_bulk = true; + hs_ep->ep.caps.type_int = true; + } + + if (dir_in) + hs_ep->ep.caps.dir_in = true; + else + hs_ep->ep.caps.dir_out = true; + /* * if we're using dma, we need to set the next-endpoint pointer * to be something valid. -- 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/