Message ID | 20190822023426.28114-4-sherry.sun@nxp.com |
---|---|
State | Deferred |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="akzrzsNi"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46D9Kc0CxTz9sBF for <incoming@patchwork.ozlabs.org>; Thu, 22 Aug 2019 00:39:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 993A1C21FD0; Wed, 21 Aug 2019 14:38:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7701BC2200F; Wed, 21 Aug 2019 14:36:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2662EC21FA5; Wed, 21 Aug 2019 14:36:01 +0000 (UTC) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70082.outbound.protection.outlook.com [40.107.7.82]) by lists.denx.de (Postfix) with ESMTPS id D13ABC21FEB for <u-boot@lists.denx.de>; Wed, 21 Aug 2019 14:36:00 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OilzQ5cyP8KmYEv1SHRL5+US202jc/+4YIlrBEpabhDi4xouX0hzfA5ri+P+9kcLbbQKngz/SJB3zPt1tLZbdGev3UOOfQBEIZzXPi37Zt6Si78vIIOqmLjD0yN9Ml3joSoS5vwztH6iNreJnSfuK8If/k+HcZQLJTfcgqojRICiohGsQZZecWTwfdaXjvaOaG7EcQFxLEx5L9OwktbfvXIwyt0BC2gZolsGkG3ISVKiCEdTwRh7bl4oGa7L7fk2FXIuplmtpzR2HEHFkwZ796zOV7BDXXAvCoPLud1WoodN/Gh1iARhooS8hfy2WoSZlPBw3oO0GZpDyranQjjXXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i9P34P/QfFw6ioajmA1a9FUnKVuYq2gsKQ/tFa9EfbA=; b=P90ZMUet3RVcdmozSl+DxTpDpp+/ucaZybUVR2zyj0FLigJ1zzPdNR2rfCbfnzZyRPVWizTCN41jyHJszhgrmndn0XSFI0p9ZZSoAP5AvJ0uHpHHbSjtPhaCvQon6jzQNckb/VgD9HoZifU0Op3amF2Et/CRyE/XBtSyZCRdlaat12omfog23CTEVy6sn4SgQL97Dh5WcskgPVSB9VWbR+vG4pto5xA1wucfPUvRFF0ZpnEsGvmUZ7NmvDVHK+4CfnUCXSR9IHTh89f1cBxvltwENSGLIiVi2mUp5qASrrf70lkwwTTRIkLf8499i5koxkvZV5n0lruuOWiLDK0Tjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i9P34P/QfFw6ioajmA1a9FUnKVuYq2gsKQ/tFa9EfbA=; b=akzrzsNiJvrMDeuMQIcZlgj/hBb8q7yjMLzD4mrAAQTh2jdHxERgU+C4+DB3JmO4PSS2VLCzNNFz2fx3kMZv7XpN8I+Ti7OuCaPYsBUB2cin4vsPc/XdbvbCO9aa0ddTIPc03VEGMGJ3Ugof7cJ4umvZ3YGFiSzN49Jz2onhEhE= Received: from AM0PR04MB6436.eurprd04.prod.outlook.com (20.179.252.146) by AM0PR04MB6706.eurprd04.prod.outlook.com (20.179.254.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Wed, 21 Aug 2019 14:35:59 +0000 Received: from AM0PR04MB6436.eurprd04.prod.outlook.com ([fe80::5d9d:1811:f920:3ec2]) by AM0PR04MB6436.eurprd04.prod.outlook.com ([fe80::5d9d:1811:f920:3ec2%5]) with mapi id 15.20.2178.020; Wed, 21 Aug 2019 14:35:59 +0000 From: Sherry Sun <sherry.sun@nxp.com> To: "marex@denx.de" <marex@denx.de> Thread-Topic: [PATCH v5 3/7] usb: gadget: Add match_ep call back to usb_gadget_ops Thread-Index: AQHVWC3ARv+hAiv2R02xgZeqhgI8TQ== Date: Wed, 21 Aug 2019 14:35:59 +0000 Message-ID: <20190822023426.28114-4-sherry.sun@nxp.com> References: <20190822023426.28114-1-sherry.sun@nxp.com> In-Reply-To: <20190822023426.28114-1-sherry.sun@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:203:92::36) To AM0PR04MB6436.eurprd04.prod.outlook.com (2603:10a6:208:16b::18) x-mailer: git-send-email 2.17.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=sherry.sun@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: aba9a6ee-1a65-4bc4-a256-08d72644e286 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR04MB6706; x-ms-traffictypediagnostic: AM0PR04MB6706: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <AM0PR04MB6706B61EEBBC16EB07E7DD7192AA0@AM0PR04MB6706.eurprd04.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 0136C1DDA4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(136003)(39860400002)(396003)(346002)(376002)(199004)(189003)(2616005)(76176011)(11346002)(486006)(14454004)(476003)(2351001)(446003)(25786009)(6916009)(44832011)(4326008)(66066001)(71200400001)(1076003)(102836004)(86362001)(71190400001)(386003)(26005)(50226002)(1730700003)(2501003)(8936002)(81156014)(81166006)(6506007)(478600001)(5660300002)(52116002)(99286004)(316002)(305945005)(3846002)(54906003)(66556008)(66476007)(64756008)(7736002)(66446008)(6116002)(186003)(8676002)(2906002)(6486002)(5640700003)(256004)(14444005)(6512007)(36756003)(6436002)(66946007)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB6706; H:AM0PR04MB6436.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 9cDPw6em3BWWUrBjQ/pK1BKMEqsLUOKEqyytv+g28Ez5RChbDEh/n2Rf7no9QhwuD/WcyZHZP/hmtZVF9NAEXpXnmGeufpAGDhpnxGVUkj08uSTzkpxBcwATbdJqseQyXl+G8OJKYkUGGssb5wU02dKENih2KX2jhAh1DugKVaXUwhW4z77H3OHwq/zEo6+vdAnJN0P4t/R89PsMpojBLh3Y3wxkVZPw/nTrQSadqoszMrR1neo3fr2iA20MD2GxSNK7pLJKvhYhKgJ4d07Hj18omDB66fIN82Q/5iBeEYi+EHFEcUiQdTPCsD8ao25Yn0+vsz1EVHHTprG196xoxAtnqTnY3QyXHGYJrfZDJ1TObahfSUQ2k5UROhn2vLvD3QYrcvYiIjl5D7kE8ZfNvkk4i3LYQ5B5YgamWT7gHQk= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aba9a6ee-1a65-4bc4-a256-08d72644e286 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Aug 2019 14:35:59.8529 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hCuzZ2smuhFfUVABTjdwEO5Z0W1dZHcrfPOK64aeEkh/DFmPa2pU8hIkYNwTDRWqVUPquy7Optr274J6FeuFQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6706 Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>, "u-boot@lists.denx.de" <u-boot@lists.denx.de>, dl-uboot-imx <uboot-imx@nxp.com> Subject: [U-Boot] [PATCH v5 3/7] usb: gadget: Add match_ep call back to usb_gadget_ops X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
usb: Add cadence USB3 gadget/host/phy driver
|
expand
|
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index 179b94cdd0..360f2b75ff 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c @@ -167,6 +167,10 @@ static int ep_matches( size = 64; put_unaligned(cpu_to_le16(size), &desc->wMaxPacketSize); } + + if (gadget->ops->match_ep) + return gadget->ops->match_ep(gadget, ep, desc); + return 1; } diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 497798a32a..a34f3478f3 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -447,6 +447,9 @@ struct usb_gadget_ops { int (*udc_start)(struct usb_gadget *, struct usb_gadget_driver *); int (*udc_stop)(struct usb_gadget *); + int (*match_ep)(struct usb_gadget *gadget, + struct usb_ep *ep, + struct usb_endpoint_descriptor *desc); }; /**
Since some new fields in usb_ep structure been moved to usb_ss_ep. The CDNS3 gadget driver should replies on this operation to bind the usb_ss_ep with the endpoint descriptor when function layer uses usb_ep_autoconfig to add endpoint descriptors to gadget. So that CDNS3 driver can know the EP information and configure the EP once the set configuration request is received. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> --- drivers/usb/gadget/epautoconf.c | 4 ++++ include/linux/usb/gadget.h | 3 +++ 2 files changed, 7 insertions(+)