From patchwork Mon Jul 27 09:16:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Baldyga X-Patchwork-Id: 6870731 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 18DA39F380 for ; Mon, 27 Jul 2015 09:26:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 52CA620632 for ; Mon, 27 Jul 2015 09:26:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CF5920650 for ; Mon, 27 Jul 2015 09:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178AbbG0JVl (ORCPT ); Mon, 27 Jul 2015 05:21:41 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:41206 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751244AbbG0JVi (ORCPT ); Mon, 27 Jul 2015 05:21:38 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NS500P2G3BAGB40@mailout3.samsung.com>; Mon, 27 Jul 2015 18:21:21 +0900 (KST) X-AuditID: cbfee61b-f79706d000001b96-19-55b5f81112e6 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 02.9D.07062.118F5B55; Mon, 27 Jul 2015 18:21:21 +0900 (KST) Received: from AMDC2122.DIGITAL.local ([106.120.53.17]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NS500L1Z34BGGA0@mmp1.samsung.com>; Mon, 27 Jul 2015 18:21:21 +0900 (KST) 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 v4 33/46] usb: isp1760: udc: add ep capabilities support Date: Mon, 27 Jul 2015 11:16:43 +0200 Message-id: <1437988616-6962-34-git-send-email-r.baldyga@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1437988616-6962-1-git-send-email-r.baldyga@samsung.com> References: <1437988616-6962-1-git-send-email-r.baldyga@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWRb0hTYRjFfXfvdq/DwXXaelMQGoYxTEuEvURESNH7QSoIIayopZdpuTk2 Na1g0krLf7NWkU5Nc2mO2nC6Sp2Kmxm5rKWkfnAqWKEVgoz8M3G0KX07z++cw/Ph0ITQSMbQ ucoCVq2U5Yl5fNIdWGAORK7bMw6OtYhQ/VI5iYbmtKi/2QvQ/TkXgW5v/SKR45OfQrpWKw95 LFLU5x4HyD8vRLaFSS7Sf3aTaKK3gYeMJj2JnrfdJdDmWoCLXg97KbS8dA6tTugoNGLc4qBn 9x5z0byrh0L1f6JQ7aaHdwxiw/dODm7220k8O+Aisd7i4+KAS8/BPfVeCg82vqJwl0mLvzxt AdjoXQe4ptsMcPegD+AP0285uK6jmod9tjjc79skz0Rm8o9ks3m5Raw6+ehlfo7DWUOoRuni qmUDVQr+8ipAOA2ZVOhvDYAdLYKeWes2FzIvADR/k1YAflBvAPhIt0GGDB6TCLvXarcL0QwD rYvjVChEMOskHGuqDB40HcVguDgiD2VIZh+cmTRwQ1rAnIBVDV+JnWdx8OPIDg8PctMTOydU FTLH4fCUpBYImkGYGUBWlaXSXJErUpTs9SSNTKEpVMqTsvIVNrA92c/Yd8DVe9IJGBqIIwSe eHuGkCsr0pQonADShDhasJAZRIJsWckNVp1/SV2Yx2qcIJYmxbsFyam2DCEjlxWw11hWxar/ uxw6PKYUpFn3ujthuqGsUids6SjfJdEqpx4iwiLqf9DklNim27WVWp40rq3Y1yhd3dN+Qa9N MhAOzcqpvjWoLBS75efjFad/J968mpteV00wYbdiE97MWPe/P5tgXhWNXtRPvwwbulNm7gNd gpmUio7DWS6QRg2YnD8i0IrVonSISU2O7JCEUGtk/wDSytjdrgIAAA== Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/isp1760/isp1760-udc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/isp1760/isp1760-udc.c b/drivers/usb/isp1760/isp1760-udc.c index 3699962..1c3d0fd 100644 --- a/drivers/usb/isp1760/isp1760-udc.c +++ b/drivers/usb/isp1760/isp1760-udc.c @@ -1383,13 +1383,24 @@ static void isp1760_udc_init_eps(struct isp1760_udc *udc) */ if (ep_num == 0) { usb_ep_set_maxpacket_limit(&ep->ep, 64); + ep->ep.caps.type_control = true; + ep->ep.caps.dir_in = true; + ep->ep.caps.dir_out = true; ep->maxpacket = 64; udc->gadget.ep0 = &ep->ep; } else { usb_ep_set_maxpacket_limit(&ep->ep, 512); + ep->ep.caps.type_iso = true; + ep->ep.caps.type_bulk = true; + ep->ep.caps.type_int = true; ep->maxpacket = 0; list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list); } + + if (is_in) + ep->ep.caps.dir_in = true; + else + ep->ep.caps.dir_out = true; } }