Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753134AbbGOGfK (ORCPT ); Wed, 15 Jul 2015 02:35:10 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:38725 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753095AbbGOGfG (ORCPT ); Wed, 15 Jul 2015 02:35:06 -0400 X-AuditID: cbfee61b-f79416d0000014c0-55-55a5ff1861f0 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 15/46] usb: gadget: fsl_udc_core: add ep capabilities support Date: Wed, 15 Jul 2015 08:32:02 +0200 Message-id: <1436941953-1327-16-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+xoK7E/6WhBvdOKljMetnOYnHwfr3F 3gV3GS067x9mtmj6+4rFYs+ZX+wWzYvXs1lcWGdusfv0JUaLXw+ELDY9vsZq0X/uNIvF5V1z 2CxmL+lnsVi0rJXZ4vf3f6wWa4/cZbd49zLC4tvlZnaLY7P/Mlk8OLyT3WLWG2EHMY/JTzYy eSz4tZXF496+wywe/es+s3r8O9zP5LFz1l12j/1z17B7bF5S73F+xkJGj74tqxg9tuz/zOhx /MZ2Jo/Pm+Q89n7+zeKxffdylgD+KC6blNSczLLUIn27BK6M1//bmAousFfcbVnH1MA4j62L kZNDQsBEYvm3iewQtpjEhXvrgeJcHEIC0xklVr06yQySEBL4ySjxo00DxGYT0JHY8n0CI4gt AmSv+7sDrIFZYC2LxK03C1i6GDk4hAUCJJp2xoLUsAioSrzYcBNsDq+Aq0TPqp+MEMvkJE4e m8wKYnMCxaf3/ILa5SLxdNcHpgmMvAsYGVYxiqYWJBcUJ6XnGukVJ+YWl+al6yXn525iBMfQ M+kdjKsaLA4xCnAwKvHwNixaGirEmlhWXJl7iFGCg1lJhHf2R6AQb0piZVVqUX58UWlOavEh RmkOFiVx3pP5PqFCAumJJanZqakFqUUwWSYOTqkGxk7rIy9DNoseMNk787yDZeukqV/8rzyJ Y9t6ucCT0ceJ19m0ecHM2cW2a3OeHc8r2sUQfT9TQXl69V/RUFNFHp1DrYUTlzq+7XfXCGOf 7SzfFyH9Y1/I4iv1ksH9NTcSwmaevb/9X+LiKvXSMHdeh7n99oK7Lu5Pmf6/NSR7j51h/hKP mzIcSizFGYmGWsxFxYkA5/MHo50CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1187 Lines: 39 Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/fsl_udc_core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index c60022b..aab5221 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -2313,6 +2313,19 @@ static int struct_ep_setup(struct fsl_udc *udc, unsigned char index, ep->ep.ops = &fsl_ep_ops; ep->stopped = 0; + if (index == 0) { + ep->ep.caps.type_control = true; + } else { + ep->ep.caps.type_iso = true; + ep->ep.caps.type_bulk = true; + ep->ep.caps.type_int = true; + } + + if (index & 1) + ep->ep.caps.dir_in = true; + else + ep->ep.caps.dir_out = true; + /* for ep0: maxP defined in desc * for other eps, maxP is set by epautoconfig() called by gadget layer */ -- 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/