Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753786AbbGaOCK (ORCPT ); Fri, 31 Jul 2015 10:02:10 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:60979 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753733AbbGaOCD (ORCPT ); Fri, 31 Jul 2015 10:02:03 -0400 X-AuditID: cbfee61a-f79a06d000005c6f-2c-55bb7fd992dd 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 06/46] usb: dwc2: gadget: add ep capabilities support Date: Fri, 31 Jul 2015 16:00:18 +0200 Message-id: <1438351258-31578-7-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: H4sIAAAAAAAAAzWRa0hTYRjHe3fOdo7DyfEo+aKkMSjQSpOsXsSiYOX7IcIvUhRiJz2o6Kad qWlfpkl46TJRwrvNW5CoM10XN010S8lpygzTcF4wTE0KGt7TapO+/fhfnufDnybYatKXTlKl 84KKS5FLpKR1b4E5MaUxRZ/8XX4YVS7nk6hvVoN6dHaACmfNBLq/u0Ki7uFtCuU16CVorO0s MlltAG3PsahjYUKMtB+tJBo3VktQVaOWRPXPHxBoZ2NPjFotdgr9WL6O1sfzKDRQtStCzwqe itGcuYtClateqHhnTHIB4tKvL0VYt/2KxDPvzCTWtjnEeM+sFeGuSjuFe2taKNzZqMGj5XUA V9k3AX5iaAbY0OsAeHDyjQhXvHgswY4Of9zj2CGjPG9II+L5lKRMXgg5f0uauPvdI81CZZXk fyJzQJmkCLjRkAmDNtsk2OeDcGxG/0+X0izTBOC2tdoVYpktALcMSidLmOPQsFHsKngzDNQv 2ShngWA2SThS+5ByGl4MhjW6ObGTSeYILOzrcR2SMZdgXdMItf/NH34YKHVl3JjLcE2/r7P/ MpaBIaIYyHTgQDOAfFpcmvp2gjJUxd8NVnNKdYYqITguVdkBXJst+r4FfcbIfsDQQO4uYxqM 0ayYy1RnK/sBpAm5t2z2qCmalcVz2fd4ITVWyEjh1f3AjyblPrJD7Z3RLJPApfPJPJ/GC/9d Ee3mmwP8cjUrr7nBmIs34eSqYiJ8obuo9Q+wZnUpfALLvuHhoNOL3UtT8+9LIjaaoiLdtTPS zdqCgACFqVyo9895RNItx2ZCgn5m7UQIuUvCleJkomReuh7oPx0aoECfe2Wjxvbca441z9hE n6tfps+c8piNGTpn+RXuF2ar6L3ToJOT6kQuNIgQ1Nxf5sABxK8CAAA= 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 731b13d..3ee5b4c 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/