From patchwork Thu Feb 29 08:34:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13576836 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4CAAC48BF6 for ; Thu, 29 Feb 2024 08:35:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADFE710E211; Thu, 29 Feb 2024 08:35:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=wolfvision.net header.i=@wolfvision.net header.b="Rq7KXKmD"; dkim-atps=neutral Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2122.outbound.protection.outlook.com [40.107.22.122]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29EBD10E1F4 for ; Thu, 29 Feb 2024 08:35:00 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JvKDmjGUw1yvjg5mr4VZK9c200CwVLDy8+Xarro8rQWDR13GHKmEqzbnB3SQmrq1Y2kE6G2gjJ8ZuYuIMCyVA0Qd0199VwafC7Q2yzqzig/7auROwpZA8rdUnMDtbRUFtm0PZyxFFCfG/fdOZCO2XAoR6d0+r3sFPDLkj+qAkouPdUYFjlyCtHxmkemyOfHHQpvHZ/PxwdGUYbiiMOLFy8O+JnTePnHqU6mha9aIZXeUzru2/75/BIfA7vcwswXFd3/4pVVUPUU/Vkmnl3b5FwoopMGBYiOKlwAhOyyvDjtrJ86xjYBkp6JryuYIpyW0glV7DwXSpYTeFQ1IEIvOAA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oZ/pSS/SvY4eruNxrTINDd0ELQdqtnODz0ZyyM7YC4k=; b=OCHoXjB/VpKoZbVDwLPAUyveyIsEp6amYFu2s3MAz9fV9Cui/kohoYacN8O5HLq8hXmoDL1KS3/BVE4vtJSTSZlTqqx2aq5PGkCU2t3I7NRC4hYbUjx3sWhgZC5bZ65R54Sqcd4AnQlGvaMWX07RXeYKM4KHHymo1/aT9KZ3i3yugepcKYGZj2Mc+7gVquJZ7OILnC0gGEjCyAx/+SSzNtXf2iZHISsY/L5QO1E0Vj/2RQbemDau2U6Fq2wvcFA8joZDvGMgsArDIvG3z8cmQUAFzqT3PKCFm3oUqtyI2bXKy736vY89nF6r8zh9OkIh7FDuktL+vLiX16t2j1cW5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oZ/pSS/SvY4eruNxrTINDd0ELQdqtnODz0ZyyM7YC4k=; b=Rq7KXKmDWmLPLGQ3ggUkdw/eqH2TjvZmh3cv6WQ4kVoxRVpGKr/yw/peHqobpifWoO/dyfzPyOQrL+pm4/btVy0HL/ybP77fxpJ+8d4ClCTN4QSVqJKh0UKvyvbJzLT6ZCFC4vCn+A5oXEbFygDIfOqQCp9OMBBWTTHxFsIIgG8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB9727.eurprd08.prod.outlook.com (2603:10a6:10:445::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 08:34:53 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%6]) with mapi id 15.20.7316.035; Thu, 29 Feb 2024 08:34:53 +0000 From: Javier Carrasco Date: Thu, 29 Feb 2024 09:34:44 +0100 Subject: [PATCH v6 1/9] usb: misc: onboard_hub: use pointer consistently in the probe function Message-Id: <20240229-onboard_xvf3500-v6-1-a0aff2947040@wolfvision.net> References: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> In-Reply-To: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709195691; l=853; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=SFVrdbQBKp6w6iOi3+cJln+dSXaq8fghc4J0yWNMHNw=; b=xGSVI4zRSKyb+ceH8aCwoSZAZaOEt7JmR6WYz4swE1/h1zNBi2AhuPBawrl/kg95eNJAkGERS 0yK3obd4WnDAjEU680G3EdZqu7XkB6NVxVZiu1Qt1ckn1gfylO04hZH X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR3P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB9727:EE_ X-MS-Office365-Filtering-Correlation-Id: 069d09f9-4aef-440e-8ab4-08dc39014d73 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OA5kImIKOl7+LZWEPE2IMBItBOiV1bY7jLa5uRB9P8JfOT8PItETRNh9JQ7a/aAAzcCVPe95XIVQH6RzDmQ4iARZn2gc10bkNTfGnmZXvKhcZi7HGh3GgbSZ0V7ci0F4M1D0gas3CABJnvoG7d1ZQQ5eX4XSLHxIHeGUqgxCaRyThVc2Vy1QF1jJPPElWi3NvpJN9FEbQanHx0hgW3NS+BO7ZA9rh1TluA0PSKficXnZU0aOy4vI2c2bi3/FhnCEZ2wFC32B7j1mEY68zhPVkeyTo7G5bYH0efpfQRXxTjB2IUXXeu/8hyTEkUPKT86GyVw22Czeot+ClTBP0KLUvf9eAgHKkvHNhyCPf9KJZCXvd89044pVisjTwfegwNbmOoUWMSP8h4D264It5dTiV8pbSoVnamUut4B3k/C3UU2aUdVs1yrUJsm+GPc8XFlwMXKtLzCNb832/PBvHlTxQmxL3nB3fX3MHWeXZ2VpX4uMwWANIdzTDBQNXJ4sXlC7L6YX38rjFUhIHXruDvVYbcTEQszn39+QuKMEgc672H5ip3wHBeAjoMgicvKn3SxrPTt+bYqp56Qgta3CvKT3K993DtnrkXfao9ze3nDENw52gj2+yl9mi95ulecMlBbFSuYFQzas9yhB2Jjoa57aST4jx2be9GCtn/ab0wfVcPiW4n4EIIgtcMHEng26iwK0Z0J6U02CzcxmhN4S6ofV7hB7ritjxURl9J+NaTYQInU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4974.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?qbCXjXO4TqCmZxzIBiMdaRr7iUBR?= =?utf-8?q?JvcY+q/knpOz+jYbS1/USJCNCY7GcTj7ONFzm5UPiti58YMTKA8VREzw2FgMJ5Lgc?= =?utf-8?q?yUXCfZJZIwXyO+e63myxpAfTeJfNptxBu0RxXi7Lcsr4acvCmLFccijAvr0/ruDVh?= =?utf-8?q?9EKbqmU82HpSdjfleyZxiblqDgrPg6/nRssf1Aj0Ca/VtqPTA80qdmpk8ActWDAj7?= =?utf-8?q?2btroiwERVxhsVqOoSRy1UEW6jGIvVgg86V8ryV6IQt+KTWUxqnzck6J4337Vbuvo?= =?utf-8?q?2uQpSSjicVAHPuadH3Z6FF3/FpKRElOsCwX1ysNrOIG2pmhJTMA+MBrII4oOFRKtp?= =?utf-8?q?l+IM+eBPdqOeE40CSx/CXIHNy1yNYGgnfjIk4/VZ4SfYHql2YFvDla6IMmV4883Y2?= =?utf-8?q?yFkkZOa7QoihSkKFqGA87isAF6x3K5ziBox3QWbIRvmeNdY5DXfxcAmM63BdioOEx?= =?utf-8?q?R19/VTkyYP6BFfDfUbzqlYsAAVRMWe4876AbffbP25gWVi1EVeXS61Z/HSqen4Zt1?= =?utf-8?q?wiv2knmzPVSd9Dus/zgr2cE8fVN50SmZe2q/bZvFCfMBjRYoA1HvI+wVU4uxkMEjc?= =?utf-8?q?LFaAA66f7GgkL39DHVwJmFW9NeJLZxEsxs5TgR/LxzK8x/d5qOKhL1DecereKHNNn?= =?utf-8?q?xgSNGEunoXnAiV4l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R1I+ukugTtiVZAzmLvJ5qDrxEpOl4lXQvo=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 069d09f9-4aef-440e-8ab4-08dc39014d73 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:34:53.8064 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bpBikqnE4IqF5pJSSCe8q0Mvj7KpBw8Cg0dMAkL8WP6dy8RIrdcAwvu64vLC2ICp5HftCaoqlOFufxbD+4HFzoncCr20s27u7ImarDNFNj8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9727 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Commit 14485de431b0 ("usb: Use device_get_match_data()") overlooked the already existing pointer to pdev->dev 'dev'. Use the existing pointer 'dev' in device_get_match_data() to keep code consistency. Signed-off-by: Javier Carrasco Acked-by: Matthias Kaehlcke --- drivers/usb/misc/onboard_usb_hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index 0dd2b032c90b..81c001fd38c1 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -260,7 +260,7 @@ static int onboard_hub_probe(struct platform_device *pdev) if (!hub) return -ENOMEM; - hub->pdata = device_get_match_data(&pdev->dev); + hub->pdata = device_get_match_data(dev); if (!hub->pdata) return -EINVAL; From patchwork Thu Feb 29 08:34:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13576837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5161C48BF6 for ; Thu, 29 Feb 2024 08:35:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F6EA10E1F4; Thu, 29 Feb 2024 08:35:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=wolfvision.net header.i=@wolfvision.net header.b="eYunF7HP"; dkim-atps=neutral Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2122.outbound.protection.outlook.com [40.107.22.122]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9373A10E1F4 for ; Thu, 29 Feb 2024 08:35:00 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gCJHlCxbdZ4fua7R7wySD9hFmt2rSLuAHCywF9MPkFjdcapvsdT8yZeP1HMZIySN+ETZeYz/X7LM/zio/ik0wjhVBqZ3N90ggB2i2+npwvqLImoiZ5xhV4G+AgNJceQ/fxxhMvNVS3S+c8hwfPht6FwXpJEzAhB481T4Nhb8N998FS7nIZGi4/a1GzgAO5idgbX87B0VvWGnk4szQcN8Mj9K1T9unoqThB2KBTb4p2LcARv1Q/YKNpqPvHWZZEeE83eIrwcTIQRCUBcvRig48yHzVC/qP90U7oBawtA3TTkC/h688UzoiLb6Mo+pJLAScxy6qVa6pu9nXPLaAHgDUw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WgoMgCPBKwzfWbeF8lgH5NAIRhQpmLQTYXnUHWavB58=; b=CeLCYThLJO0w5Z0keYJWKpD4UG0hre+YsTfe92HAgJcyaX3bW4gnWu8o2kksU7aZGW6NsVPAhOdt4L3CBFrmWPxDPU6oY7N3pousfGi0m/6s7YJ4giCTqzm1zqQghjsh3KvaRIc/tJruN9sQlL37R7QIsXMGnIAKrru+QylOeNYvSu/hrofrimQAyldI6dGldTplfJdfUSH+/vL7xR+2quLCK6ZmojQBZM6AP5JyjE7qpLB7thnf5Z/yAyW4rzbia/pzxqkJvHDukDdb7WczyXgNlOZN3E+Eps8Cg67qpVBB6flD6wxh8BU6rq7PAmbd3BtSrMgQG1EDGQM/Ps+Zxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WgoMgCPBKwzfWbeF8lgH5NAIRhQpmLQTYXnUHWavB58=; b=eYunF7HPZN04HKRxnpNCkk/tW4zv1RbamVP8OaNbVpM1Aqe+V7E7YWFM5V/Rr0HhlxYxrbmsFlZS1EKs5+pcvEM7WHBKb1vA2MdAkG0HjLm1w7G7BvM6jKYYc7CRTvMaXeE/tck9EuDBbYO4irzZdJX/KeTNQX+cvBFAPTpb/0w= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB9727.eurprd08.prod.outlook.com (2603:10a6:10:445::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 08:34:55 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%6]) with mapi id 15.20.7316.035; Thu, 29 Feb 2024 08:34:55 +0000 From: Javier Carrasco Date: Thu, 29 Feb 2024 09:34:45 +0100 Subject: [PATCH v6 2/9] usb: misc: onboard_hub: use device supply names Message-Id: <20240229-onboard_xvf3500-v6-2-a0aff2947040@wolfvision.net> References: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> In-Reply-To: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709195691; l=5198; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=1jRF6eUBRouA1Hvx0Z6eIEmXQvVE/AoBOk4doyc8rhY=; b=0EeVN4pBM1GJ9v8jgWBoPsqcxuLrDqh5pThK7jfBO1qPZgPT6o5U2gcNEtaO/KRuYYvlOI2pj t6kFYQ8+QDPADIDB21Zb/fIbl31J6cRxdVmogSOG35Y2J0//l1HPH1L X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR3P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB9727:EE_ X-MS-Office365-Filtering-Correlation-Id: d4cf20a4-a127-4692-a1de-08dc39014e2e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2EOLCjIUHaLs8zMcT6XTh7ECtoFv0EY8cD5oOdEHK1qkUasVWy3KQliyLKlTu/Jqgs//8RRb7KUiaEkjQ04erG4cR5iiMQqMRf4BJh/yMDUht6W9v9BJofVSjAGo/ngNUsmPyIa2m2W/rLwBl0AKr4pZqX6Ry9QFtjNHlWBE4S7m/s8SUPRhDiTU1938B/tdBwIkgqYbQOIstruZUpnLxraWxYVted5RJM3yPHmGAiMSuadNUXkstWqMZPX/JVyFXYTe+8XiauvuxasyC6S8347k5Cr67Etsg7PmtDqzfhKp2J2qU5VskiIDrWr+clsiGiKvVPLsONk39rGmEtTY61RQivph8ojNcqg2S/mgkK/+5/KZGiP9fkL208GD4O8mA7zvfjKHCyv3BrcY2neQ+f51Lh0fv+2OiKw9M4HaaM9LawZKOpDurpcZNVTc7Aerm7as1t30MwkvuEcDxRwktb2VNtRP6J/QFlZhZoObb3JRSgq8TozhB9FymbAV2QXTM0NovwfznAVG5fS62rvTHs08dhzFGVHmW43zcRACAu21waRl4BAc5ilF34H/e6pRVwRU/Vh6+7xJR/pUjuFzDaR5lGdMbxw6sbtpgRJFfiHoycK4AyWCNOgR7AUt4fsz2CZShWspm8ju8apO0sX2oA2jFaPmlMwPPIlgRreR1Foo5vY6GFmi1jxnEfyvcP67j0WvnF/49Mja1k3Hy2FgqHIF+fWRE3v344HaFxTaPEI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4974.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MU8BiyLVxTVaaxUFEqeEz0g/WEpM?= =?utf-8?q?JZgUZQcSAH1+uGzqxey5W8BLh1Ol+bRUz2Ag9U+0xpBa6BxMpf5Z0iJyIzmN/PbPv?= =?utf-8?q?UsjQPAMyaRG4YQN/LdaKtc8F25yNgKceKUthpHokEMJR1h70eqlpHgix9Pl9fI+I/?= =?utf-8?q?53DnYY5XnERvCH2ThYFd2v8tHMnN0q907a/X2N6llGxrF3TLm355ArRj6xusQna3C?= =?utf-8?q?uClByBYnU9L43XC7OB7OLTZPBNuPoKfI7s2vAHv+JKgzKvPScK0acheSnRpYFmV1A?= =?utf-8?q?1+biYMe0M1WQSzwdFn/8dQLwhN2Mk4ko9q2qlga7xZBhMwpk8Z5HnvttkCB56sN7L?= =?utf-8?q?3izZXkjSht3tqFrh6Ed91UdzMJDd+NnTp+p/atWbu5TSjf8qszM/sAxYNyeS+LPvQ?= =?utf-8?q?ghmukVQoSiYQerDiLrIUG/ccLtOdKzsFGvv/ktQKyrsnDuWGiahxboOf6MtuYXNHV?= =?utf-8?q?XHQKjs73Ze9CNHSto65TquZPgd7DN8gf7+ppK8e+7J82oninS4NtXle9y9WO+DiO1?= =?utf-8?q?kwi63TjJUzgKcYD25YnPn0uT0UdnbzNwTJSfga1KnuMOmZJTtJPvvhTwSav6bcRF6?= =?utf-8?q?WOvQYVWdHcdTDdHgp3C9xTewyVuhH9gN+buStUq5JRpAxTX0f2KefaBQ65UOcJY2z?= =?utf-8?q?Z44NCZ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?q?/BtcmEuAUaMFD+DO8HzMluWV8Bdkicazo1XtquE24MqVjvn9siQYhws=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: d4cf20a4-a127-4692-a1de-08dc39014e2e X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:34:55.0314 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KrMMn+2Y/1LpU+InzY4tHzBv5fHPf8E9eNdy8KRdtdR3ARNQMsLnTHSB/th9XW5xuJKwoTLkB4w4N2fLh6aAPnaL4Ukj3F7qI4xuwExPSEs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9727 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The current implementation uses generic names for the power supplies, which conflicts with proper name definitions in the device bindings. Add a per-device property to include real supply names and keep generic names for existing devices to keep backward compatibility. Signed-off-by: Javier Carrasco Acked-by: Matthias Kaehlcke --- drivers/usb/misc/onboard_usb_hub.c | 49 ++++++++++++++++++++------------------ drivers/usb/misc/onboard_usb_hub.h | 12 ++++++++++ 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index 81c001fd38c1..1f3e0094957d 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -29,17 +29,6 @@ #include "onboard_usb_hub.h" -/* - * Use generic names, as the actual names might differ between hubs. If a new - * hub requires more than the currently supported supplies, add a new one here. - */ -static const char * const supply_names[] = { - "vdd", - "vdd2", -}; - -#define MAX_SUPPLIES ARRAY_SIZE(supply_names) - static void onboard_hub_attach_usb_driver(struct work_struct *work); static struct usb_device_driver onboard_hub_usbdev_driver; @@ -65,6 +54,29 @@ struct onboard_hub { struct clk *clk; }; +static int onboard_hub_get_regulators(struct onboard_hub *hub) +{ + const char * const *supply_names = hub->pdata->supply_names; + unsigned int num_supplies = hub->pdata->num_supplies; + struct device *dev = hub->dev; + unsigned int i; + int err; + + if (num_supplies > MAX_SUPPLIES) + return dev_err_probe(dev, -EINVAL, "max %d supplies supported!\n", + MAX_SUPPLIES); + + for (i = 0; i < num_supplies; i++) + hub->supplies[i].supply = supply_names[i]; + + err = devm_regulator_bulk_get(dev, num_supplies, hub->supplies); + if (err) + dev_err(dev, "Failed to get regulator supplies: %pe\n", + ERR_PTR(err)); + + return err; +} + static int onboard_hub_power_on(struct onboard_hub *hub) { int err; @@ -253,7 +265,6 @@ static int onboard_hub_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct onboard_hub *hub; - unsigned int i; int err; hub = devm_kzalloc(dev, sizeof(*hub), GFP_KERNEL); @@ -264,18 +275,11 @@ static int onboard_hub_probe(struct platform_device *pdev) if (!hub->pdata) return -EINVAL; - if (hub->pdata->num_supplies > MAX_SUPPLIES) - return dev_err_probe(dev, -EINVAL, "max %zu supplies supported!\n", - MAX_SUPPLIES); - - for (i = 0; i < hub->pdata->num_supplies; i++) - hub->supplies[i].supply = supply_names[i]; + hub->dev = dev; - err = devm_regulator_bulk_get(dev, hub->pdata->num_supplies, hub->supplies); - if (err) { - dev_err(dev, "Failed to get regulator supplies: %pe\n", ERR_PTR(err)); + err = onboard_hub_get_regulators(hub); + if (err) return err; - } hub->clk = devm_clk_get_optional(dev, NULL); if (IS_ERR(hub->clk)) @@ -286,7 +290,6 @@ static int onboard_hub_probe(struct platform_device *pdev) if (IS_ERR(hub->reset_gpio)) return dev_err_probe(dev, PTR_ERR(hub->reset_gpio), "failed to get reset GPIO\n"); - hub->dev = dev; mutex_init(&hub->lock); INIT_LIST_HEAD(&hub->udev_list); diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h index f360d5cf8d8a..0ee515e7feae 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_hub.h @@ -6,54 +6,66 @@ #ifndef _USB_MISC_ONBOARD_USB_HUB_H #define _USB_MISC_ONBOARD_USB_HUB_H +#define MAX_SUPPLIES 2 + struct onboard_hub_pdata { unsigned long reset_us; /* reset pulse width in us */ unsigned int num_supplies; /* number of supplies */ + const char * const supply_names[MAX_SUPPLIES]; }; static const struct onboard_hub_pdata microchip_usb424_data = { .reset_us = 1, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata microchip_usb5744_data = { .reset_us = 0, .num_supplies = 2, + .supply_names = { "vdd", "vdd2" }, }; static const struct onboard_hub_pdata realtek_rts5411_data = { .reset_us = 0, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata cypress_hx3_data = { .reset_us = 10000, .num_supplies = 2, + .supply_names = { "vdd", "vdd2" }, }; static const struct onboard_hub_pdata cypress_hx2vl_data = { .reset_us = 1, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata genesys_gl850g_data = { .reset_us = 3, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata genesys_gl852g_data = { .reset_us = 50, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata vialab_vl817_data = { .reset_us = 10, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct of_device_id onboard_hub_match[] = { From patchwork Thu Feb 29 08:34:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13576842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2328DC54798 for ; Thu, 29 Feb 2024 08:35:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AAE4710E2C8; Thu, 29 Feb 2024 08:35:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=wolfvision.net header.i=@wolfvision.net header.b="yWXQ9Y7s"; dkim-atps=neutral Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2122.outbound.protection.outlook.com [40.107.22.122]) by gabe.freedesktop.org (Postfix) with ESMTPS id F41A710E116 for ; Thu, 29 Feb 2024 08:35:00 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZTBvYxroyYfBKdxEYGh7YYEB92xcowVJyrWT+11bpPlpXWPjdQd9miWYEK9/H3ooHpq7bTYFBe63elJCbnFSlM7WUoZeSoLWF2tsjad8RVAg2wsPwIfpLkzeDcToBgSJvw+07wjokAsAkeUbTOE3Cyyh7wptBpe0MzyV7AedLIoXGSnQj3HPxMcDEIUa4xsXQu4Q5jMGtHETfLEhs1gevJ59+YJNksQPRlO2yKUZGgdlrmhNjlCAf5MxvDi5nFvD4+3oMI4RTzbbWXWgTxkjMVvXVkgbUAOihfqsIPxJlPfcq3QfY+8m0F9N0aIAAgqhidb5JMmKaKTpDrbD1+OOfQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3ay3mmLXJgBhRBuGtt1WPmNmd2SNmJPXBuV5xqyqHP4=; b=fSE7+E98MUw4PxFowrqP2SFGvJOPvQ8Gc/R5irF5XBm68fKHS+Rg/YSm3Gl0aoG14L2V+GiAoEWTVcqo5vOvbW4Ah413i7IoXkKGgLPsX+Ykq+SS44QGUPnZczug9YH8XjjG+d8QeEaxOL0OnE9F+ALxM5sqmhiSpw2xNMGSIDQPbMvZaPMeG5En512qLMGxihlR76TjdfH5PPMTHofY5yFQOxho0yBzUZtBDhq4AK9uvBGvMq8xU75MJxdSCTH8T1P/5DILy9FW3eLB+lHR6akAqsUox4AWtplZAMF2jeA7sgL5RaNAUWpjpP6WC+Tceq3MiGa0AONs5bR+93iyZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3ay3mmLXJgBhRBuGtt1WPmNmd2SNmJPXBuV5xqyqHP4=; b=yWXQ9Y7s73b9/eUiYP74gsmoL2sA2maaCAMLPiFpRsTKMc/si2JCo3E7q97Qwmk89AcVJsqUuY+N2Pwhf+9CCaLo36QfAfXeDiD3f2tngaP8dQN1T0tljl4Cr7lJ5zbw854ZnRkxPVsp/EuG60vHVAaD6kMTF/2qeBcAzRzX9oQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB9727.eurprd08.prod.outlook.com (2603:10a6:10:445::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 08:34:56 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%6]) with mapi id 15.20.7316.035; Thu, 29 Feb 2024 08:34:56 +0000 From: Javier Carrasco Date: Thu, 29 Feb 2024 09:34:46 +0100 Subject: [PATCH v6 3/9] usb: misc: onboard_hub: rename to onboard_dev Message-Id: <20240229-onboard_xvf3500-v6-3-a0aff2947040@wolfvision.net> References: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> In-Reply-To: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709195691; l=45905; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=RUZJTYZy5FLqX+MGutE7c5f3WnjwVd8xRE8snL4oBps=; b=CmSHtrMtMpGmSm91dACR9Ob0RfJLxwfbN3hwdUmdJR102ZWMUHJHYmTrUOzUKUdFrGgMN4Ouo TJF7dQzgXXFAicIC1T5/rGCn2oAT0Zp0+DyVEiGvqsqIEmwX2toAEkA X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR3P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB9727:EE_ X-MS-Office365-Filtering-Correlation-Id: a2d6b3e7-85c2-4e36-b2e6-08dc39014eeb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a/hhly+FvXGHnDc88DY4wQDPYfD3wSjduFEP792P3+bMOAhL+WWSXw8e6tWkUuQwZKKmcgh23/lpY3xobyZrnJL5u+mhsJvu/Ew+h/TJ6mTkqr5RullrZyRTlMoYsKUt34t/ekxR+8HwRmYpyBo/fI7osgB2f6aAg9aZbZJPDxATjeBMLB1hzXUPNmO2PVdQr87wB0yFEaZF7bF/5HLfngc09/NNzpBI+4w51hnnaytWXyBAMrt4dWS/NO0L7OSmwJs7jFbsCz/cC+8xvMbEdkUb/UPlCQWwU/Hj2t6ofOgqp3uKJMVlJB+ThjIT9KXImm/0Nc05JTEvoxkeHKDNXsQnLqqpmziWGc0zPV4lpi0d6EaRu8gmwW+oZJYhemATSbHBIh4g8O1QKIgILKA+19VnlCxR9obGjsx6qwTlAwRTLsyHTzyj/pagX7MjPkN9TmEc5yL++k2NBIhNx0r9/dwVwgGdC31eWO+CM27Mh4+ilwnZq9x5lfAhdZWSPPlqdGumP4ni92a4hc0jPtLO27f8rOeH0hqiZfuffhr5v/zqn8C7Fj9kHGrSPcwwWpcbA4B2lrzW289Mup/RZ3WZUOYmxV6O1v5YIHmHVkDMupf2mZAB6mykyJ1z7MCtzrXojzQAoaZ7MYub87RJqE/zyIPxJEwHZsy2x7B+h6+iAq2kr0KQUiYZv8pw4L6O53L1tkg+5pPPYX2ITTNjV57I+UsiNxaHRTR7wZ42ZZbC7Ok= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4974.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?JFVdX5MqmxcxUcnwdoM0T+W3tat2?= =?utf-8?q?mhauEXkcNANlIxbubBL0HSVvCrA84h2JbzrHDUOgLxtKD9G42n+509JzRhsVY2jMK?= =?utf-8?q?2+Wfp8ihWVno+4z+IwRKDHERB+PIl4zwakb2evV36dQ9MgwjoCGqlUYr65DGzDWQG?= =?utf-8?q?X9jMPpEsH2ZyW5kCK8aV/QxpHaznY04ilv44wOYCDUU0BRPB7s7ByIsIM+VRBavfS?= =?utf-8?q?uEMXRv4nXn7OPdlHBVuIQmNmOCQH8HvqQnaqczdtiloa4acPC0IG2SjokP/nNc8YK?= =?utf-8?q?56cwCaCVfLAaZM77KbqIQ46z+Ntkf1tjlldISaPWyq7obXx7x/I6C1bW3GSqY+iGo?= =?utf-8?q?F0oCu7RihQjkO557SamZqdlUtiIaFoDYyVQuZYtuD3GMKfHGHi5QIvUlER/PEBKmL?= =?utf-8?q?FiH0PL7MvJcLR7pU9/Il5r81Y80F6LNF3hAzNVDOoM8xOiyMyeD/FJXBDVAqnf7+y?= =?utf-8?q?VeYQhJsEaCQwYf2AazBiOKS3X5fUGcLqsS+itIQRcTNfDew2xMH+yNK41XzTjgPjR?= =?utf-8?q?Dsh5hnuu+eJnpVbaz4goAV1kSyfs791bUpSWHYRa/EiJBn60J2syyc7fbNiPev//j?= =?utf-8?q?RRGg9co2fMkyJ6PMdN5hgDqvMkFiBludXKGcn4V8uUxyq77nDjQNhRdde++Plq5Hg?= =?utf-8?q?i/QxegdWaghbJiSWh1R00EHIurGys1ISEZ09Rg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dFi/9Af0QUzkWsRHdlRMYS2y2M=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: a2d6b3e7-85c2-4e36-b2e6-08dc39014eeb X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:34:56.2906 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lmR+GFmTflJ5qZxHMUFgyqubatas8jIb6NR3ZJ3dF4gaGJfnwsNg5E7N4wak/HLFtFERJ54fgGz/RlDcARW9IsKT3o0r8FniRQekJ1aHqsk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9727 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch prepares onboad_hub to support non-hub devices by renaming the driver files and their content, the headers and their references. The comments and descriptions have been slightly modified to keep coherence and account for the specific cases that only affect onboard hubs (e.g. peer-hub). The "hub" variables in functions where "dev" (and similar names) variables already exist have been renamed to onboard_dev for clarity, which adds a few lines in cases where more than 80 characters are used. No new functionality has been added. Signed-off-by: Javier Carrasco Acked-by: Matthias Kaehlcke --- ...-usb-hub => sysfs-bus-platform-onboard-usb-dev} | 3 +- MAINTAINERS | 4 +- drivers/usb/core/Makefile | 4 +- drivers/usb/core/hub.c | 8 +- drivers/usb/core/hub.h | 2 +- drivers/usb/misc/Kconfig | 16 +- drivers/usb/misc/Makefile | 2 +- drivers/usb/misc/onboard_usb_dev.c | 519 +++++++++++++++++++++ .../misc/{onboard_usb_hub.h => onboard_usb_dev.h} | 28 +- ...ard_usb_hub_pdevs.c => onboard_usb_dev_pdevs.c} | 47 +- drivers/usb/misc/onboard_usb_hub.c | 504 -------------------- include/linux/usb/onboard_dev.h | 18 + include/linux/usb/onboard_hub.h | 18 - 13 files changed, 595 insertions(+), 578 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub b/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev similarity index 74% rename from Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub rename to Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev index 42deb0552065..b06a48c3c85a 100644 --- a/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub +++ b/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev @@ -5,4 +5,5 @@ Contact: Matthias Kaehlcke linux-usb@vger.kernel.org Description: (RW) Controls whether the USB hub remains always powered - during system suspend or not. \ No newline at end of file + during system suspend or not. This attribute is not + available for non-hub devices. diff --git a/MAINTAINERS b/MAINTAINERS index 8999497011a2..7ad556ecca40 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16297,8 +16297,8 @@ ONBOARD USB HUB DRIVER M: Matthias Kaehlcke L: linux-usb@vger.kernel.org S: Maintained -F: Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub -F: drivers/usb/misc/onboard_usb_hub.c +F: Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev +F: drivers/usb/misc/onboard_usb_dev.c ONENAND FLASH DRIVER M: Kyungmin Park diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile index 7d338e9c0657..ac006abd13b3 100644 --- a/drivers/usb/core/Makefile +++ b/drivers/usb/core/Makefile @@ -12,8 +12,8 @@ usbcore-$(CONFIG_OF) += of.o usbcore-$(CONFIG_USB_PCI) += hcd-pci.o usbcore-$(CONFIG_ACPI) += usb-acpi.o -ifdef CONFIG_USB_ONBOARD_HUB -usbcore-y += ../misc/onboard_usb_hub_pdevs.o +ifdef CONFIG_USB_ONBOARD_DEV +usbcore-y += ../misc/onboard_usb_dev_pdevs.o endif obj-$(CONFIG_USB) += usbcore.o diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index ffd7c99e24a3..f85b3e928a35 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -1776,7 +1776,7 @@ static void hub_disconnect(struct usb_interface *intf) if (hub->quirk_disable_autosuspend) usb_autopm_put_interface(intf); - onboard_hub_destroy_pdevs(&hub->onboard_hub_devs); + onboard_dev_destroy_pdevs(&hub->onboard_devs); kref_put(&hub->kref, hub_release); } @@ -1895,7 +1895,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) INIT_DELAYED_WORK(&hub->leds, led_work); INIT_DELAYED_WORK(&hub->init_work, NULL); INIT_WORK(&hub->events, hub_event); - INIT_LIST_HEAD(&hub->onboard_hub_devs); + INIT_LIST_HEAD(&hub->onboard_devs); spin_lock_init(&hub->irq_urb_lock); timer_setup(&hub->irq_urb_retry, hub_retry_irq_urb, 0); usb_get_intf(intf); @@ -1925,7 +1925,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) } if (hub_configure(hub, &desc->endpoint[0].desc) >= 0) { - onboard_hub_create_pdevs(hdev, &hub->onboard_hub_devs); + onboard_dev_create_pdevs(hdev, &hub->onboard_devs); return 0; } diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h index 43ce21c96a51..3820703b11d8 100644 --- a/drivers/usb/core/hub.h +++ b/drivers/usb/core/hub.h @@ -74,7 +74,7 @@ struct usb_hub { spinlock_t irq_urb_lock; struct timer_list irq_urb_retry; struct usb_port **ports; - struct list_head onboard_hub_devs; + struct list_head onboard_devs; }; /** diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index c510af7baa0d..50b86d531701 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -316,18 +316,18 @@ config BRCM_USB_PINMAP signals, which are typically on dedicated pins on the chip, to any gpio. -config USB_ONBOARD_HUB - tristate "Onboard USB hub support" +config USB_ONBOARD_DEV + tristate "Onboard USB device support" depends on OF help - Say Y here if you want to support discrete onboard USB hubs that - don't require an additional control bus for initialization, but - need some non-trivial form of initialization, such as enabling a - power regulator. An example for such a hub is the Realtek - RTS5411. + Say Y here if you want to support discrete onboard USB devices + that don't require an additional control bus for initialization, + but need some non-trivial form of initialization, such as + enabling a power regulator. An example for such device is the + Realtek RTS5411 hub. This driver can be used as a module but its state (module vs builtin) must match the state of the USB subsystem. Enabling this config will enable the driver and it will automatically match the state of the USB subsystem. If this driver is a - module it will be called onboard_usb_hub. + module it will be called onboard_usb_dev. diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile index 0bc732bcb162..0cd5bc8f52fe 100644 --- a/drivers/usb/misc/Makefile +++ b/drivers/usb/misc/Makefile @@ -33,4 +33,4 @@ obj-$(CONFIG_USB_CHAOSKEY) += chaoskey.o obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/ obj-$(CONFIG_USB_LINK_LAYER_TEST) += lvstest.o obj-$(CONFIG_BRCM_USB_PINMAP) += brcmstb-usb-pinmap.o -obj-$(CONFIG_USB_ONBOARD_HUB) += onboard_usb_hub.o +obj-$(CONFIG_USB_ONBOARD_DEV) += onboard_usb_dev.o diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c new file mode 100644 index 000000000000..4ae580445408 --- /dev/null +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -0,0 +1,519 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Driver for onboard USB devices + * + * Copyright (c) 2022, Google LLC + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "onboard_usb_dev.h" + +static void onboard_dev_attach_usb_driver(struct work_struct *work); + +static struct usb_device_driver onboard_dev_usbdev_driver; +static DECLARE_WORK(attach_usb_driver_work, onboard_dev_attach_usb_driver); + +/************************** Platform driver **************************/ + +struct usbdev_node { + struct usb_device *udev; + struct list_head list; +}; + +struct onboard_dev { + struct regulator_bulk_data supplies[MAX_SUPPLIES]; + struct device *dev; + const struct onboard_dev_pdata *pdata; + struct gpio_desc *reset_gpio; + bool always_powered_in_suspend; + bool is_powered_on; + bool going_away; + struct list_head udev_list; + struct mutex lock; + struct clk *clk; +}; + +static int onboard_dev_get_regulators(struct onboard_dev *onboard_dev) +{ + const char * const *supply_names = onboard_dev->pdata->supply_names; + unsigned int num_supplies = onboard_dev->pdata->num_supplies; + struct device *dev = onboard_dev->dev; + unsigned int i; + int err; + + if (num_supplies > MAX_SUPPLIES) + return dev_err_probe(dev, -EINVAL, "max %d supplies supported!\n", + MAX_SUPPLIES); + + for (i = 0; i < num_supplies; i++) + onboard_dev->supplies[i].supply = supply_names[i]; + + err = devm_regulator_bulk_get(dev, num_supplies, onboard_dev->supplies); + if (err) + dev_err(dev, "Failed to get regulator supplies: %pe\n", + ERR_PTR(err)); + + return err; +} + +static int onboard_dev_power_on(struct onboard_dev *onboard_dev) +{ + int err; + + err = clk_prepare_enable(onboard_dev->clk); + if (err) { + dev_err(onboard_dev->dev, "failed to enable clock: %pe\n", + ERR_PTR(err)); + return err; + } + + err = regulator_bulk_enable(onboard_dev->pdata->num_supplies, + onboard_dev->supplies); + if (err) { + dev_err(onboard_dev->dev, "failed to enable supplies: %pe\n", + ERR_PTR(err)); + return err; + } + + fsleep(onboard_dev->pdata->reset_us); + gpiod_set_value_cansleep(onboard_dev->reset_gpio, 0); + + onboard_dev->is_powered_on = true; + + return 0; +} + +static int onboard_dev_power_off(struct onboard_dev *onboard_dev) +{ + int err; + + gpiod_set_value_cansleep(onboard_dev->reset_gpio, 1); + + err = regulator_bulk_disable(onboard_dev->pdata->num_supplies, + onboard_dev->supplies); + if (err) { + dev_err(onboard_dev->dev, "failed to disable supplies: %pe\n", + ERR_PTR(err)); + return err; + } + + clk_disable_unprepare(onboard_dev->clk); + + onboard_dev->is_powered_on = false; + + return 0; +} + +static int __maybe_unused onboard_dev_suspend(struct device *dev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + struct usbdev_node *node; + bool power_off = true; + + if (onboard_dev->always_powered_in_suspend) + return 0; + + mutex_lock(&onboard_dev->lock); + + list_for_each_entry(node, &onboard_dev->udev_list, list) { + if (!device_may_wakeup(node->udev->bus->controller)) + continue; + + if (usb_wakeup_enabled_descendants(node->udev)) { + power_off = false; + break; + } + } + + mutex_unlock(&onboard_dev->lock); + + if (!power_off) + return 0; + + return onboard_dev_power_off(onboard_dev); +} + +static int __maybe_unused onboard_dev_resume(struct device *dev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + + if (onboard_dev->is_powered_on) + return 0; + + return onboard_dev_power_on(onboard_dev); +} + +static inline void get_udev_link_name(const struct usb_device *udev, char *buf, + size_t size) +{ + snprintf(buf, size, "usb_dev.%s", dev_name(&udev->dev)); +} + +static int onboard_dev_add_usbdev(struct onboard_dev *onboard_dev, + struct usb_device *udev) +{ + struct usbdev_node *node; + char link_name[64]; + int err; + + mutex_lock(&onboard_dev->lock); + + if (onboard_dev->going_away) { + err = -EINVAL; + goto error; + } + + node = kzalloc(sizeof(*node), GFP_KERNEL); + if (!node) { + err = -ENOMEM; + goto error; + } + + node->udev = udev; + + list_add(&node->list, &onboard_dev->udev_list); + + mutex_unlock(&onboard_dev->lock); + + get_udev_link_name(udev, link_name, sizeof(link_name)); + WARN_ON(sysfs_create_link(&onboard_dev->dev->kobj, &udev->dev.kobj, + link_name)); + + return 0; + +error: + mutex_unlock(&onboard_dev->lock); + + return err; +} + +static void onboard_dev_remove_usbdev(struct onboard_dev *onboard_dev, + const struct usb_device *udev) +{ + struct usbdev_node *node; + char link_name[64]; + + get_udev_link_name(udev, link_name, sizeof(link_name)); + sysfs_remove_link(&onboard_dev->dev->kobj, link_name); + + mutex_lock(&onboard_dev->lock); + + list_for_each_entry(node, &onboard_dev->udev_list, list) { + if (node->udev == udev) { + list_del(&node->list); + kfree(node); + break; + } + } + + mutex_unlock(&onboard_dev->lock); +} + +static ssize_t always_powered_in_suspend_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + const struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", onboard_dev->always_powered_in_suspend); +} + +static ssize_t always_powered_in_suspend_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + bool val; + int ret; + + ret = kstrtobool(buf, &val); + if (ret < 0) + return ret; + + onboard_dev->always_powered_in_suspend = val; + + return count; +} +static DEVICE_ATTR_RW(always_powered_in_suspend); + +static struct attribute *onboard_dev_attrs[] = { + &dev_attr_always_powered_in_suspend.attr, + NULL, +}; +ATTRIBUTE_GROUPS(onboard_dev); + +static void onboard_dev_attach_usb_driver(struct work_struct *work) +{ + int err; + + err = driver_attach(&onboard_dev_usbdev_driver.driver); + if (err) + pr_err("Failed to attach USB driver: %pe\n", ERR_PTR(err)); +} + +static int onboard_dev_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct onboard_dev *onboard_dev; + int err; + + onboard_dev = devm_kzalloc(dev, sizeof(*onboard_dev), GFP_KERNEL); + if (!onboard_dev) + return -ENOMEM; + + onboard_dev->pdata = device_get_match_data(dev); + if (!onboard_dev->pdata) + return -EINVAL; + + onboard_dev->dev = dev; + + err = onboard_dev_get_regulators(onboard_dev); + if (err) + return err; + + onboard_dev->clk = devm_clk_get_optional(dev, NULL); + if (IS_ERR(onboard_dev->clk)) + return dev_err_probe(dev, PTR_ERR(onboard_dev->clk), + "failed to get clock\n"); + + onboard_dev->reset_gpio = devm_gpiod_get_optional(dev, "reset", + GPIOD_OUT_HIGH); + if (IS_ERR(onboard_dev->reset_gpio)) + return dev_err_probe(dev, PTR_ERR(onboard_dev->reset_gpio), + "failed to get reset GPIO\n"); + + mutex_init(&onboard_dev->lock); + INIT_LIST_HEAD(&onboard_dev->udev_list); + + dev_set_drvdata(dev, onboard_dev); + + err = onboard_dev_power_on(onboard_dev); + if (err) + return err; + + /* + * The USB driver might have been detached from the USB devices by + * onboard_dev_remove() (e.g. through an 'unbind' by userspace), + * make sure to re-attach it if needed. + * + * This needs to be done deferred to avoid self-deadlocks on systems + * with nested onboard hubs. + */ + schedule_work(&attach_usb_driver_work); + + return 0; +} + +static void onboard_dev_remove(struct platform_device *pdev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(&pdev->dev); + struct usbdev_node *node; + struct usb_device *udev; + + onboard_dev->going_away = true; + + mutex_lock(&onboard_dev->lock); + + /* unbind the USB devices to avoid dangling references to this device */ + while (!list_empty(&onboard_dev->udev_list)) { + node = list_first_entry(&onboard_dev->udev_list, + struct usbdev_node, list); + udev = node->udev; + + /* + * Unbinding the driver will call onboard_dev_remove_usbdev(), + * which acquires onboard_dev->lock. We must release the lock + * first. + */ + get_device(&udev->dev); + mutex_unlock(&onboard_dev->lock); + device_release_driver(&udev->dev); + put_device(&udev->dev); + mutex_lock(&onboard_dev->lock); + } + + mutex_unlock(&onboard_dev->lock); + + onboard_dev_power_off(onboard_dev); +} + +MODULE_DEVICE_TABLE(of, onboard_dev_match); + +static const struct dev_pm_ops __maybe_unused onboard_dev_pm_ops = { + SET_LATE_SYSTEM_SLEEP_PM_OPS(onboard_dev_suspend, onboard_dev_resume) +}; + +static struct platform_driver onboard_dev_driver = { + .probe = onboard_dev_probe, + .remove_new = onboard_dev_remove, + + .driver = { + .name = "onboard-usb-dev", + .of_match_table = onboard_dev_match, + .pm = pm_ptr(&onboard_dev_pm_ops), + .dev_groups = onboard_dev_groups, + }, +}; + +/************************** USB driver **************************/ + +#define VENDOR_ID_CYPRESS 0x04b4 +#define VENDOR_ID_GENESYS 0x05e3 +#define VENDOR_ID_MICROCHIP 0x0424 +#define VENDOR_ID_REALTEK 0x0bda +#define VENDOR_ID_TI 0x0451 +#define VENDOR_ID_VIA 0x2109 + +/* + * Returns the onboard_dev platform device that is associated with the USB + * device passed as parameter. + */ +static struct onboard_dev *_find_onboard_dev(struct device *dev) +{ + struct platform_device *pdev; + struct device_node *np; + struct onboard_dev *onboard_dev; + + pdev = of_find_device_by_node(dev->of_node); + if (!pdev) { + np = of_parse_phandle(dev->of_node, "peer-hub", 0); + if (!np) { + dev_err(dev, "failed to find device node for peer hub\n"); + return ERR_PTR(-EINVAL); + } + + pdev = of_find_device_by_node(np); + of_node_put(np); + + if (!pdev) + return ERR_PTR(-ENODEV); + } + + onboard_dev = dev_get_drvdata(&pdev->dev); + put_device(&pdev->dev); + + /* + * The presence of drvdata indicates that the platform driver finished + * probing. This handles the case where (conceivably) we could be + * running at the exact same time as the platform driver's probe. If + * we detect the race we request probe deferral and we'll come back and + * try again. + */ + if (!onboard_dev) + return ERR_PTR(-EPROBE_DEFER); + + return onboard_dev; +} + +static int onboard_dev_usbdev_probe(struct usb_device *udev) +{ + struct device *dev = &udev->dev; + struct onboard_dev *onboard_dev; + int err; + + /* ignore supported devices without device tree node */ + if (!dev->of_node) + return -ENODEV; + + onboard_dev = _find_onboard_dev(dev); + if (IS_ERR(onboard_dev)) + return PTR_ERR(onboard_dev); + + dev_set_drvdata(dev, onboard_dev); + + err = onboard_dev_add_usbdev(onboard_dev, udev); + if (err) + return err; + + return 0; +} + +static void onboard_dev_usbdev_disconnect(struct usb_device *udev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(&udev->dev); + + onboard_dev_remove_usbdev(onboard_dev, udev); +} + +static const struct usb_device_id onboard_dev_id_table[] = { + { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6504) }, /* CYUSB33{0,1,2}x/CYUSB230x 3.0 HUB */ + { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6506) }, /* CYUSB33{0,1,2}x/CYUSB230x 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6570) }, /* CY7C6563x 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0608) }, /* Genesys Logic GL850G USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0620) }, /* Genesys Logic GL3523 USB 3.1 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2412) }, /* USB2412 USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2517) }, /* USB2517 USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2744) }, /* USB5744 USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x5744) }, /* USB5744 USB 3.0 HUB */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 HUB */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 HUB */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 HUB */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x5414) }, /* RTS5414 USB 2.1 HUB */ + { USB_DEVICE(VENDOR_ID_TI, 0x8140) }, /* TI USB8041 3.0 HUB */ + { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 HUB */ + { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 HUB */ + {} +}; +MODULE_DEVICE_TABLE(usb, onboard_dev_id_table); + +static struct usb_device_driver onboard_dev_usbdev_driver = { + .name = "onboard-usb-dev", + .probe = onboard_dev_usbdev_probe, + .disconnect = onboard_dev_usbdev_disconnect, + .generic_subclass = 1, + .supports_autosuspend = 1, + .id_table = onboard_dev_id_table, +}; + +static int __init onboard_dev_init(void) +{ + int ret; + + ret = usb_register_device_driver(&onboard_dev_usbdev_driver, THIS_MODULE); + if (ret) + return ret; + + ret = platform_driver_register(&onboard_dev_driver); + if (ret) + usb_deregister_device_driver(&onboard_dev_usbdev_driver); + + return ret; +} +module_init(onboard_dev_init); + +static void __exit onboard_dev_exit(void) +{ + usb_deregister_device_driver(&onboard_dev_usbdev_driver); + platform_driver_unregister(&onboard_dev_driver); + + cancel_work_sync(&attach_usb_driver_work); +} +module_exit(onboard_dev_exit); + +MODULE_AUTHOR("Matthias Kaehlcke "); +MODULE_DESCRIPTION("Driver for discrete onboard USB devices"); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_dev.h similarity index 74% rename from drivers/usb/misc/onboard_usb_hub.h rename to drivers/usb/misc/onboard_usb_dev.h index 0ee515e7feae..4da9f3b7f9e9 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -3,72 +3,72 @@ * Copyright (c) 2022, Google LLC */ -#ifndef _USB_MISC_ONBOARD_USB_HUB_H -#define _USB_MISC_ONBOARD_USB_HUB_H +#ifndef _USB_MISC_ONBOARD_USB_DEV_H +#define _USB_MISC_ONBOARD_USB_DEV_H #define MAX_SUPPLIES 2 -struct onboard_hub_pdata { +struct onboard_dev_pdata { unsigned long reset_us; /* reset pulse width in us */ unsigned int num_supplies; /* number of supplies */ const char * const supply_names[MAX_SUPPLIES]; }; -static const struct onboard_hub_pdata microchip_usb424_data = { +static const struct onboard_dev_pdata microchip_usb424_data = { .reset_us = 1, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata microchip_usb5744_data = { +static const struct onboard_dev_pdata microchip_usb5744_data = { .reset_us = 0, .num_supplies = 2, .supply_names = { "vdd", "vdd2" }, }; -static const struct onboard_hub_pdata realtek_rts5411_data = { +static const struct onboard_dev_pdata realtek_rts5411_data = { .reset_us = 0, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata ti_tusb8041_data = { +static const struct onboard_dev_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata cypress_hx3_data = { +static const struct onboard_dev_pdata cypress_hx3_data = { .reset_us = 10000, .num_supplies = 2, .supply_names = { "vdd", "vdd2" }, }; -static const struct onboard_hub_pdata cypress_hx2vl_data = { +static const struct onboard_dev_pdata cypress_hx2vl_data = { .reset_us = 1, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata genesys_gl850g_data = { +static const struct onboard_dev_pdata genesys_gl850g_data = { .reset_us = 3, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata genesys_gl852g_data = { +static const struct onboard_dev_pdata genesys_gl852g_data = { .reset_us = 50, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata vialab_vl817_data = { +static const struct onboard_dev_pdata vialab_vl817_data = { .reset_us = 10, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct of_device_id onboard_hub_match[] = { +static const struct of_device_id onboard_dev_match[] = { { .compatible = "usb424,2412", .data = µchip_usb424_data, }, { .compatible = "usb424,2514", .data = µchip_usb424_data, }, { .compatible = "usb424,2517", .data = µchip_usb424_data, }, @@ -92,4 +92,4 @@ static const struct of_device_id onboard_hub_match[] = { {} }; -#endif /* _USB_MISC_ONBOARD_USB_HUB_H */ +#endif /* _USB_MISC_ONBOARD_USB_DEV_H */ diff --git a/drivers/usb/misc/onboard_usb_hub_pdevs.c b/drivers/usb/misc/onboard_usb_dev_pdevs.c similarity index 68% rename from drivers/usb/misc/onboard_usb_hub_pdevs.c rename to drivers/usb/misc/onboard_usb_dev_pdevs.c index ed22a18f4ab7..722504752ce3 100644 --- a/drivers/usb/misc/onboard_usb_hub_pdevs.c +++ b/drivers/usb/misc/onboard_usb_dev_pdevs.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * API for creating and destroying USB onboard hub platform devices + * API for creating and destroying USB onboard platform devices * * Copyright (c) 2022, Google LLC */ @@ -15,29 +15,30 @@ #include #include #include -#include +#include -#include "onboard_usb_hub.h" +#include "onboard_usb_dev.h" struct pdev_list_entry { struct platform_device *pdev; struct list_head node; }; -static bool of_is_onboard_usb_hub(const struct device_node *np) +static bool of_is_onboard_usb_dev(struct device_node *np) { - return !!of_match_node(onboard_hub_match, np); + return !!of_match_node(onboard_dev_match, np); } /** - * onboard_hub_create_pdevs -- create platform devices for onboard USB hubs - * @parent_hub : parent hub to scan for connected onboard hubs - * @pdev_list : list of onboard hub platform devices owned by the parent hub + * onboard_dev_create_pdevs -- create platform devices for onboard USB devices + * @parent_hub : parent hub to scan for connected onboard devices + * @pdev_list : list of onboard platform devices owned by the parent hub * - * Creates a platform device for each supported onboard hub that is connected to - * the given parent hub. The platform device is in charge of initializing the - * hub (enable regulators, take the hub out of reset, ...) and can optionally - * control whether the hub remains powered during system suspend or not. + * Creates a platform device for each supported onboard device that is connected + * to the given parent hub. The platform device is in charge of initializing the + * device (enable regulators, take the device out of reset, ...). For onboard + * hubs, it can optionally control whether the device remains powered during + * system suspend or not. * * To keep track of the platform devices they are added to a list that is owned * by the parent hub. @@ -50,9 +51,9 @@ static bool of_is_onboard_usb_hub(const struct device_node *np) * node. That means the root hubs of the primary and secondary HCD share the * same device tree node (the HCD node). As a result this function can be called * twice with the same DT node for root hubs. We only want to create a single - * platform device for each physical onboard hub, hence for root hubs the loop - * is only executed for the root hub of the primary HCD. Since the function - * scans through all child nodes it still creates pdevs for onboard hubs + * platform device for each physical onboard device, hence for root hubs the + * loop is only executed for the root hub of the primary HCD. Since the function + * scans through all child nodes it still creates pdevs for onboard devices * connected to the root hub of the secondary HCD if needed. * * Further there must be only one platform device for onboard hubs with a peer @@ -63,7 +64,7 @@ static bool of_is_onboard_usb_hub(const struct device_node *np) * the function processes the nodes of both peers. A platform device is only * created if the peer hub doesn't have one already. */ -void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *pdev_list) +void onboard_dev_create_pdevs(struct usb_device *parent_hub, struct list_head *pdev_list) { int i; struct usb_hcd *hcd = bus_to_hcd(parent_hub->bus); @@ -82,7 +83,7 @@ void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *p if (!np) continue; - if (!of_is_onboard_usb_hub(np)) + if (!of_is_onboard_usb_dev(np)) goto node_put; npc = of_parse_phandle(np, "peer-hub", 0); @@ -104,7 +105,7 @@ void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *p pdev = of_platform_device_create(np, NULL, &parent_hub->dev); if (!pdev) { dev_err(&parent_hub->dev, - "failed to create platform device for onboard hub '%pOF'\n", np); + "failed to create platform device for onboard dev '%pOF'\n", np); goto node_put; } @@ -121,16 +122,16 @@ void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *p of_node_put(np); } } -EXPORT_SYMBOL_GPL(onboard_hub_create_pdevs); +EXPORT_SYMBOL_GPL(onboard_dev_create_pdevs); /** - * onboard_hub_destroy_pdevs -- free resources of onboard hub platform devices - * @pdev_list : list of onboard hub platform devices + * onboard_dev_destroy_pdevs -- free resources of onboard platform devices + * @pdev_list : list of onboard platform devices * * Destroys the platform devices in the given list and frees the memory associated * with the list entry. */ -void onboard_hub_destroy_pdevs(struct list_head *pdev_list) +void onboard_dev_destroy_pdevs(struct list_head *pdev_list) { struct pdev_list_entry *pdle, *tmp; @@ -140,4 +141,4 @@ void onboard_hub_destroy_pdevs(struct list_head *pdev_list) kfree(pdle); } } -EXPORT_SYMBOL_GPL(onboard_hub_destroy_pdevs); +EXPORT_SYMBOL_GPL(onboard_dev_destroy_pdevs); diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c deleted file mode 100644 index 1f3e0094957d..000000000000 --- a/drivers/usb/misc/onboard_usb_hub.c +++ /dev/null @@ -1,504 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Driver for onboard USB hubs - * - * Copyright (c) 2022, Google LLC - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "onboard_usb_hub.h" - -static void onboard_hub_attach_usb_driver(struct work_struct *work); - -static struct usb_device_driver onboard_hub_usbdev_driver; -static DECLARE_WORK(attach_usb_driver_work, onboard_hub_attach_usb_driver); - -/************************** Platform driver **************************/ - -struct usbdev_node { - struct usb_device *udev; - struct list_head list; -}; - -struct onboard_hub { - struct regulator_bulk_data supplies[MAX_SUPPLIES]; - struct device *dev; - const struct onboard_hub_pdata *pdata; - struct gpio_desc *reset_gpio; - bool always_powered_in_suspend; - bool is_powered_on; - bool going_away; - struct list_head udev_list; - struct mutex lock; - struct clk *clk; -}; - -static int onboard_hub_get_regulators(struct onboard_hub *hub) -{ - const char * const *supply_names = hub->pdata->supply_names; - unsigned int num_supplies = hub->pdata->num_supplies; - struct device *dev = hub->dev; - unsigned int i; - int err; - - if (num_supplies > MAX_SUPPLIES) - return dev_err_probe(dev, -EINVAL, "max %d supplies supported!\n", - MAX_SUPPLIES); - - for (i = 0; i < num_supplies; i++) - hub->supplies[i].supply = supply_names[i]; - - err = devm_regulator_bulk_get(dev, num_supplies, hub->supplies); - if (err) - dev_err(dev, "Failed to get regulator supplies: %pe\n", - ERR_PTR(err)); - - return err; -} - -static int onboard_hub_power_on(struct onboard_hub *hub) -{ - int err; - - err = clk_prepare_enable(hub->clk); - if (err) { - dev_err(hub->dev, "failed to enable clock: %pe\n", ERR_PTR(err)); - return err; - } - - err = regulator_bulk_enable(hub->pdata->num_supplies, hub->supplies); - if (err) { - dev_err(hub->dev, "failed to enable supplies: %pe\n", ERR_PTR(err)); - return err; - } - - fsleep(hub->pdata->reset_us); - gpiod_set_value_cansleep(hub->reset_gpio, 0); - - hub->is_powered_on = true; - - return 0; -} - -static int onboard_hub_power_off(struct onboard_hub *hub) -{ - int err; - - gpiod_set_value_cansleep(hub->reset_gpio, 1); - - err = regulator_bulk_disable(hub->pdata->num_supplies, hub->supplies); - if (err) { - dev_err(hub->dev, "failed to disable supplies: %pe\n", ERR_PTR(err)); - return err; - } - - clk_disable_unprepare(hub->clk); - - hub->is_powered_on = false; - - return 0; -} - -static int __maybe_unused onboard_hub_suspend(struct device *dev) -{ - struct onboard_hub *hub = dev_get_drvdata(dev); - struct usbdev_node *node; - bool power_off = true; - - if (hub->always_powered_in_suspend) - return 0; - - mutex_lock(&hub->lock); - - list_for_each_entry(node, &hub->udev_list, list) { - if (!device_may_wakeup(node->udev->bus->controller)) - continue; - - if (usb_wakeup_enabled_descendants(node->udev)) { - power_off = false; - break; - } - } - - mutex_unlock(&hub->lock); - - if (!power_off) - return 0; - - return onboard_hub_power_off(hub); -} - -static int __maybe_unused onboard_hub_resume(struct device *dev) -{ - struct onboard_hub *hub = dev_get_drvdata(dev); - - if (hub->is_powered_on) - return 0; - - return onboard_hub_power_on(hub); -} - -static inline void get_udev_link_name(const struct usb_device *udev, char *buf, size_t size) -{ - snprintf(buf, size, "usb_dev.%s", dev_name(&udev->dev)); -} - -static int onboard_hub_add_usbdev(struct onboard_hub *hub, struct usb_device *udev) -{ - struct usbdev_node *node; - char link_name[64]; - int err; - - mutex_lock(&hub->lock); - - if (hub->going_away) { - err = -EINVAL; - goto error; - } - - node = kzalloc(sizeof(*node), GFP_KERNEL); - if (!node) { - err = -ENOMEM; - goto error; - } - - node->udev = udev; - - list_add(&node->list, &hub->udev_list); - - mutex_unlock(&hub->lock); - - get_udev_link_name(udev, link_name, sizeof(link_name)); - WARN_ON(sysfs_create_link(&hub->dev->kobj, &udev->dev.kobj, link_name)); - - return 0; - -error: - mutex_unlock(&hub->lock); - - return err; -} - -static void onboard_hub_remove_usbdev(struct onboard_hub *hub, const struct usb_device *udev) -{ - struct usbdev_node *node; - char link_name[64]; - - get_udev_link_name(udev, link_name, sizeof(link_name)); - sysfs_remove_link(&hub->dev->kobj, link_name); - - mutex_lock(&hub->lock); - - list_for_each_entry(node, &hub->udev_list, list) { - if (node->udev == udev) { - list_del(&node->list); - kfree(node); - break; - } - } - - mutex_unlock(&hub->lock); -} - -static ssize_t always_powered_in_suspend_show(struct device *dev, struct device_attribute *attr, - char *buf) -{ - const struct onboard_hub *hub = dev_get_drvdata(dev); - - return sysfs_emit(buf, "%d\n", hub->always_powered_in_suspend); -} - -static ssize_t always_powered_in_suspend_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct onboard_hub *hub = dev_get_drvdata(dev); - bool val; - int ret; - - ret = kstrtobool(buf, &val); - if (ret < 0) - return ret; - - hub->always_powered_in_suspend = val; - - return count; -} -static DEVICE_ATTR_RW(always_powered_in_suspend); - -static struct attribute *onboard_hub_attrs[] = { - &dev_attr_always_powered_in_suspend.attr, - NULL, -}; -ATTRIBUTE_GROUPS(onboard_hub); - -static void onboard_hub_attach_usb_driver(struct work_struct *work) -{ - int err; - - err = driver_attach(&onboard_hub_usbdev_driver.driver); - if (err) - pr_err("Failed to attach USB driver: %pe\n", ERR_PTR(err)); -} - -static int onboard_hub_probe(struct platform_device *pdev) -{ - struct device *dev = &pdev->dev; - struct onboard_hub *hub; - int err; - - hub = devm_kzalloc(dev, sizeof(*hub), GFP_KERNEL); - if (!hub) - return -ENOMEM; - - hub->pdata = device_get_match_data(dev); - if (!hub->pdata) - return -EINVAL; - - hub->dev = dev; - - err = onboard_hub_get_regulators(hub); - if (err) - return err; - - hub->clk = devm_clk_get_optional(dev, NULL); - if (IS_ERR(hub->clk)) - return dev_err_probe(dev, PTR_ERR(hub->clk), "failed to get clock\n"); - - hub->reset_gpio = devm_gpiod_get_optional(dev, "reset", - GPIOD_OUT_HIGH); - if (IS_ERR(hub->reset_gpio)) - return dev_err_probe(dev, PTR_ERR(hub->reset_gpio), "failed to get reset GPIO\n"); - - mutex_init(&hub->lock); - INIT_LIST_HEAD(&hub->udev_list); - - dev_set_drvdata(dev, hub); - - err = onboard_hub_power_on(hub); - if (err) - return err; - - /* - * The USB driver might have been detached from the USB devices by - * onboard_hub_remove() (e.g. through an 'unbind' by userspace), - * make sure to re-attach it if needed. - * - * This needs to be done deferred to avoid self-deadlocks on systems - * with nested onboard hubs. - */ - schedule_work(&attach_usb_driver_work); - - return 0; -} - -static void onboard_hub_remove(struct platform_device *pdev) -{ - struct onboard_hub *hub = dev_get_drvdata(&pdev->dev); - struct usbdev_node *node; - struct usb_device *udev; - - hub->going_away = true; - - mutex_lock(&hub->lock); - - /* unbind the USB devices to avoid dangling references to this device */ - while (!list_empty(&hub->udev_list)) { - node = list_first_entry(&hub->udev_list, struct usbdev_node, list); - udev = node->udev; - - /* - * Unbinding the driver will call onboard_hub_remove_usbdev(), - * which acquires hub->lock. We must release the lock first. - */ - get_device(&udev->dev); - mutex_unlock(&hub->lock); - device_release_driver(&udev->dev); - put_device(&udev->dev); - mutex_lock(&hub->lock); - } - - mutex_unlock(&hub->lock); - - onboard_hub_power_off(hub); -} - -MODULE_DEVICE_TABLE(of, onboard_hub_match); - -static const struct dev_pm_ops __maybe_unused onboard_hub_pm_ops = { - SET_LATE_SYSTEM_SLEEP_PM_OPS(onboard_hub_suspend, onboard_hub_resume) -}; - -static struct platform_driver onboard_hub_driver = { - .probe = onboard_hub_probe, - .remove_new = onboard_hub_remove, - - .driver = { - .name = "onboard-usb-hub", - .of_match_table = onboard_hub_match, - .pm = pm_ptr(&onboard_hub_pm_ops), - .dev_groups = onboard_hub_groups, - }, -}; - -/************************** USB driver **************************/ - -#define VENDOR_ID_CYPRESS 0x04b4 -#define VENDOR_ID_GENESYS 0x05e3 -#define VENDOR_ID_MICROCHIP 0x0424 -#define VENDOR_ID_REALTEK 0x0bda -#define VENDOR_ID_TI 0x0451 -#define VENDOR_ID_VIA 0x2109 - -/* - * Returns the onboard_hub platform device that is associated with the USB - * device passed as parameter. - */ -static struct onboard_hub *_find_onboard_hub(struct device *dev) -{ - struct platform_device *pdev; - struct device_node *np; - struct onboard_hub *hub; - - pdev = of_find_device_by_node(dev->of_node); - if (!pdev) { - np = of_parse_phandle(dev->of_node, "peer-hub", 0); - if (!np) { - dev_err(dev, "failed to find device node for peer hub\n"); - return ERR_PTR(-EINVAL); - } - - pdev = of_find_device_by_node(np); - of_node_put(np); - - if (!pdev) - return ERR_PTR(-ENODEV); - } - - hub = dev_get_drvdata(&pdev->dev); - put_device(&pdev->dev); - - /* - * The presence of drvdata ('hub') indicates that the platform driver - * finished probing. This handles the case where (conceivably) we could - * be running at the exact same time as the platform driver's probe. If - * we detect the race we request probe deferral and we'll come back and - * try again. - */ - if (!hub) - return ERR_PTR(-EPROBE_DEFER); - - return hub; -} - -static int onboard_hub_usbdev_probe(struct usb_device *udev) -{ - struct device *dev = &udev->dev; - struct onboard_hub *hub; - int err; - - /* ignore supported hubs without device tree node */ - if (!dev->of_node) - return -ENODEV; - - hub = _find_onboard_hub(dev); - if (IS_ERR(hub)) - return PTR_ERR(hub); - - dev_set_drvdata(dev, hub); - - err = onboard_hub_add_usbdev(hub, udev); - if (err) - return err; - - return 0; -} - -static void onboard_hub_usbdev_disconnect(struct usb_device *udev) -{ - struct onboard_hub *hub = dev_get_drvdata(&udev->dev); - - onboard_hub_remove_usbdev(hub, udev); -} - -static const struct usb_device_id onboard_hub_id_table[] = { - { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6504) }, /* CYUSB33{0,1,2}x/CYUSB230x 3.0 */ - { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6506) }, /* CYUSB33{0,1,2}x/CYUSB230x 2.0 */ - { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6570) }, /* CY7C6563x 2.0 */ - { USB_DEVICE(VENDOR_ID_GENESYS, 0x0608) }, /* Genesys Logic GL850G USB 2.0 */ - { USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 */ - { USB_DEVICE(VENDOR_ID_GENESYS, 0x0620) }, /* Genesys Logic GL3523 USB 3.1 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2412) }, /* USB2412 USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2517) }, /* USB2517 USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2744) }, /* USB5744 USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x5744) }, /* USB5744 USB 3.0 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x5414) }, /* RTS5414 USB 2.1 */ - { USB_DEVICE(VENDOR_ID_TI, 0x8140) }, /* TI USB8041 3.0 */ - { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 */ - { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 */ - { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 */ - {} -}; -MODULE_DEVICE_TABLE(usb, onboard_hub_id_table); - -static struct usb_device_driver onboard_hub_usbdev_driver = { - .name = "onboard-usb-hub", - .probe = onboard_hub_usbdev_probe, - .disconnect = onboard_hub_usbdev_disconnect, - .generic_subclass = 1, - .supports_autosuspend = 1, - .id_table = onboard_hub_id_table, -}; - -static int __init onboard_hub_init(void) -{ - int ret; - - ret = usb_register_device_driver(&onboard_hub_usbdev_driver, THIS_MODULE); - if (ret) - return ret; - - ret = platform_driver_register(&onboard_hub_driver); - if (ret) - usb_deregister_device_driver(&onboard_hub_usbdev_driver); - - return ret; -} -module_init(onboard_hub_init); - -static void __exit onboard_hub_exit(void) -{ - usb_deregister_device_driver(&onboard_hub_usbdev_driver); - platform_driver_unregister(&onboard_hub_driver); - - cancel_work_sync(&attach_usb_driver_work); -} -module_exit(onboard_hub_exit); - -MODULE_AUTHOR("Matthias Kaehlcke "); -MODULE_DESCRIPTION("Driver for discrete onboard USB hubs"); -MODULE_LICENSE("GPL v2"); diff --git a/include/linux/usb/onboard_dev.h b/include/linux/usb/onboard_dev.h new file mode 100644 index 000000000000..b79db6d193c8 --- /dev/null +++ b/include/linux/usb/onboard_dev.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __LINUX_USB_ONBOARD_DEV_H +#define __LINUX_USB_ONBOARD_DEV_H + +struct usb_device; +struct list_head; + +#if IS_ENABLED(CONFIG_USB_ONBOARD_DEV) +void onboard_dev_create_pdevs(struct usb_device *parent_dev, struct list_head *pdev_list); +void onboard_dev_destroy_pdevs(struct list_head *pdev_list); +#else +static inline void onboard_dev_create_pdevs(struct usb_device *parent_dev, + struct list_head *pdev_list) {} +static inline void onboard_dev_destroy_pdevs(struct list_head *pdev_list) {} +#endif + +#endif /* __LINUX_USB_ONBOARD_DEV_H */ diff --git a/include/linux/usb/onboard_hub.h b/include/linux/usb/onboard_hub.h deleted file mode 100644 index d9373230556e..000000000000 --- a/include/linux/usb/onboard_hub.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ - -#ifndef __LINUX_USB_ONBOARD_HUB_H -#define __LINUX_USB_ONBOARD_HUB_H - -struct usb_device; -struct list_head; - -#if IS_ENABLED(CONFIG_USB_ONBOARD_HUB) -void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *pdev_list); -void onboard_hub_destroy_pdevs(struct list_head *pdev_list); -#else -static inline void onboard_hub_create_pdevs(struct usb_device *parent_hub, - struct list_head *pdev_list) {} -static inline void onboard_hub_destroy_pdevs(struct list_head *pdev_list) {} -#endif - -#endif /* __LINUX_USB_ONBOARD_HUB_H */ From patchwork Thu Feb 29 08:34:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13576844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92DF2C54E58 for ; Thu, 29 Feb 2024 08:35:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B583110E2FE; Thu, 29 Feb 2024 08:35:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=wolfvision.net header.i=@wolfvision.net header.b="L94uPR0e"; dkim-atps=neutral Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2110.outbound.protection.outlook.com [40.107.22.110]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E7E110E116 for ; Thu, 29 Feb 2024 08:35:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GZbFehUjKvkXPh4coxyVfhzXhRcuURNpaQylt1ua8cQV2IQHLBVjkaCwZp7r0oG7+mnE6yZsYei079nHy4vE6pt+JgTJUaK+EubgpLlqpilO5cYtA9dz8FD57a6JZbLYoc2RBPf62jXMQqW7thSewQE0i1XPkHaQOCZGQq8g6iXNDnvXDINHOzLKBDPVDx4Q8NPUL/QQYwTQiFqZUCdVpP+Z5g3MWDnKdtgQT6c2t9N3zD5OaTlsL5/1dLL9goRnjOyl6NlXP0/aS6Nu79BL4gwKBq16CgkLhBQIQn3NWpvnCyiHnViA506/OdDRw2IAYWuk/5mmigDeO0e5I6EcVA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MWT5qTUoBybcuWRrrtvTKlGHfdiit8E0volSwnQvULs=; b=QxGyhAbM2yjJpwhq3JKeLUD5XD3e9c2Rwh9jswoEZdoP1ddVAWWppObC1iW8tkoWZjeaiH2CDg3162izFNVt4FKF4pJOh3bRq8MXgvfrL47hcwWITeEaCJ1k5wR3i7s0ooMCb8Cf99aAPXj7/CyKj27J1XCJQAtN6oYPRybVDiEHgYH22m4OS1qImp4ozs4B3phyiSudzS/o7MSpkbw9iAVupAaW998jJaFsnwHgUdgbkvC7+Q+6XmsN5P67jXJOHOSVF0TLu/WvPzrPF1xO2mJJkAQpVkVpvPFvsDQ8Qfos/UX6oauMvqWVbZwId3f43JWuQrNQxBb6xqZAmcR+CQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MWT5qTUoBybcuWRrrtvTKlGHfdiit8E0volSwnQvULs=; b=L94uPR0e2NWCb1XaR1tn9Y3a72bJE41fC0Z8Cas80NjUQQqX/TZ43Fp6RtBbJQRKMDf0xMlub6WliII1Qyp/PmrU4HI8EbuwV2GWaqDyxJWoB7OUTAFcJ8Su+t8ysjy+Qxn+vZrCtSHFxe3D04+kYtIyX5knHtMAw5b6PA7PuNY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB9727.eurprd08.prod.outlook.com (2603:10a6:10:445::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 08:34:57 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%6]) with mapi id 15.20.7316.035; Thu, 29 Feb 2024 08:34:57 +0000 From: Javier Carrasco Date: Thu, 29 Feb 2024 09:34:47 +0100 Subject: [PATCH v6 4/9] drm: ci: arm64.config: update ONBOARD_USB_HUB to ONBOARD_USB_DEV Message-Id: <20240229-onboard_xvf3500-v6-4-a0aff2947040@wolfvision.net> References: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> In-Reply-To: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709195691; l=1052; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=8N+eqRO95PGeajXAAAiRwSPUATjuHBDxxAPxCCAJmv0=; b=djF8NfiKqAfVC16/JUrhMCP05aTDqkFUZ6E5NfjMvcZd9wHXT8V4l9OyFzGyZnGmppFUG6+n3 EI8L7WQQDzTA0wCTDzwZ0ndPZXsFjUK00EAXW0KPU9v8enroVfu2MdH X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR3P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB9727:EE_ X-MS-Office365-Filtering-Correlation-Id: ca5fea34-ddff-47db-63c6-08dc39014fa1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GB2lPSk8vmg07IVBKnP4pYU1UCyMmOzrn25OzXyR7ohNDkyQ3T9LFmxb0P0V4lkMhONgdS4rlTnK9AwAThNorypmaxAisBmw8TXHXwjxYXjQYG0WUeLMcS2oVwB2aPATW+BKOWWiDHEZMmcxg5H1IKYdChGzk0AUE+7ZI8BgE8QL56T01BlSo0W62r3pfANl/O/yNXvkX3tcwBLnF4wKmhYrsnYsEtHNASMF4b13T7oBWX3njmVtgAJS2AxzVS1+dTrGsxqVBaEqxG32dPXgpdiCWHUE1HQrQjX+av0wjD1TGHfobNfX043sH20pTtG0tL7kiXQ67YSVzhP9mzqsOovYikTmQG4YaAjCohbTAA/4JRGwACqaC+jHk6lvdfedrGufnHDhH+tCZfI3TKbM/JgrTVDfRva3VqKdaVEvUTd3NMEiuAgaILdvFmRodBSl+UqS/ytH/zrYWwIR8v0V8utU2dN/FOTvFmCd4g46qjRLfn9Fdkvhfmu9+PLXFCPp0UUbV7EGEgN2EPwkvgr8RaVNz01+6dL2jLifTZzPkt3xb5HLz/cB/TQaC3POKyl6r88Hj4sOM+RmRvaVliVkjK5O8QLDlChkgUaezmFWSo0EvGIUqdpJfhcGRKeNdTarc3/mG0gEHg/MZ/ZVIwdxuuOnkKm5nD7ePukkdiO1tyv+XfB6z7TZqsgHL9w8buKgr+w3IGf+dO1a7dRJ4y5WiYYKnAa9lLlAOomT7tcw/fg= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4974.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2sDK0t/Z1J8MTxECepLKrZGnNIgr?= =?utf-8?q?PztqOCN1yTGm74c7/jcfypCQJaTjJpEo+Spslf80MLySZZn1kLBypvNqp3sN847NI?= =?utf-8?q?Ek3h5TMDyrfUrJJrNf05TEAvQ3BjECr2czI9NY4YHabm+NbtLuoekOwPoE8Q4ym/X?= =?utf-8?q?xIXUIwHl5Gxa0V0XP2TNM2YgMUr1z+DNKdUfJSDJl5mKQIcJPOTh60ALzb1cuvEVG?= =?utf-8?q?Ki/asUSYgiT9Gzia2lfWnDeLnun/VuqgBqlURjaO8lvv4gvignwkw1wCcWhX6PEDd?= =?utf-8?q?jSLzXq6E+U3kO5FzDnXyiGsaz6p5s63TMEdPuUV+3BDt7IHwJL3yVIgUegPODgHRX?= =?utf-8?q?QBI5QtAN/ScJUtbl41pul4+SewK8PTdhts2hjTXVR4DdC9egcToRhjZWyliPkA1zd?= =?utf-8?q?0AvDP87TxZyxefahE9Wy3uecSchZxONrJ++MXSf5eJ33b9vAjQsimywsr1Rb9Ufqy?= =?utf-8?q?wMH50AR7XdzRo+sq3/HGUnTJ5KU9nzDRExurrn7Xe3cN/3cf2FwD44Nsio9zLDxbM?= =?utf-8?q?5b7zwfVX4f9cNhYTAgWf1E7rbK/z/HfwcgAu/PftmkRYqTJnTWnHgI5kBH00NW8ut?= =?utf-8?q?ndNB+APnxuTKPirI7cgu1fu9xKgNnG3Aa40n90ev04ESHFcRswTdPBDe7RwuXVO9k?= =?utf-8?q?/9g/FyHwZx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3egnfxDc4ou4GOoYtVgJosuj4=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: ca5fea34-ddff-47db-63c6-08dc39014fa1 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:34:57.4894 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Qj14XHEr/ZU3L07Blmsmm0BlURjNX0Zj3bny8dVa8Z30mjQMkZuQOuVG2Cck/3erIKyhC/QaD6YZLThZZ1KOyOmiNuO4s/8sqplBHgNAicA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9727 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The onboard_usb_hub driver has been updated to support non-hub devices, which has led to some renaming. Update to the new name (ONBOARD_USB_DEV) accordingly. Acked-by: Helen Koike Signed-off-by: Javier Carrasco Reviewed-by: Matthias Kaehlcke --- drivers/gpu/drm/ci/arm64.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ci/arm64.config b/drivers/gpu/drm/ci/arm64.config index 8dbce9919a57..4140303d6260 100644 --- a/drivers/gpu/drm/ci/arm64.config +++ b/drivers/gpu/drm/ci/arm64.config @@ -87,7 +87,7 @@ CONFIG_DRM_PARADE_PS8640=y CONFIG_DRM_LONTIUM_LT9611UXC=y CONFIG_PHY_QCOM_USB_HS=y CONFIG_QCOM_GPI_DMA=y -CONFIG_USB_ONBOARD_HUB=y +CONFIG_USB_ONBOARD_DEV=y CONFIG_NVMEM_QCOM_QFPROM=y CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2=y @@ -97,7 +97,7 @@ CONFIG_USB_RTL8152=y # db820c ethernet CONFIG_ATL1C=y # Chromebooks ethernet -CONFIG_USB_ONBOARD_HUB=y +CONFIG_USB_ONBOARD_DEV=y # 888 HDK ethernet CONFIG_USB_LAN78XX=y From patchwork Thu Feb 29 08:34:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13576845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7A0EC54798 for ; Thu, 29 Feb 2024 08:35:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 09D1110E30F; Thu, 29 Feb 2024 08:35:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=wolfvision.net header.i=@wolfvision.net header.b="uRBzs480"; dkim-atps=neutral Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2103.outbound.protection.outlook.com [40.107.7.103]) by gabe.freedesktop.org (Postfix) with ESMTPS id D78CA10E116 for ; Thu, 29 Feb 2024 08:35:07 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iJPxuNOtYXjyDRnewh9YIgbVh7+fEEW33t4QVZ3rWzGjDpSz9Q5ts7xM+rlrSN3GVcb6xIRJ53dc+dyEkY3GVrnwV8pcvR2A7uo5hNoo9p6G0O38AMxt57/UZZt+OeI4ZMP/316SOfN/grgoAafW/ph+H7g0wXeR9iKegnP3eV3pQ7I472Sf96WxsTIDjplj50c5AEAiEGb02chRHPIyW45tnNY9/Ne+MjvbbEBtaP51gG24Shqe1BqTCaMqcRYsGerUKObPpjM+NFqYYdRc3OPpfvey0EwV8r1OiY8KhDR0jXlnoKOaSjDI8pFiASqX7bfjR1GEDdm6qE+PsY9CCQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jbaOGiQnqMim73n95NNuOUW1VNxYpJ3bWE0RQMANOTk=; b=dCW/PNuBcz2M38OqUEy9u+9wIYxuc3zxS8+GDRE9/DyIuSODvlyaWTrMxZPNgckeZAHXO48bsrfagDjVeCi7abMOwj95XtdWiGBDHzudvsjCjTuEwyBsElxbysRTFKAayMbGdoSVIrzzcBW6FrQQfTfggAqxGtaaeUdun0Rpo3d9f7tS08CIfaFf1x3A8DYNHHrsztF2bOwoZnX5dbwu7VMBeKHLwKmen4YBgvYNcFc17M5nXR7v0/gitC75ceOtcLvceR6ynD5VmNnuM172+xmInFL9rQj6L3c+BbQTGCOcgAx2AcQ37JR0CfUd3yYnV3NuFxl7U0/WVws1qBYw9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jbaOGiQnqMim73n95NNuOUW1VNxYpJ3bWE0RQMANOTk=; b=uRBzs480iC+cEz8NzNBQX9r55+TNVAATyiJB56f+ZsNdYF7Hib1Wpag5X6rIPNTwfFgHKDanMshpG3bvfbU4zp2r8GM4hSKHzauRWdK3QtJDedi4r3AWaPeWgKT5rc4YCDZK5K7feH9J+0B/YMMkPEen6C+SqGXHlNPoTUSn1LE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB9727.eurprd08.prod.outlook.com (2603:10a6:10:445::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 08:34:58 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%6]) with mapi id 15.20.7316.035; Thu, 29 Feb 2024 08:34:58 +0000 From: Javier Carrasco Date: Thu, 29 Feb 2024 09:34:48 +0100 Subject: [PATCH v6 5/9] arm64: defconfig: update ONBOARD_USB_HUB to ONBOARD_USB_DEV Message-Id: <20240229-onboard_xvf3500-v6-5-a0aff2947040@wolfvision.net> References: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> In-Reply-To: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709195691; l=792; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=Hn7W5NquFOfa2SPwHz+COI8OES/VcCwNF5nc43UmJR0=; b=u/LaO/chcN7lQmro8tWIQuhtfMBKpyFt8WvecRDdKVmHicLy5a93QgvGABSxw6XtmCH+/mhci Yvn2qBORU0TAI3RpdhjjwexzKwCt4tH9VraX6uF05EHi2SEBv47Z2k8 X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR3P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB9727:EE_ X-MS-Office365-Filtering-Correlation-Id: 22726d13-4f38-4a31-7095-08dc39015071 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9ZpNKC8WfoQFAwFfVnwqRM+DONeSaAJqEctX/09gZIZQxfWbKJ5HOQ011XXZdGB9LQ0h9fTYdqCUux9INaiIaXFHNlZrZKUplVNUJP4vf70h+gBBdqn0ut+VfX+pbQNQGlbq3xtRjlLVHxsKxAUwEWFhoK0g/8BPDKHFvl2Y4B5rifdmsknRPczH7KuUkH1imphUNxatpGwV4Y5sg8w1oMLNX1/+P9C4DcR82wWZGBpu86jXS8n3zLGYh1LjYsgaO6Wxt5oR8Iru4JXTw+M+1mX9Pyx6e7QM8rERkakxCLwSmpWy0LK1QMstyGgudnlmhndVh/SMXSjq3Lhv1HtStf2TgQjNoDaQrZkl0FVZWa9a5vBeNoD1t652JfPuSS3PeWmTnmijP8cOgOAsf2aLtOX/SonnVufXv9j8dNd58nOsH1P/rozyKkXAIwqJp/nEr374ehZUG2Scls5jgK9wLzoPEq0RSegPt69zVnSK6KwBp21kTn/GpWLV6WYBPz3PUcKsOyx1OWfm8SePHqslRBh4len54SUZLY556NtpizNFuTgncGkxUXJfdzFHeX0rCxcL/adAdIa/VMBMMwsgxaocPTx3xYeMm4yUxAqoHL9WPOXr9GklcFqjeOuJzbsRT2T0DtNyZ5mXRAKXuyURilnBYVif2aD2QeVkzR802YCvjUGpuEweGxU2jKOIsxV39wb5ut7s015nAE4kO+Bsn+aarZcnRbn1kVigzAWs1ug= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4974.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iM8fETzlhsDBLUofP5EK595zIZsh?= =?utf-8?q?yC4Tb34FjgV6CyWi49eiUYU8zrfPmUCMPXlbouGH2B2Bt3zxq5+c87p/Y7Xi/kAZG?= =?utf-8?q?+xLxynjIqFQ2ZLzSKGdtJnCBhcbJzsh3KPlbKt4+2eDeg14WVb5/pQxMXEg262lBd?= =?utf-8?q?sBUPyHjBm2BL8WSp/f6APZmqHDvnPjQEgpyGbUgl3fP6wBR6FSNNG/9ZCdG9f6w3W?= =?utf-8?q?rLnrKrN/v1uf+OsH+vy+B6E316imQQ/OYQglUTybeH3MYvAmQ5wY7dIgt8LPKVohs?= =?utf-8?q?DWiKgbfsY7gaRAauEIE/nNuId/f4KXDaGNLvyPdQJnfKvJrUR9eZJQDXkVQJlj1lN?= =?utf-8?q?ayse6cng45T5EaKocGPxwdP1oZZho3/xYpT33F9vBn+tsqr3CZk9eqUYtKsMOx7X/?= =?utf-8?q?TR1cGkwChzYFVXdZJVTif40Plr9nP/x4zRFxloAr97+vxLik7Y1mVZ0FkbpNmXaXu?= =?utf-8?q?WwsaVNmPciVZwwJEFR6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gREVkAw8G4ZOYqMSLxrBgOLsyDXFuFYu63pgmnu05PR?= =?utf-8?q?aV5hfDUnxYxqKFI7WyGSHZwY4dgZtV/yale9BjKv846FfpizWe7nL0sVGhhcWFdf8?= =?utf-8?q?LaT+mmyfav2cusLBZmXjmRzfrF97Rq3o5mDKx16ocXRW81zoSLLwjAT6FIISWsJ5G?= =?utf-8?q?unfrgBAAXelg9X8iPj63pk6W72DINPdMYYLuZRx9VrImRzYwhnJ8mso=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 22726d13-4f38-4a31-7095-08dc39015071 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:34:58.8032 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xPDllP14fp5FmM78W6EsElDT57pOPaXlNeOsq63yR4Z+k9ue7dDCq9nOZo5Rb3GeuI1XHhC58//fXEjAHC/MqL5h/c50UtTE7Ozf8ThpPxk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9727 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The onboard_usb_hub driver has been updated to support non-hub devices, which has led to some renaming. Update to the new name (ONBOARD_USB_DEV) accordingly. Signed-off-by: Javier Carrasco Reviewed-by: Matthias Kaehlcke --- arch/arm64/configs/defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index e6cf3e5d63c3..3c6196b6c984 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -1047,7 +1047,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_OPTION=m CONFIG_USB_QCOM_EUD=m CONFIG_USB_HSIC_USB3503=y -CONFIG_USB_ONBOARD_HUB=m +CONFIG_USB_ONBOARD_DEV=m CONFIG_NOP_USB_XCEIV=y CONFIG_USB_GADGET=y CONFIG_USB_RENESAS_USBHS_UDC=m From patchwork Thu Feb 29 08:34:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13576838 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7BD0C54798 for ; Thu, 29 Feb 2024 08:35:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35BED10E116; Thu, 29 Feb 2024 08:35:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=wolfvision.net header.i=@wolfvision.net header.b="U4731ceG"; dkim-atps=neutral Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2110.outbound.protection.outlook.com [40.107.22.110]) by gabe.freedesktop.org (Postfix) with ESMTPS id D5BAE10E1F4 for ; Thu, 29 Feb 2024 08:35:05 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xp4ys2S7Ad91l6aSG049K6np9zFxeEzM3y4d/kPyy6DPE3E9NJeUdnkC5ZeEpVSZ1cdBJwKi3zlILT6uVVuT2TaEFmkiuOkkkHhmQuyWpd9h9YHfWqx0qq6riIQTlQyfE7qu1YgpV8s/G7lxQiByWv/rZyGnF/6eQZmlKIUqrpQh9hKIj84hKgycAo5EPrvJS+od3VG6vh+oXIh1fBOPkk5aDat/scf2sCbKArkp7z/tut+YQpGVqEI+E0DKX7QmSEN+6VsVAaQGpQ1dqn6xAExcaObiBQpbjreL2NTpZ5/66TA73LSvpJh0Ul1wOT7ahThdqgqHATd6Hs1Cyn7V0Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BwxTPyHk173LH7OLvpI8Mk3rAWKwhtS83y1hH7zVRz4=; b=aSuq5WxUKuoogfXpS7Xz8CUe45Jp82PigEm3w/dR4ysjZAo4bh+WblvpGA8zv95OjbAnpDcw9nYMBPbPUsLKPqty41dzM+zA2daQ0sQ4RyqfIep7nEPbxjAoU0Z0iIrpN4Qo4T285krgGU7Egj4txEgzb1iq36Vwee0BcUqO1TKMsP/yOQHZ1Uz0MvsshxzR0Z7o7oEMn4Fgjw/CjiWPe52oEq3fYV64uksXVwnywsqEyAjDGNIZfzquuY5gvVTZRPGoir8ZOpSRLnqCVkTjE36T9x8Qd7NNvmzA3wN3Xy35AJjuh4SsnBG0/Gs9nRF+rHqsNQglwyYXCaKHbW9U+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BwxTPyHk173LH7OLvpI8Mk3rAWKwhtS83y1hH7zVRz4=; b=U4731ceG3/ZrLrOnMDIBtovq9aKVE3ZzXKtQs39m9bA+X5DXtIqh+Hdl8WOYjihMyj7ApF6Cup9JGt++VFoqU4Nv/xf2x1l0Ma1DwLxbK1POrxJnOIhSkupjvZO1hAg147Flrztn/k+Hj++PmEN+3gogs5HrrXlQN5JFVAVQY84= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB9727.eurprd08.prod.outlook.com (2603:10a6:10:445::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 08:35:00 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%6]) with mapi id 15.20.7316.035; Thu, 29 Feb 2024 08:35:00 +0000 From: Javier Carrasco Date: Thu, 29 Feb 2024 09:34:49 +0100 Subject: [PATCH v6 6/9] ARM: multi_v7_defconfig: update ONBOARD_USB_HUB to ONBOAD_USB_DEV Message-Id: <20240229-onboard_xvf3500-v6-6-a0aff2947040@wolfvision.net> References: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> In-Reply-To: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709195691; l=852; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=GYIorgCuxQ34b4lu1hFXgE4alR4MOyW2uxp4IG/bCFo=; b=gZbczGL3U/gwunqCnXvBXPrBTgAYMDRX09PR7beYv7MA1hMksPcl/THmanBCv5Nbkw4TeAlAN vb2Rm6dfAqWB0kqJbOUzhDCx2ckai+NeaX4pwDp0F0iFE2eGL7X+Hhj X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR3P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB9727:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f940327-9cf2-4327-0287-08dc3901512f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MjWgJ6f2ZryRDvUj3MU2bkA4+W4wr0sgLxfvIf0htTEXYRB4Q5j8AEnrrtR7vXB+DvzalmdkMPIQMiC4jjA9FA2d/EA+/CPkZk8S3ouTTNjBiomTiB4wI2opvw9EXsO057vTNJ9TGPz7U/y2Cep7rYwwqXZsQrdSXwg1zsLG3VPEUQvisairskvuKNK5NPcArFQmpWdrFNPi+UO3z5zwHBUmJAzqT0HeLjI1fAWKbybzLdNQdmx/uAeFbbECk+Eh/F/qQELVKo5PSaZnSSYYQ6sgFfHLvK4gBrPOUF6ImYSC9oFbml/xNnnnL2tRGNRRdOVVuyGNNDpSgD5oypismP3G9oBJKoE1i1MBQAjozRnImbNPvQa2ARIR+QpHpTBfd0yAQ44SMfYi55KOereeWdlEPaDArOqZg6tG4lGeTC/mXNbc0W0YLKHx2NjqpiiS+2KC52HwQqNRvBdvYxGX+hnTP+dEq5iZM2NKbWHq5jYI6r6KryIX3QZCAPV4hp6FRT1nqJY+SHbxGJe4GdFZbdXkdxLpqs1pIOgxr01yQv1dSnOkdqP+5A1nbFPJ62CxGcMmVwvV4xDKAHooVTvvtl304KFGtRwTsvXBVIOUAaWWuU1PXXwMLlImXCT/rfi0vZHk0f3/k0k8AMlE5k4p6wKc93f4TyL2mvoZdh1HurwzzhHJQXC1Xqfn6UQL/KHhQC/IAB3Df7QhSnfQ67+fNTH4mt3oFSMFdLYOLGDdpS4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4974.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?93z0tC8V3DsGI6MqLgjTLawdGxAT?= =?utf-8?q?xtlqqfLBMuChgeGSf5OZWsMommdZfo4yGPf/1rfyjS7OhGeBTxZzoNe5Zzub921W5?= =?utf-8?q?ka+5nfz5fBkpXcaNnb7ERYZtPPZ1T6qeQpUaLo4r12O6FyAVpzcUpPWwq3iUgWlhn?= =?utf-8?q?z1qWZMAjmwLtu62bHzZXw6sp6Vd9wWD/2+gxUAWlPb1yMTxUuXxk3jvXzstRpcs6V?= =?utf-8?q?IIiD1bOpwstL7SiHXrbxk7YEmLVq+MLvvcpCZfAigXV98+DfP/T5E94iYSQbEJA8i?= =?utf-8?q?9McmwlL1XScdbuoMlJflVTg38n1OzAaYkfbFDGr3+sAZH+vUN+kqEAx79t4j/rtHs?= =?utf-8?q?dly/DXkCSzMN91HwfrnrSCi6520lrmEJPpcz0/Mrn5yU4mIS79ySkyYyQ5dU2x1oD?= =?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n76vSOgyOxj4CY43u+aY4CKvimC+zB+f5v2ZIbYQwqC4CzxeDDhVe58hrRdWT6iv?= =?utf-8?q?JhHBokWBJVe1SMaqupMkv+u4KUEWWkwIMQxsBKNQ6e3TM9khqETp01kaqMo04nLcW?= =?utf-8?q?bUCZFRGmllMxnrR9LkkhWL6bN8VP7r+07XUMhh23XKpLfwh0TPiJcj3tuYVRN6x2C?= =?utf-8?q?QMPhiz+DrtaWfN1RhoFF0OUaEWOmZ6bQWGLLSgabM0+WiJF0OsVZ1CjTwbjGC8nzz?= =?utf-8?q?htHYiZbz0Tzg8/PX1pI3GrUqATFmC42w1szpWtFxC+oYwIJnmtEoBHc=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 1f940327-9cf2-4327-0287-08dc3901512f X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:35:00.0842 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IUdVHkVoZF+mE/wF/qO4N4LRGTMnMuXari/KVPnpOktnInrcUs524OOQHDziXz98tnC0hfKOFOr4XUCE3uXUssONGVgG4mMI5vhGTJLyOj0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9727 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The onboard_usb_hub driver has been updated to support non-hub devices, which has led to some renaming. Update to the new name accordingly. Update to the new name (ONBOARD_USB_DEV) accordingly. Signed-off-by: Javier Carrasco Reviewed-by: Matthias Kaehlcke --- arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index ecb3e286107a..6a6ebec173dc 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -876,7 +876,7 @@ CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y CONFIG_USB_HSIC_USB3503=y -CONFIG_USB_ONBOARD_HUB=m +CONFIG_USB_ONBOARD_DEV=m CONFIG_AB8500_USB=y CONFIG_KEYSTONE_USB_PHY=m CONFIG_NOP_USB_XCEIV=y From patchwork Thu Feb 29 08:34:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13576843 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4141DC48BF6 for ; Thu, 29 Feb 2024 08:35:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17DE010E2F8; Thu, 29 Feb 2024 08:35:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=wolfvision.net header.i=@wolfvision.net header.b="1Ba6YloI"; dkim-atps=neutral Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2110.outbound.protection.outlook.com [40.107.22.110]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9B28710E116 for ; Thu, 29 Feb 2024 08:35:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SdRz0sSq2JKST5OPBMhTb42Wf6b6irP3+pkTWopvQCVPJRGC9LhkgZyMn3Vgzug5JO59uu7f+ie2amb8ADpdPm/omIkOT0zk0kuRJw9+OHBealfmU2m7Jk3e2dYxqMYU6oJpoD4Ea34XdtAAs7brdzMTjWPbFDJPO1RaHSf3C5WcqBuAyW75YFgQHd9GkBdR/NZchYVANFgwo+AfItVXWiNkEU49VIUFKFzDVu2TyjbMmfPZTDpSQUG33bbZNaIYR/suHmDe7zQ6CekpITzMQmaLKDBwSG14Vq/06eVi/ot6rPKLHWsdZPoHT1ck3iqoXXO8C7usva/tXghAyaUNMA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ds6itwYkR9TL4kKD6AgurAEc7kv/3VVG8//qRHS0lNI=; b=mMAPVqcpjbmfeigAO3MJlqW95gIEzZjtO9DM24UTKOaa5ihi4HksoZ1Mi9yvwh1A56jykgfHSntw3bElr5SSK8ETI6guQge7YOBpTcVRMjymcOqXaw8PHG71xTF53XnnIBWgfa/CxMR8kxPJ06A82kgBiGIcuuinydkvTCNwo+pExyUtlkR7tFUiD1QI8FzBSLyjb2vFeFgmZNXJ18jghHEbCX0SniHV6+Pib4nxckIKK+wxdcCg9JCqKq1u5W35nkSblKaO8OVp21dEn70YegL0ZNAeIZ7eErRpS/bMiFRsc1wsFwq9IN/mcapuqTi1P5tpcrjxAmW7enzSZRg3zQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ds6itwYkR9TL4kKD6AgurAEc7kv/3VVG8//qRHS0lNI=; b=1Ba6YloI6C/qkw+p/9zwIwoiztMQ629o/jBg+9XB+2xgF6rij+TgU89exEVB6D0CztCCnWzgwtuPO28o7kIClzMkqGFkOarQ6sYq90UZimI1ZWchHtuPgpUWLVYfEgbLqHD0XtbyWy3axDCJv9GZxZKGHcUFTeVnYvoMgWva3xY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB9727.eurprd08.prod.outlook.com (2603:10a6:10:445::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 08:35:01 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%6]) with mapi id 15.20.7316.035; Thu, 29 Feb 2024 08:35:01 +0000 From: Javier Carrasco Date: Thu, 29 Feb 2024 09:34:50 +0100 Subject: [PATCH v6 7/9] usb: misc: onboard_dev: add support for non-hub devices Message-Id: <20240229-onboard_xvf3500-v6-7-a0aff2947040@wolfvision.net> References: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> In-Reply-To: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709195691; l=3959; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=vfQGF7yQinSaT9UNhA3JHy0/iTESK+//H4eVSAxy678=; b=GK3bolSX/KFdmigmvWTPqHOLsYen6j6QYuOuV/sku7/6iJPSUwEh7scxNJEaBJapt/BpD0Cbc lYPOX368xBvDYOPnHiEASNSmsjn/2ifwDDOnVTxutOo0RNFrCiU7sKy X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR3P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB9727:EE_ X-MS-Office365-Filtering-Correlation-Id: f0e524da-2d7c-42cc-ce79-08dc390151e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1M6CKcGB/2soMq6pkVS+haxkMOxp8lrYlDhfARj0zG56YGyUAERZvE+eW4Rizt8vlAfQ8/e5ikQHLjh+ss/GK+ngmATSJQoP+Ims0++CFFkbNl4eLMqegbN1IhO7vvAMyr7THPNq2Ne51bwcCNB1CRjZrb6K3azWoc0hk0VvpGaawN1CVoPvsFcHdIO1SMv9pyhZnK9NGdBDFrz/VKooDAuSS1ahkZwGvHNVeQOzle6QZqUF0wmSvdFNPrSyrUd/DacF+l3Xy1DK8U0bDcSFGvV/ttmMSr2Ayn4I0r13D0RKE/9R08su4PFaUlqs1GFkaD4WPdFXlzN+0JsIgEK2G8upNILvUOnz5Qm9jSi2vGAPvmNIIfKnnsXuMHTQaHeBAMrUwSJd4LOB7VA/O2pl0kI+BuNiAFt058nE4Q5gVwlRQngaAizMxzfj5KYcT245zpRdazwhK3QlIzjGy+UEFdOKWisv2rfOBAV1Q7UK5/EK05XRYIuq3euGlrbTPiRKArvVrm4QbBYcjKmbMc9d2JS0csNnxBpbyutsPgS2IXzGJ6QDSiVXXKsWjZnk+KFxKoIx0r/W3y6ifBCvLKjwOx1g7d/CK5dsZcF1YObJpl0N+vj7/Aax9QRQXAc5vf9qBXor62Mf/RzX4wYAQzMKw5BK4RYsX5vrH5vrukPZysWeUx3d02PjdKhHP+pkwl4yiryl39C0MEU73DwS0Nn/K2z+FE0lPW2e3f48kLhwuj4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4974.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?z0bUXt8Jj5m6GvPyaWj36Vj2igrG?= =?utf-8?q?1JItVW4OAN/gnBcIE5YCbUkwkniFY2jIcoi081HUOTFawei7l0GAyhywRNJw0SQmJ?= =?utf-8?q?Y4MSwdfZsdOkgelxOde88nbSD/8zGbb/2ib386Cyjh2YUa/pV8tNh4HuZehiS5DX4?= =?utf-8?q?5sRPz8J4Ynd54DuV8pcE8TUke9LiirwTxLS6tAf2A2pJD6XkUW+LeHbH0RclLztHe?= =?utf-8?q?m+L+dlSyuM4Eh+RYPr0IEkz1VI1aHrWHpvB/TXwbgsdnjrPqlNQ+eCe9fe/YbSehj?= =?utf-8?q?xjQSKwh/1zO5tlgaDPV+3EHcWjvSLKyLhtXs/bJfAHCaZqhufeurIiq27GM2bJQU+?= =?ut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?q?8LEAGYei56Ds8DU8Z99IN41OJkM+g5bL52Gp7CXe/+1WpamXNWUUrhvQB5S4CbYuk?= =?utf-8?q?yWXkVkkr1o452RTaQshCYzgoG4nrqnCYkoMDc3Ta59H+lx/LaKGCBNzWmFNac7iY6?= =?utf-8?q?QpsE0yfOwhO8HdyrcHW1h/76JuFOrcphTF0ynAYPioj8myuBjZuNo9AsFBr+iNYlk?= =?utf-8?q?qfJuL8tUH5oI7V+3w0P1ASzxkVSjVwcA9eTFqUUrpaSlVzCVWCDkU2zh4iPDpwfcO?= =?utf-8?q?1aL8/oTrdnlKDJ5C/LRh2EAnMQ6arP9WwfXjOH8eeTPm2pKQqAG2wMyItMm1OeQxA?= =?utf-8?q?BWDFqyr4cxw/yLIBcGeFqFacQ51MV/KIHCFEOWE4Cvqhdj1Ie/3jSRA=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: f0e524da-2d7c-42cc-ce79-08dc390151e7 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:35:01.2528 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9R7edYZdzUiVWj61qlLlKdUD0z8QsY4ESr2Y9E9JT2po0VPiOzpaRtjFZOjtrcL0ovOwArnk5mLqJwH2Ib0Y1/iD2JVKW6sDkAaJnJpVyqM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9727 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Most of the functionality this driver provides can be used by non-hub devices as well. To account for the hub-specific code, add a flag to the device data structure and check its value for hub-specific code. The 'always_powered_in_supend' attribute is only available for hub devices, keeping the driver's default behavior for non-hub devices (keep on in suspend). Signed-off-by: Javier Carrasco Acked-by: Matthias Kaehlcke --- drivers/usb/misc/onboard_usb_dev.c | 25 ++++++++++++++++++++++++- drivers/usb/misc/onboard_usb_dev.h | 10 ++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index 4ae580445408..f1b174503c44 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -261,7 +261,27 @@ static struct attribute *onboard_dev_attrs[] = { &dev_attr_always_powered_in_suspend.attr, NULL, }; -ATTRIBUTE_GROUPS(onboard_dev); + +static umode_t onboard_dev_attrs_are_visible(struct kobject *kobj, + struct attribute *attr, + int n) +{ + struct device *dev = kobj_to_dev(kobj); + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + + if (attr == &dev_attr_always_powered_in_suspend.attr && + !onboard_dev->pdata->is_hub) + return 0; + + return attr->mode; +} + +static const struct attribute_group onboard_dev_group = { + .is_visible = onboard_dev_attrs_are_visible, + .attrs = onboard_dev_attrs, +}; +__ATTRIBUTE_GROUPS(onboard_dev); + static void onboard_dev_attach_usb_driver(struct work_struct *work) { @@ -286,6 +306,9 @@ static int onboard_dev_probe(struct platform_device *pdev) if (!onboard_dev->pdata) return -EINVAL; + if (!onboard_dev->pdata->is_hub) + onboard_dev->always_powered_in_suspend = true; + onboard_dev->dev = dev; err = onboard_dev_get_regulators(onboard_dev); diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h index 4da9f3b7f9e9..58cf8c81b2cf 100644 --- a/drivers/usb/misc/onboard_usb_dev.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -12,60 +12,70 @@ struct onboard_dev_pdata { unsigned long reset_us; /* reset pulse width in us */ unsigned int num_supplies; /* number of supplies */ const char * const supply_names[MAX_SUPPLIES]; + bool is_hub; /* true if the device is a HUB */ }; static const struct onboard_dev_pdata microchip_usb424_data = { .reset_us = 1, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata microchip_usb5744_data = { .reset_us = 0, .num_supplies = 2, .supply_names = { "vdd", "vdd2" }, + .is_hub = true, }; static const struct onboard_dev_pdata realtek_rts5411_data = { .reset_us = 0, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata cypress_hx3_data = { .reset_us = 10000, .num_supplies = 2, .supply_names = { "vdd", "vdd2" }, + .is_hub = true, }; static const struct onboard_dev_pdata cypress_hx2vl_data = { .reset_us = 1, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata genesys_gl850g_data = { .reset_us = 3, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata genesys_gl852g_data = { .reset_us = 50, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata vialab_vl817_data = { .reset_us = 10, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct of_device_id onboard_dev_match[] = { From patchwork Thu Feb 29 08:34:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13576841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1C42C54E41 for ; Thu, 29 Feb 2024 08:35:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8A1510E2E3; Thu, 29 Feb 2024 08:35:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=wolfvision.net header.i=@wolfvision.net header.b="zHbGC9nL"; dkim-atps=neutral Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2103.outbound.protection.outlook.com [40.107.7.103]) by gabe.freedesktop.org (Postfix) with ESMTPS id DB35E10E116 for ; Thu, 29 Feb 2024 08:35:08 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g7bLJHvjjQ40piKAhQKRsQy2gJXVoHvwlDlDtEVXXFuNpxucEFSgolEAvXDHFVNr7dARu76WcAV8e05DMJwxzjfQom7gWDaLcjX3i/SS1LfI5NFq2ek8i0rkOvFGJgTBwpo+oQbrI6BhZ0BAzMCF08o3CdThBEHShJmwdw3ZTTtarrKtDSi/Bio1uQcnzhZtzFpS1Edy++POwPM0Oato4l9mt9keVCqyjjvft+fEbqo4c+SwMyi3WpAa7JOMA/WgCheFAndYw94mI3/2MSo/K0oYwF2xafszN2UVQzM/o5UPUSDiGA4bHRkz3Z2LYstnqm4sBFXcG1H3vvE+tnKkbw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z1eIx71K4MMtP7thaSHv2tS7Es3S7FuRoV0yOAolBjU=; b=nYVtU+DWjXbemH5jhbIIg95hfvVshUEplMvnBDXzvVLOznAJqzLrooJkpWR0y39Sd6FRaSSKuAsHHcvqaj7iBYcpaXYwDgb3DjcdYbjiDfhPmga5w3/h+1mbkqrHJmbvdGPu97aOaSfFStwOdy/dZMIBQoK/GLxFbib4+2E1gmfi/vuJwtyfV9lHb8ooHR18jK4F8FF23cVKR1ueXd5Iu6PDuwgsfrPXLJAjqfzbs0CdCvAvx0McL73Uhp5jWKOxWzHbcA84H4FDGv3utQ3cxSKM7J2ZLeyg//e5M9xomvwAzG6hbF34t9xU0NEdmL/bZAq97RSkRS6nPQ+hU752pA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z1eIx71K4MMtP7thaSHv2tS7Es3S7FuRoV0yOAolBjU=; b=zHbGC9nLPhhMW7ziAelt9AqlyqPU1jcPG1/OgewqwgjjG4OvW6uwett7B6eZxJx3tPQ6JDBVDONqxoVdkmR4aXiiCDPkvtt10f2XkcGNATyjrEfgmGZzxBzj1rL3LUQIss7UBkpn5GRbtfeb/bwv/pzlKABiKKvsn+81limZRn4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB9727.eurprd08.prod.outlook.com (2603:10a6:10:445::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 08:35:02 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%6]) with mapi id 15.20.7316.035; Thu, 29 Feb 2024 08:35:02 +0000 From: Javier Carrasco Date: Thu, 29 Feb 2024 09:34:51 +0100 Subject: [PATCH v6 8/9] ASoC: dt-bindings: xmos,xvf3500: add XMOS XVF3500 voice processor Message-Id: <20240229-onboard_xvf3500-v6-8-a0aff2947040@wolfvision.net> References: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> In-Reply-To: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco , Krzysztof Kozlowski X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709195691; l=2173; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=aK/tqoGoFX3bOzP7we28NQCLoIDGur9v/pKHCEPg6Ug=; b=lxweYve4imy32cXmiM2F8jOSTG8L4naBn92Yy7D08gBjoT6vmV10zvSuD+paMf3gY6IH6LzaS VJT4YnfvyZPCQv7TEOKiRK7KLqV1s8Qmmr18vmj2WEzHW4io5V7SYIs X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR3P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB9727:EE_ X-MS-Office365-Filtering-Correlation-Id: 8947e320-2d80-4c29-76b2-08dc3901529c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jrjREZSftahjCSfgSE7JJ2JE4ClrlOmUz256PoFKLbLinBw0lImNrT5sSBwN7e9jVD/jlZP+kMpFrmovHIOi4T7oiUsSacsecmsQpXRyFpXj+NcHJuFo2CAc+laPKo8pu6pCZ+3VPTCQLh1oh4klQT8cHVhsHJgsj3J2vlXWgumgsormxUwx1vN3JhQ1M4lw6qBTr9tkC5baFIvFviJ8ZHIzkJpNzIXv6NzzsO8JTkqkys7x9/WMZbZNdc3pFEkm8vIioJOY1YS/fHxt3rvwUnSBr3ghPvzxjekc3sIUUidMpGtI2bijDsww77N/ukRAT4Nut+to2yhO+a4k4sz4pXfs2cR4jI63wU0H0UgzQjpP+7ufjcam8GLR9sNKyRrXsObHPe0a7LX5QGPa81nQW2GmOGqP1WFWq6O5rdQ/H1tEP5wobdJTefC+4QFjL7QiCLIhh0UPFfWmw01iRz9ITB0ZteuSTIUBsuM3f+9fQX09kY/xpER9eqFgs1kEVg7FHJUqrq7BVjsHOrZzB7zlebVrFQzVQ5d24B5P6+K1tPymQvY3EuRDmFb4Pxg2FMJtWbRfLzpAnLB1hruXYiy3IUL3/9JfkOwwyA7cGm/joSYSLCASzkw06oMyb28+sHayg9+odyQ9s8NPGIiOt8Z7B3n2Vvj2ya5GwWvG8tzqM7vDB7FdcEOW+83p0TVu62uxukrFqEI8qmEsjQKZdQ7vRxYzc82rXnazNN2zcP/WIBs= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4974.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =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zZh0GGMGiuW3iTPuXPWqjZDBzFn4JwZasqWJ+Jl?= =?utf-8?q?Eyg5eVmVbQQIPNyZOrpW+5C+ZTVYUSes0G+1am7yjUMJsbbeEM2mnlsE25DG1/WTI?= =?utf-8?q?bAYYmx5IvfXb0D1ucUK9+/tTllh0ovaScV+Vp9OSzRDQGX+Dxyf1EurdOP48Hkl3i?= =?utf-8?q?xn0Wm0N8G+J9kdDz2yohigzMfne1lPOpxhkatDUpVUyakVCZHYuI67YVKN4PguUIo?= =?utf-8?q?NbuiPCOjQD58vgZCaevQI5UKxR2WQvi6Da0S0VJxMFi4KNFSdcIp23UmTRVGynKER?= =?utf-8?q?treWM3SqpU805BW/qw0xH4J9hkCoxlHAeDRrVfI87SuFjUs7ItFHyDeomCaapbG0F?= =?utf-8?q?xWvjYhUfQV7cTqg5zyBdIEZatXXjc0t+VpkydbNKh0EezHMqA7xHhpm9TANICfrOQ?= =?utf-8?q?u0i2Drbp2baoNLUaDYjKZXLMxqPQPQ71ZTbUFYrc/dDP7rVbNFFlRb+gmxE0ewqkW?= =?utf-8?q?OpfNn1FbMtjF4USoEUSggZh/bAOxzlxYorrKo+UTCAR1hxXNImvuCzdCSyzIRI46d?= =?utf-8?q?1vsP4TI6nIcMHWLrda/z/c0YvE2flahk2fDuRTsLt+DrpxJmRP7bMNNeAgtAE9yy+?= =?utf-8?q?Ic0jxQwdENYR9+zMO4FaPptJ2lTC+p3OTs16ag7ZRBMpjazcFccLwywf4GEc1b9hQ?= =?utf-8?q?HkTzh3VywnJMEAOLUVDk/Usz0Sz5mI+JmpE5KXoUMrIZ3Q1MSUJ1Flk=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 8947e320-2d80-4c29-76b2-08dc3901529c X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:35:02.4663 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Lr62E3wHT2O8mkmo8bn0+bwLsU4phLurQCLAIATCmV71vuKmFDtz+RukwSipHntnoZQr3hbccc3UmyvdzfS8lGibyRvsFsxh2Eo84Gc/eWE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9727 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The XMOS XVF3500 VocalFusion Voice Processor[1] is a low-latency, 32-bit multicore controller for voice processing. Add new bindings to define the device properties. [1] https://www.xmos.com/xvf3500/ Reviewed-by: Krzysztof Kozlowski Acked-by: Mark Brown Signed-off-by: Javier Carrasco --- .../devicetree/bindings/sound/xmos,xvf3500.yaml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml b/Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml new file mode 100644 index 000000000000..fb77a61f1350 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/xmos,xvf3500.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: XMOS XVF3500 VocalFusion Voice Processor + +maintainers: + - Javier Carrasco + +description: + The XMOS XVF3500 VocalFusion Voice Processor is a low-latency, 32-bit + multicore controller for voice processing. + https://www.xmos.com/xvf3500/ + +allOf: + - $ref: /schemas/usb/usb-device.yaml# + +properties: + compatible: + const: usb20b1,0013 + + reg: true + + reset-gpios: + maxItems: 1 + + vdd-supply: + description: + Regulator for the 1V0 supply. + + vddio-supply: + description: + Regulator for the 3V3 supply. + +required: + - compatible + - reg + - reset-gpios + - vdd-supply + - vddio-supply + +additionalProperties: false + +examples: + - | + #include + + usb { + #address-cells = <1>; + #size-cells = <0>; + + voice_processor: voice-processor@1 { + compatible = "usb20b1,0013"; + reg = <1>; + reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + vdd-supply = <&vcc1v0>; + vddio-supply = <&vcc3v3>; + }; + }; + +... From patchwork Thu Feb 29 08:34:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13576839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E4E8C48BF6 for ; Thu, 29 Feb 2024 08:35:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D5CA10E231; Thu, 29 Feb 2024 08:35:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=wolfvision.net header.i=@wolfvision.net header.b="JqrMUnod"; dkim-atps=neutral Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2103.outbound.protection.outlook.com [40.107.7.103]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5A0EA10E116 for ; Thu, 29 Feb 2024 08:35:08 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KHtHkv3zge3n+WAu5J+1wbf0cp8VcZ6tr43MxtdfpDSFKslbFN1EqtCmTO2AnoECpzveIPA+1iN7HMIJR50pQgu5iXo8K8OjD22Bu8RZ+LMXnnS6NvvtWgbLFtobcOZCfCIc4w2UiQugsWPsZrUjH1yWLTyFBpCOEUlkT5/vmsq5YnRaU6XCInMJCtrye2hMOk8QW9i9DUhoWHdA60lRhFGgUkvbPbSP+CoNu1G1JWunzdsprBEGkCZezfOjwJ38BtsnyWQbTl2mOorMdlIEuQcNRE92m8cy5NAyusG1m97s3+SsoeibiW5UUbg8Oe+9UKC4Cd42ZIAinxvFEweX2A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MHn5ocpWmJAmqRGVhz3ePJLhWewLoohLm8CGzYNyosw=; b=nCFCSty6uX1op7OiAQW3Lk9fyoATS3Gl7XllKDp1Jtx85VdecWIws7puhWEF4iOwDKQYckStcQGc6El84JBKtJZB0E2WQSpwGIEL3ycOjy7AzIc3gw9u6V8UUMBQNcrzrUBeAk5hU7vBdeO4+K1yga1WelITZR9xkfZV7kwuuDJfLbyAxSnvby+TU6PNYKkjYLKOPLCqCed5aLVXiDyYrzRlYSMf/mF4KjvgCUqRsXRgiVuSK2BtKnlvFVlY0Rfd9CzUFtFCvrK+5zgzdshm1Dme0YzYNh6mebdWLbnrxVenss7x/MNjxKrfx9NclupXa+j1Zhj+6D81FxXAigBmHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MHn5ocpWmJAmqRGVhz3ePJLhWewLoohLm8CGzYNyosw=; b=JqrMUnod7Nqy5UajJXAYcUGLUTp8lAM43kjnOED+Sreeuhk/wyU1AYEUr5Bu1a7DH5joew9m3kS60M6jWFcngVITIwAo7kjDaVnOyVyRZ1NZyox9W6tUEDhXJptTzFRVwIgm8sHQHAHvmDl3auRnNVLcicwejeWMjPW4ZYOCdoI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB9727.eurprd08.prod.outlook.com (2603:10a6:10:445::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 08:35:04 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%6]) with mapi id 15.20.7316.035; Thu, 29 Feb 2024 08:35:04 +0000 From: Javier Carrasco Date: Thu, 29 Feb 2024 09:34:52 +0100 Subject: [PATCH v6 9/9] usb: misc: onboard_dev: add support for XMOS XVF3500 Message-Id: <20240229-onboard_xvf3500-v6-9-a0aff2947040@wolfvision.net> References: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> In-Reply-To: <20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709195691; l=2679; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=Nmd184ZyDSaO4lZ41ELhib4ZiCJSqj9B5C6zTsVjcec=; b=/46YvMbOu17KK58hEp0M5qU5E807lSDvlBZieALqhP59gRXWu75e5+UGvvV1fKzaK9LkgxVOX pa+2zZPd+CwBAOIpkCjSw/Ni/s0QPK+onrH7Uz08c3gJOmJJ3VVvKHn X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR3P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB9727:EE_ X-MS-Office365-Filtering-Correlation-Id: 7167234a-d4b1-489e-4ad0-08dc3901534d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V35S9XbKKBvyU5/DipQ3dac8xX5+0rQwHWy00Yu6plJPF2fJ14SqhJ8awt61tADklUFo7qyTzUSDX2FT/ztNyg6BT0CW2+XSIfPjhH4hA1RsRBblSiKzd4AU+hr8N/cMlsTJMvu4Jywgdj/N9gIAgGCIGD5N02qdDjkLw+VHJZY9m0wvAZQu2wVVvDfns813Jli7bQ42BvzDyczUuMUBIssBh3PtAvLVpxTafMEER4tvvutYoLUHOohOZ/FNAiusP9WLZAZQpx5M0+WwLPPyhwJvhgwbtRnH/2gaBK6sIcujVJoHd7XqnMvVti7i0DURnDbN6P+O6C7XfAgX3+x11MN8TOh0YQ+n++gttp6nRYQdGf7cqn7Sh7u/riKTEQ5DV6sWU6Wd2pwNGXtisTYJuSz2CNZT5cBXWrabajcwb84yC6o9qHkKcrqRW4SJTKSsJ1pBifHZjGfP8PWbKRcSak+ush7+xV68YmX7Tzil1V9mVZwFQGYCjHAx3vmBBSXuHUtQUtROiCABgLjGOym1i4slD4yKB2yXnkrjNUex+Z7kGYBCweGHH3vDxvhDH87dIkAbvVkQkauG1MkWyiZ2iHCUfeg1whONL9FWSqYzxrEJoEjT/Wh0HYlSLYTW13zzjQAOTnR7/EYg7oRm6NyipmLvJF0IvqOIMvaBiBMeZr6orKmNW56hsqQGvLOUZfJXOT+KbsklKbku/HCJUYsHm2AsRsSkZw1Uetg8/0VdVR8= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4974.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LN8ndAqd/xyzjdsG7z40EX6z0i7Z?= =?utf-8?q?E9f0WTx5gGv+dy+U+/e/Fg/tPsVqphrUK52KAmgipN5xA1pQKCeFtqErI1um40W++?= =?utf-8?q?/GF0kNGMKWdw+aOmifGquNiOyfqT/MHNsI90X8VvMOBHBa1MPNGpr619x6efee5zJ?= =?utf-8?q?NW9+Z/oBQD3mEmNxrjf52WcUAshO0FilqjpPeX+D9xcmDiV6B7Dz8GXeyLt9t6buE?= =?utf-8?q?Z7OOj2YyS9vFa1l4jAy6pLjdYf0ap+afJULHque5r7dqNx2qsi3L5XyD05wVdgWbo?= =?utf-8?q?20ystRUm46FDlxXc3vCrXJ0owAQGEC64G9JAiCBsWIfPTAZvJqQFNRt6E8slM0yGl?= =?utf-8?q?FOaGc5vEjUD/WyHs4btiI1V7xzKzrFbnK9KqxamVrJlhHnfTSCNEZJQ8j4XbcnDeq?= =?utf-8?q?fcBDZGo9XUnE26fbGIIjfq9C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ByqY1GYsbFMK0qtMf6Yf8BQiISulcmz919IaP?= =?utf-8?q?GpbFmJ1JMB456gAY8CQiTkqcxj6gt/bPKJYhGYxMI/UV+mKeTmaDZVikDfK3EmC/v?= =?utf-8?q?A9zoRLprTfEjME5ZPcPL1Ru7H/U1C4NOZ/KsosCouRHwQQecOIiwf7+Kva7R42xj2?= =?utf-8?q?1zMJhwOD8TnfdxAZ/LwPZempaJ9BqylKfgvlXLe/MZpWMKOdjfuIX8IvLfor3p0/w?= =?utf-8?q?D2nBTseEmi6U+qgBj1ajltaZqke133TMV+72Wgg9055m3/FWJfzLXbQ=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 7167234a-d4b1-489e-4ad0-08dc3901534d X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:35:03.6579 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6jUxuT71Qo4yv81LVcC+8W9czYZKbiKmK9sCA4sePsdRX0JWLI3Y7HVKFU30vovdARSQ4BAnR0v9s/+hlovz5tstB1tU32ykN+RK1I8QLL0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9727 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The XMOS XVF3500 VocalFusion Voice Processor[1] is a low-latency, 32-bit multicore controller for voice processing. This device requires a specific power sequence, which consists of enabling the regulators that control the 3V3 and 1V0 device supplies, and a reset de-assertion after a delay of at least 100ns. Once in normal operation, the XVF3500 registers itself as a USB device, and it does not require any device-specific operations in the driver. [1] https://www.xmos.com/xvf3500/ Signed-off-by: Javier Carrasco Acked-by: Matthias Kaehlcke --- drivers/usb/misc/onboard_usb_dev.c | 2 ++ drivers/usb/misc/onboard_usb_dev.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index f1b174503c44..ee702448e446 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -407,6 +407,7 @@ static struct platform_driver onboard_dev_driver = { #define VENDOR_ID_REALTEK 0x0bda #define VENDOR_ID_TI 0x0451 #define VENDOR_ID_VIA 0x2109 +#define VENDOR_ID_XMOS 0x20B1 /* * Returns the onboard_dev platform device that is associated with the USB @@ -499,6 +500,7 @@ static const struct usb_device_id onboard_dev_id_table[] = { { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 HUB */ { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 HUB */ { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_XMOS, 0x0013) }, /* XMOS XVF3500 Voice Processor */ {} }; MODULE_DEVICE_TABLE(usb, onboard_dev_id_table); diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h index 58cf8c81b2cf..51c4c074d158 100644 --- a/drivers/usb/misc/onboard_usb_dev.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -78,6 +78,13 @@ static const struct onboard_dev_pdata vialab_vl817_data = { .is_hub = true, }; +static const struct onboard_dev_pdata xmos_xvf3500_data = { + .reset_us = 1, + .num_supplies = 2, + .supply_names = { "vdd", "vddio" }, + .is_hub = false, +}; + static const struct of_device_id onboard_dev_match[] = { { .compatible = "usb424,2412", .data = µchip_usb424_data, }, { .compatible = "usb424,2514", .data = µchip_usb424_data, }, @@ -99,6 +106,7 @@ static const struct of_device_id onboard_dev_match[] = { { .compatible = "usbbda,5414", .data = &realtek_rts5411_data, }, { .compatible = "usb2109,817", .data = &vialab_vl817_data, }, { .compatible = "usb2109,2817", .data = &vialab_vl817_data, }, + { .compatible = "usb20b1,0013", .data = &xmos_xvf3500_data, }, {} };