Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754508AbbGaOFc (ORCPT ); Fri, 31 Jul 2015 10:05:32 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:42043 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753123AbbGaOF3 (ORCPT ); Fri, 31 Jul 2015 10:05:29 -0400 X-AuditID: cbfee61b-f79706d000001b96-c9-55bb80a5eaf0 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 34/46] usb: musb: gadget: add ep capabilities support Date: Fri, 31 Jul 2015 16:00:46 +0200 Message-id: <1438351258-31578-35-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: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsVy+t9jAd2lDbtDDSZ/MbGY9bKdxeLg/XqL vQvuMlp03j/MbNH09xWLxZ4zv9gtmhevZ7O4sM7cYvfpS4wWvx4IWWx6fI3Vov/caRaLy7vm sFnMXtLPYrFoWSuzxe/v/1gt1h65y27x7mWExbfLzewWx2b/ZbKY3zGV1eLB4Z3sFrPeCFtM +H2BzUHCY/KTjUweC35tZfG4t+8wi0f/us+sHv8O9zN57Jx1l91j/9w17B6bl9R7nJ+xkNFj 9t0fjB59W1YxemzZ/5nR4/iN7UweM1f2snl83iTnsffzb5YAwSgum5TUnMyy1CJ9uwSujBtr t7AUHOOumL/hKlsD433OLkYODgkBE4nn74BMTiBTTOLCvfVsXYxcHEICSxklXq1byA7h/GSU eL57GStIFZuAjsSW7xMYQWwRAQGJ9S8ugRUxC/xgkTg7r5sdJCEs4CGxaO02JhCbRUBVonXi LLAGXgE3icMn1zFBrJOTOHlsMthQTqD41/VnwXqFBFwljhw7xTyBkXcBI8MqRonUguSC4qT0 XKO81HK94sTc4tK8dL3k/NxNjOBIeya9g/HwLvdDjAIcjEo8vAKLd4UKsSaWFVfmHmKU4GBW EuG9r7Y7VIg3JbGyKrUoP76oNCe1+BCjNAeLkjivvsmmUCGB9MSS1OzU1ILUIpgsEwenVANj nvXEG5+Tfxz/L9Wn0C16v/4bx3X1Td4JyzXTZ/xQ8pW9Pt/1jtPc/tuxyz86/Nmkv7bfXilp UcKjK+aPe3o9JKxEdu43fNK3Km6Pz96Tz4IbPLN3sZc26EYz6DoVlceel2rk2tF4WSrlnKnd +dSosoPHt53Nlr3+mtU89IL9xTcnSyLXrt6vxFKckWioxVxUnAgAbqFdELACAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1680 Lines: 48 Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/musb/musb_gadget.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 9e18178..4150baf 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1729,6 +1729,7 @@ init_peripheral_ep(struct musb *musb, struct musb_ep *ep, u8 epnum, int is_in) INIT_LIST_HEAD(&ep->end_point.ep_list); if (!epnum) { usb_ep_set_maxpacket_limit(&ep->end_point, 64); + ep->end_point.caps.type_control = true; ep->end_point.ops = &musb_g_ep0_ops; musb->g.ep0 = &ep->end_point; } else { @@ -1736,9 +1737,20 @@ init_peripheral_ep(struct musb *musb, struct musb_ep *ep, u8 epnum, int is_in) usb_ep_set_maxpacket_limit(&ep->end_point, hw_ep->max_packet_sz_tx); else usb_ep_set_maxpacket_limit(&ep->end_point, hw_ep->max_packet_sz_rx); + ep->end_point.caps.type_iso = true; + ep->end_point.caps.type_bulk = true; + ep->end_point.caps.type_int = true; ep->end_point.ops = &musb_ep_ops; list_add_tail(&ep->end_point.ep_list, &musb->g.ep_list); } + + if (!epnum || hw_ep->is_shared_fifo) { + ep->end_point.caps.dir_in = true; + ep->end_point.caps.dir_out = true; + } else if (is_in) + ep->end_point.caps.dir_in = true; + else + ep->end_point.caps.dir_out = true; } /* -- 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/