Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754248AbbGaOEY (ORCPT ); Fri, 31 Jul 2015 10:04:24 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:57581 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754178AbbGaOEO (ORCPT ); Fri, 31 Jul 2015 10:04:14 -0400 X-AuditID: cbfee61b-f79706d000001b96-db-55bb804e3059 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 22/46] usb: gadget: mv_udc_core: add ep capabilities support Date: Fri, 31 Jul 2015 16:00:34 +0200 Message-id: <1438351258-31578-23-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: H4sIAAAAAAAAAzWRX0xSYRjG+ziHcw4U2wlNj7q5otVWKy1z+V3015l9V9UNq9VaHfWkLEEE tfQiDbPSJGiupWJFabVcwUKsQMUJhua/mGytrSE2WmVpc1Fokpbouvs9z/vseS5eChMb8HhK pijiVAo2X0II8cGFAL31UEWHdFt/dTxsnLiCwx5/Oewy+gCs9rswqJn/isPOoTkSVjabCegx pcGOwVEA58bF0BJ4y4e6kUEceu1NBDS06HB4/2EVBsMzC3z4tNdHwu8Tx2DIW0lCt2GeB+9e vcmH4y4bCRsno6A+7CH2Maju4zMeMs6142jM4cKRzhTkowWXjodsjT4Sdd9+QqK2lnL0pv4e QAbfLEDXra0AWbuDAPW9e8FDDY+1BApaElFXMIwfWX1cuCuHy5eVcKrkPaeFeQ5bD66sWXn+ R+srogJUCWqAgGLoVEbXpeEvcwzjGTMTNUBIiekHgBlq8GLL4jdgqh85yEiKoLcw1hk9iHA0 TTPmL6NkJITRszgzfOfaoqCoKPow47WhCOL0BsbUnhZBEZ3J3PqjXN5KZF6765Z2BYv2L/Pw UruYPsD0ugcwPRAZwYpWwHDKbKU6K1eeouDOJalZubpYkZuUXSC3gKWXfUp4CVz2g05AU0Cy SkQ326ViPluiLpU7AUNhkmiRf2OHVCzKYUvLOFXBKVVxPqd2ggQKl8SKklMtUjGdyxZxZzlO yan+X3mUIL4CxHinZOOBmd3e8oz1/hPkurRCR3pDCtVv17KyON7zyZzoD2tnj2aj9/un1iTW n9yxsyckTvkcvKgJ1JbpMmhh2xmN9qe+sMDS2RlyO4c3ZYK/WbHt6UJPSNA0Um/t6wvUCqeN /m9Je6et+rgLGn/mpQEfFXU53eS5wYW1RRJcncdu34yp1Ow/en7cFa4CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1618 Lines: 50 Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/mv_udc_core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c index 5da37c9..339af51 100644 --- a/drivers/usb/gadget/udc/mv_udc_core.c +++ b/drivers/usb/gadget/udc/mv_udc_core.c @@ -1257,6 +1257,9 @@ static int eps_init(struct mv_udc *udc) ep->wedge = 0; ep->stopped = 0; usb_ep_set_maxpacket_limit(&ep->ep, EP0_MAX_PKT_SIZE); + ep->ep.caps.type_control = true; + ep->ep.caps.dir_in = true; + ep->ep.caps.dir_out = true; ep->ep_num = 0; ep->ep.desc = &mv_ep0_desc; INIT_LIST_HEAD(&ep->queue); @@ -1269,14 +1272,20 @@ static int eps_init(struct mv_udc *udc) if (i % 2) { snprintf(name, sizeof(name), "ep%din", i / 2); ep->direction = EP_DIR_IN; + ep->ep.caps.dir_in = true; } else { snprintf(name, sizeof(name), "ep%dout", i / 2); ep->direction = EP_DIR_OUT; + ep->ep.caps.dir_out = true; } ep->udc = udc; strncpy(ep->name, name, sizeof(ep->name)); ep->ep.name = ep->name; + ep->ep.caps.type_iso = true; + ep->ep.caps.type_bulk = true; + ep->ep.caps.type_int = true; + ep->ep.ops = &mv_ep_ops; ep->stopped = 0; usb_ep_set_maxpacket_limit(&ep->ep, (unsigned short) ~0); -- 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/