Message ID | 20210125134400.780-2-peng.fan@nxp.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp3992137jam; Mon, 25 Jan 2021 05:26:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXKXqvytIO5c80Ne8eDdVY9UQI+Rss9ILKvO69/VOdn3LjaGQ4rGirarOJVNd5Nq5T36tJ X-Received: by 2002:a50:ff11:: with SMTP id a17mr452195edu.63.1611581209701; Mon, 25 Jan 2021 05:26:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611581209; cv=pass; d=google.com; s=arc-20160816; b=IelDPdgxffBp1aXfH1MEA9cqSinIIOjqiHiGxGijInYB8q0UoVp54rqS5phBgnSFZ/ rOLQP7Tphp8ZgpNbUce/ZchNsZIvqu/O8g+A863NiKZOCmREBIpQhjH7ANSPJ+Dx3Wod QKWUPvrRUheo2PqwsB0eHez5yySZ3bP4WbI/k2nCONs3PM99mY8sTJadnRsIKDLz4X4T pTZJbO92Pa4D55NClLEvIECLgoJk8UhBMEJRFUMyObup5iaZcfU59cexDI5shQUW3gRs wognhgAzTMHBW2enZJHpEvq4CiuvHeltDDACoUvAXNQmsJ5MbHWZ2gY9Rsd5QEtogy4V lF7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=0vrWUjyfJfL5GNoteJflp9o+ejCHhKYInLq6pnuB3KU=; b=w5MvjaaJ6uTRgdcT4qvD5Xvp1gOYG/bz+OaTcVziXfivWFU8Hk0jCJ6hfXlbDne8fW AtI5kPqAIC9ABfa+NVvOV0eQEoKxIZXabznO4ZmcMeMTPQpjDBCEISCm11MwwY/e6q7S vgBmZFXCg/BwnnNWxitEvv9jupw0xGytsHrjJrl6YhUWUXFuJ/yDmN7a8Fd7Rd61CC01 QcrQxYgH2l7KH95S07R8U2cWM2+gCGqEhDFCxHqqM95F9tnFUu1hHlw0VOl5g7ughNH2 w69iHsKAx5Wi2WaqEz+bAs9tf8W9r69UzUEbinOHF0JPO4Su+4OgQgpV3yCOtIv8kFlH zutg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bkc1oFJr; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: <u-boot-bounces@lists.denx.de> Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id o11si5950684ejn.707.2021.01.25.05.26.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 05:26:49 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bkc1oFJr; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A19DC826E8; Mon, 25 Jan 2021 14:26:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="bkc1oFJr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8FC96826C4; Mon, 25 Jan 2021 14:14:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on062e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe06::62e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 72E278267A for <u-boot@lists.denx.de>; Mon, 25 Jan 2021 14:14:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RiIG+sq4AkaVOKrxm/6BXTp374KnGwo71i/smS+XNbTIgxW32dlkI5AY7DCC7pE5zwFdH9Z/sCcMvApLngqBlQhbl0RE8gDUan3P6cQfOlnew55bcQPxOxYH1PBt1nJgbaMopzEQy+ibarpCGmYvYo4Xh9PrEIyxxs+FhEnkQnyvNFEZDdTUkMjXUb1zRbli9hrPrENTOSKbaZGjknoRnD9cJoELJV+MIp6VAN6Kh94yQLzObtEugnVe3Lt2bvLLSHktLWXO0wmGqM//RCfr/kSSjxf7kS6eCJngN3eQerkSLzi0YM5IxjP0weABJDQXlA96nS+tOwhU2K/Rd6xx2g== 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=0vrWUjyfJfL5GNoteJflp9o+ejCHhKYInLq6pnuB3KU=; b=ghbyQVqzsxZNfMgRcD+lR5CZN9z5QT09llCPTEAUyiQkK6xuK2OG0p4ata3JIuRTYqgQzem9yK9i8m9vuAJldfBCIiHGcdlza4423o4RB0tBaFPN88y3UrBh8fYs/+loF3/H1KIvAB4wdxQaKCzNv7U44oZmscBza2MhwCq+W78BvpIWN2KkDcAN5V5fjL94i8+28xove1r17np2ADstLJ/iGgUcDHZpMel7WizXmoVYvyJJ58QB3eaG6qTeF7tD2IHNICR8AvHYuKMnSNEJ6wFyfP0e26j17BPjB94X1rASfK3yFqctVM04gfhvJchsYjtxEnCqfbJyNtgxUDtXIQ== 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=0vrWUjyfJfL5GNoteJflp9o+ejCHhKYInLq6pnuB3KU=; b=bkc1oFJri5I6nkFFKwzELlPbR1sTUZ1Qt20gae64fnzGHx2CWCfG83Vv2nibpKdRoD17LJj7zVePmrlm/DEWK4qv7YPyFfzpHXpMG0ORTXl1QDY0ZV3tNtb04M60cGGV1HVGOQT8zZxh2nS5elVcc5Buea0BLXskTih+T9gwL0Q= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none;denx.de; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.17; Mon, 25 Jan 2021 13:14:32 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3784.019; Mon, 25 Jan 2021 13:14:32 +0000 From: peng.fan@nxp.com To: sbabic@denx.de, lukma@denx.de, marex@denx.de Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Ye Li <ye.li@nxp.com>, Sherry Sun <sherry.sun@nxp.com>, Peng Fan <peng.fan@nxp.com> Subject: [PATCH V2 01/17] usb: gadget: Add ep_config call back to usb_gadget_ops Date: Mon, 25 Jan 2021 21:43:44 +0800 Message-Id: <20210125134400.780-2-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210125134400.780-1-peng.fan@nxp.com> References: <20210125134400.780-1-peng.fan@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR03CA0117.apcprd03.prod.outlook.com (2603:1096:4:91::21) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR03CA0117.apcprd03.prod.outlook.com (2603:1096:4:91::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.6 via Frontend Transport; Mon, 25 Jan 2021 13:14:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f6f0b01a-46f7-4e47-62e9-08d8c1332783 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DBBPR04MB7930FADB115AF7A6F5C788C888BD0@DBBPR04MB7930.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vp8ePAuclTlT1UuhLWgf/eejCBf+fVhlUGhDKSJBUljGl3Q+ZLpAM/OVq+HO8awO7+H3RoqEQvIx0YNAMyyOn56QTe6yJgVozQJldIKuVz0iTcAs9S9RA7ZZhJvF6GZHbhS70A7wVVTP+nh0T/TOHobklYVj1fco85c2t34+8jzi2n1GuKEkXiMqloq/NKf87gbwqh1Pu1xzbZktnOXguwTOR3vQ/vKtcKUrXIgg1BZqySCSmoWJPD4szgNgiFVhuBPcMWzag5T6J8LEx5jTn0E4lQjBkgC5axleU0AYCjZZi3a/Nl3fwHlsymzbWIsxaeBw8sgg8tltL7t3AjEpx7sF3shejd/TL7Vc3cy9rfMAW4OdXOVzelR1FdWGGuXbsz3yNY4y7GSlpSCAKNSObg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(346002)(39860400002)(376002)(136003)(2906002)(66476007)(66556008)(8936002)(186003)(4326008)(16526019)(83380400001)(8676002)(478600001)(66946007)(5660300002)(6666004)(9686003)(2616005)(36756003)(54906003)(1076003)(956004)(6512007)(6486002)(6506007)(86362001)(316002)(52116002)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: uVt+f/c9Ua1fDxuM/Qz0bgikdEsJO4fTk/awRLv3qjT1o+U+RT7vwIuFh+c4UzUfxQs8PJ6v0YszcdXDgypo5Ydyy7D4g/TGGH7doocKYIn1j/RHwbkF1XF3KYcpsMpQIofAYRPezyziJ9NF6NW1h4QtHBdchoaFQeRiMCcmUITOZPo0TjMTRG7U61+Ege455Fnxavk7QL8O5BRCcd4pSyVGSXzkBRxClvnr0kABCSx6zNSOP3DSviYBA4C1i55QpSB+ZEfhGY32pQCGclR5T394Jy5fa9szGq4BE/EKhd7PG43orc3f1kvzqATjoRNp+B+pbaJvMFyqcDsL0HVdeKeQckAroMrtoR9E9AM09Q7/WjdEYrGLCrRDdSGxaw07Jid68uc6Oxgfk4kaT26zEuxC7bgItG6Hb+Z6xZkKz8INPLLIgiq89ZvewDAstpWe987eFRazHmTRiaDunSG7AbA2HNHcuPDCzMuUCBVD4/4CewWiL73iF0W3PATKhStgE6udxuM1U616kIzYqvV+rHZSGZk/nRVNCLlSEWjlyabUe2b7xOmbr5AgilWBAq42yX3kvPQqEkbdB/GqOsODM1GWJjfw6FFIRFgHz3oqCziT+kPht7ZH5cXGg7xOilX29LiIEC/hvSv5fvLpER0WlrhQwXFGdoMQuQ2uWTENgUy17sKy7wxNnEuItumYB/1V11WA87fU5NAl8tMttxOzEInU1dR2FOPoHmLWg0EK74nucDy0cybZH/VV5JtiSUIThKRSQrcO6DbKYF9Uc7+azuYH+sBzln2RiM+tNbf6PQwiSlfFQohjsZKpo0sh7PwWJmGcnAX0aFI5GyX6LCCg2cV/Iii/tyQCTIZpywV7pI4HNhUXOqh6VtfrUZCJljIh+3t9QN3qAFQTEZU0d2QaqUYHEczVQ5yAAC1tga72CSYICwq9m/1z8vor7dTTr+dZ3qhMWAVuQi+oJEs7rvHQbYB7NHG26PlZAs63l58KkZLhMgnsAXq22OG+h/DLu3KO X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6f0b01a-46f7-4e47-62e9-08d8c1332783 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2021 13:14:32.5958 (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: VroVeJzgvBN0I9qznrSzBOvoGJYAEJBpuoF7lsw8WEnCk5Xg09jbDofIBAPrSUEHp/XiQ26UvRHS/9eQl2skKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 X-Mailman-Approved-At: Mon, 25 Jan 2021 14:26:22 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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: <https://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> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
usb: gadget: update
|
expand
|
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index e61fe5d114..3f8842976d 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->ep_conf) + return gadget->ops->ep_conf(gadget, ep, desc); + return 1; } diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 06292ddeb6..8d54b91734 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -470,6 +470,9 @@ struct usb_gadget_ops { struct usb_ep *(*match_ep)(struct usb_gadget *, struct usb_endpoint_descriptor *, struct usb_ss_ep_comp_descriptor *); + int (*ep_conf)(struct usb_gadget *, + struct usb_ep *, + struct usb_endpoint_descriptor *); void (*udc_set_speed)(struct usb_gadget *gadget, enum usb_device_speed); };