Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753896AbbGaOCm (ORCPT ); Fri, 31 Jul 2015 10:02:42 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:56577 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752488AbbGaOCj (ORCPT ); Fri, 31 Jul 2015 10:02:39 -0400 X-AuditID: cbfee61a-f79a06d000005c6f-65-55bb7ffd7796 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 11/46] usb: gadget: bdc: add ep capabilities support Date: Fri, 31 Jul 2015 16:00:23 +0200 Message-id: <1438351258-31578-12-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: H4sIAAAAAAAAAzWRXUhTYRzGe3fOdo6rwWmTels5cGCFlh994Hsh0U36XmVdDCIDXXqY4jbH 5kd2s5Gs0lAHIqkzM2eGZn6HOjNxk5VO0zRUkKmpVKaGOPJrbOaU7n48v/+f5+KhCWElKabT 1JmsVi1XSnl80ulbZC569T2yyGFfNKpYfkKi/jk96q12AZQ/ZyfQI+9vEn0Y3qVQnqWZh8aa olGPcxyg3Xkhaluc5KLiL04STVgrechcW0yimjojgTxbPi56N+Ci0J/lO2hzIo9CDrOXg14+ LeWieXs3hSpWRcjkGeNdh7hkqZWDq3ffk3j2o53ExU1uLvbZizm4u8JF4b4XjRRur9Xj0bJX AJtd2wAXdTQA3NHnBvjTdCcHl9cX8rC7TYJ73R7y1vG7/JgUVpmWzWojriXxU8uqJgnNT/6D 2a5ewgDW6AIQQEPmChxc2eAc8gk4NtvM87OQeQ1g/jdFAeDv8w6A9jUj6Rc85gLs2DIBPwcy DGz+NU75jwhmm4QjVc8ovxAxcXC90HzwQDIhsGXPxi0ANC1gYmFrl+KwTAIHHSVcPwfsx3+b R6jD4htwwDFEmICgGhxpAJDVJGt09xWqKDWbE66Tq3RZakV4coaqDRxs9kPcBfqtcTbA0EB6 TMBYrDIhV56ty1XZAKQJaaBg7myPTChIkec+ZLUZidosJauzgdM0KT0pCGpplwkZhTyTTWdZ Dav9bzl0gNgAjJ7B1ed9CXggJzbsaui5UQmZIFnellBllph1Z8l4gVC72WiNjP9quhxWn5gU sTEQnHsmYWFv6lR6nGiJ7BXsLOTNmBvftNSs19UWlR41GcQL8UrR95WcmzuZt9+We81wZFLp CDEEW2Y672nSuIWXMh4neaaC9NNE/9Bn43kpqUuVR4USWp38H6agnyKvAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1585 Lines: 48 Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/bdc/bdc_ep.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c index b04980c..f9a8f57 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_ep.c +++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c @@ -1952,12 +1952,18 @@ static int init_ep(struct bdc *bdc, u32 epnum, u32 dir) ep->bdc = bdc; ep->dir = dir; + if (dir) + ep->usb_ep.caps.dir_in = true; + else + ep->usb_ep.caps.dir_out = true; + /* ep->ep_num is the index inside bdc_ep */ if (epnum == 1) { ep->ep_num = 1; bdc->bdc_ep_array[ep->ep_num] = ep; snprintf(ep->name, sizeof(ep->name), "ep%d", epnum - 1); usb_ep_set_maxpacket_limit(&ep->usb_ep, EP0_MAX_PKT_SIZE); + ep->usb_ep.caps.type_control = true; ep->comp_desc = NULL; bdc->gadget.ep0 = &ep->usb_ep; } else { @@ -1971,6 +1977,9 @@ static int init_ep(struct bdc *bdc, u32 epnum, u32 dir) dir & 1 ? "in" : "out"); usb_ep_set_maxpacket_limit(&ep->usb_ep, 1024); + ep->usb_ep.caps.type_iso = true; + ep->usb_ep.caps.type_bulk = true; + ep->usb_ep.caps.type_int = true; ep->usb_ep.max_streams = 0; list_add_tail(&ep->usb_ep.ep_list, &bdc->gadget.ep_list); } -- 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/