From patchwork Tue Mar 5 05:55:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13581679 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4F472C5478C for ; Tue, 5 Mar 2024 05:55:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=K726rleSA5mxjpx9XICrNP6ol/RZ/82uwmgTdHIjdvQ=; b=FDPBA+IDk3NpEBGTGmbJsX8HEl PolZgFkYUyAWycQG7dvXYblH4NWM8JW5pE8Js4q8PcTFfFNhxqSn7eWYLQ9O5gCW61fnGUkvukFs7 6vCz9GW7eELWczHzX0e5puQelfygzV1AUAwhSc5yiet2VltBZ+e8fTUM9YSIKcHY7GefXhdj121em Q5plj54dArqNJQrFNma7d4l5Jt1fhRI4cFPJY5Gz2zhNoRH76PADWGxPYp38UcUIqGayhdVU3sEIP hwtQfXW+4+nmP6yzs4yOModwm8qyfJuOV44V3yU3hOi7ry7Q3WJeeXACYgwWet/9yjgMG1D46lzK/ fDgWLsuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNlu-0000000C33Q-1wsj; Tue, 05 Mar 2024 05:55:26 +0000 Received: from mail-am0eur02on20700.outbound.protection.outlook.com ([2a01:111:f403:2606::700] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNlr-0000000C30w-16Yu for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 05:55:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CY3Nv7LTloaJcgFEzWf9Tp/2quB6vQ70W71U6tJCqEPXj61hGaFYe7di4SB1vw2S5tIOcvFDIJNnfnVXaGhvGXe3nAy34KqQAY3l0FCOnqDhssHLfIwWgdvxrOSBIFD6urQA0MEBO0lslJUtVLcakd6XfoygDFWAL8Um2banFOmi6HehFmQnCWBURDiNtdrSzspFibQbK5wASg9XW1u30u6Zsrq9d06Lc4e9ZvYwo85VBqRrf90pZbqQyvj7ZnL8gnu2tFR94IK8JdCfUHe/FaG994YC5aTZ8LAInT7sCQpcdzVGqNI6r7a5Mgvo5RD4GyJ/wRB0M1yZAmNMuaHbzA== 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=ndGWV20JFR2FToBa55DUZBTb1fCr/cpmTlYE5JToOjk=; b=gCVcNntQJrEYla8eXcS724Kg8bA+bOb6sNd5tmuM4r+NBB5NtA1BS22D9untbUxZ4LbAjtmyG05L+XAlS1hHAE7TbgwP5UGlSoUNtxMGA3wl812l23u9KAxzJoZa9gD7A0nJXsyGhvXNSXtQoq0f5aaSatOuJMxSzNHOiOrc9GnGLAdR2c8ebm+7DxQUJzijRviNpTSqe+d+sg+HeifpqLBnhpRyKayUigL+EbOPcG9HwnMu6W2K3qC77SfHkZc9IkYg+NJPG0TFzAlOAoqvJ+4LqVvXq8dz5x7AFyWui6somoStwuoqJvR6U7nVCIjuA/DbrbOz4rCuAN/wtmgUfQ== 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=ndGWV20JFR2FToBa55DUZBTb1fCr/cpmTlYE5JToOjk=; b=YMxW3KUyL4rcohXzNVy/Tl1xqNOFzUGu9Dsd3PANgcAawgrVQ4A2khNyRwwsMGtzb32uax71khc4xmcj0q8Y3Cfd7cCJS+sPa3kZSLABVOHffg/lObaqqMTMhEYtPWsSHF2mg3kZN4zzTqtEQC9YZgWUWwaox9///1YR4o1jNt8= 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 05:55:11 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 05:55:11 +0000 From: Javier Carrasco Date: Tue, 05 Mar 2024 06:55:01 +0100 Subject: [PATCH v7 1/9] usb: misc: onboard_hub: use pointer consistently in the probe function Message-Id: <20240305-onboard_xvf3500-v7-1-ad3fb50e593b@wolfvision.net> References: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net> In-Reply-To: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@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=1709618108; l=901; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=H+bl57O6VNAflIAl80jQtpYIhodjo8aKPSeOFhW8uQI=; b=L/bwN+fxWtNMT/9ln+/ZrlexZ8gxchkg9SqBjS1KV74wiA6PyX8c13gypLcG3+E+383l0bMf5 ADbKupBmXnFDwtPUU4ZSjqnajJxQHhUemjcihyeLs6fnQV7uLnxEwgm X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR4P281CA0110.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:bb::18) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: 71eb3d3e-8d9e-4697-528e-08dc3cd8d1ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n6xpFfFfKSdOJGp33kJFbrUlx9IfB4EgitSyCJw2yN8j84OUPrsoVjIkBd2V38PbmAwra0TTpbOOtnVfb1L0zJLFo/wBMvVeGrVFHWd7+SjXV7CrlTKDLq6Z7Wlexj9WnZOHK/tv5teu6zdtQR8zBIDkKEg0OuLJdVdnLM/yQYnFiesVlvUEV3wq/xG641ZGqnnD/Hvrwf0h3yL/bCYYjwRTyrCyN9Ccmn/3A1HaCcYQ2AcvhLyLp6F6SsRSUxiMq88wEm63Q4Bht7dlgp/ykgY+KtRUK9IHQvUY4THcLVAEsSjhLtzXobirL1Ozk1K2XrLwmBiyMHjmk/paLSLMGYuM9dN0OYncp/ldPtbHic4oIRZohx8wO4CMpUF9AjSjVR2hSH5JHOMeDyX1tZd1bDaLyqp1ESBVr01CYueOH2wAQIB2QKF6RrlaWEY/KcpEQPMr4Izr00aMZ8y263Vh9ngjPGhphLdDIlB+IN0nSgi5Vj4RKhVuf1clwCgXHAZYRNbJ9Kdl7z+bLHE/bfkxb9TCj5OaTjOJo5Z37x60naVxyrgId6W4BO1l+4yvEA+t8h4VFQA7YlkfeDru8qawBMHHJnHZwjKrzecnJocXud0sEvwLOVYnugSNKwvtFFEMqeJPmDfS2+FEQ6rGIIoQ4B8xt2NBKmgZ4AqzgkL0yhrzGeua0qpDmlZXWrHhkIDKfebUVdBeXjfzcXibkOZvH5KbUDJ7D7mgJArcEzE3oeE= 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)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?cLeFLhJj8+O/+4uDdhwE304+rlZG?= =?utf-8?q?DPLzYmTyPJRk9rBAKpVH/TNz6Q/CpWgjLkZCSFGo0kG9TcGi+fSQqm6ag3qHACokz?= =?utf-8?q?xo870URlTKqjEEDbpbd/I35dKTyscx1oxZGCBYhlcecPbqMnC62NX991BVqsC6rtc?= =?utf-8?q?slBBHPGBI5LEeTc/X8WQ+4K9+XyhWmmuuRu97M69FPL7+zATXrz5NgJfFNKb1zUHH?= =?utf-8?q?b1W5iHZ3LSWRvoccxO26oaLlP6Our1ANvoNWLhfc0g6bpAyGr6bR7fr0IgInLaA3+?= =?utf-8?q?XdMZw40B7RpqTY666P/gH0iBz4sByPFVfdwSLDzw/Oom+swXzqGXtGMWbFOhPs1l2?= =?utf-8?q?zVlFkeOgZ8z1+aDFdEdL5F8RAVIS0yhwLEO8cb6mfRMDIOS/flip8zlIMzEAQ8l5Z?= =?utf-8?q?Pmp151+Eb+bzSjFdrYyfcpPmFLBCqFSacLpR5/7krnInMm5G/8oO7lP2UkcQJ+HYJ?= =?utf-8?q?KmDEpfQopuDaZF8AR67xcLhHyU/qfL9rLNhhUWVvrdGcNuaS+yB7dbS91WmL/mEvC?= =?utf-8?q?Hm9tzuhNA0Yi841vZ4E411M139227Y7SQii4XPJj0YftQKtVaZ1G3oySW7gEAVtS7?= =?utf-8?q?YuMvFC/YpQOCwwvsoikYSIkvh5iy6mkTtpni0GLh67JRJgaelPJspD+aQpCMo9jfK?= =?utf-8?q?4RSecDPZTpTFZNnT1gRDJ7HHI6Lz1oiF0gRvCtp7LOctO2Q4NXcv9w4Ya7LAfrzc4?= =?utf-8?q?yS9srMXjy2elogf2dIKBL2Som/NWTmj7U4A47WXBHnNMTeutqWs1HQlZNAsJxhTIQ?= =?utf-8?q?g3i4TIMYEulMPMUQHMy3Kf8pUiYgebPlmQ2HWT13eiNfaKPMaFy5/ycpUO3wdIzXa?= =?utf-8?q?meeSNE7sROLy0Hl8rMcvzd7gyjQaZW0gMQtFlWBXlNRCJbOjeQI3bwfDiq74SYPfM?= =?utf-8?q?bDK1E2h3bqO8NXKbSlGU4oXFep05RunuQBkElNRpSloEUXzIx/t54Jipqqzhu34NH?= =?utf-8?q?yfwEoNEKBt7AS8L0HdVhYNnYesVM/06lBtLZLJmyNf3GUDIuiViJW3reP8vaNpJQY?= =?utf-8?q?OW/MGdVaYM1pumLWeN9GEN6AnZRecUgLAOjm4pMMekp5ea/dYXkGvB7iF5PTcToez?= =?utf-8?q?2M6fnXSc6OtAFa+u7jYq0EtbBG06xhHUgPQCrBw/6FOrAoqz0GAxh4p/ROIDyWNuz?= =?utf-8?q?YwmAkdozQdiyCyC8SCQZq/MJ27zwOdir7Q6ElbZL3NSqDlIRGM+VtJo6L2+cTNvWu?= =?utf-8?q?IGaDd11PXzgA7ZyU0gfBKnaJp+El5pLNbh9CP1t0Tf2agNFxtz5TWSgmYVp3bRGCp?= =?utf-8?q?mIXMM8eOVOt5P5E5N4a4lEw1y5YTwbwKdUHdlWMYOeVTXdLMaQUBTsR6oWkN2ivCM?= =?utf-8?q?m1HZn+YLO03T/++g2de6Jdo84CAqFNjD9MVNPoOdUY3YWJYwNct4uFbSy6y9Y4mlD?= =?utf-8?q?WwJDiVFT5XVkiLy0fB5IGGkLPfMui5gZ9SAHnM2OpQg/MBlmAIMAYPmRWSLuvoXK9?= =?utf-8?q?paeqdAgYo1z3YaJS/EfCVa2Q5iENRhkaOF5ANRy+x79wFwYVzU4jSw47aNue6FNQY?= =?utf-8?q?aw02BSJm3uQu1eD+a3G7CcWNHr/AEogQCQ=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 71eb3d3e-8d9e-4697-528e-08dc3cd8d1ca X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 05:55:11.1439 (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: ZstvgW9HHFWcxe3ZRDfQvJ+LdfKoOry3Vu6kGfjmEAgAmEqAcjeGkaOqVHYq+uBZlqT+cQ1MOFK1Igvzr0Hfew4Seqkvz88dw/BdO9drqBs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_215523_514976_00FBAC23 X-CRM114-Status: GOOD ( 13.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Acked-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- 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 Tue Mar 5 05:55:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13581680 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1CB64C54798 for ; Tue, 5 Mar 2024 05:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=OmcEa8+VmY9Mf8wvbHnr+xDp9e1XeitCjvmgzp5cqnk=; b=lZWT3R9zM8NJn9iAna9vyNQp9L TXEhWFJWdmMXQHVCgu3kvRjdPu2grXa8uJ9nSPFrCOZyXsawtG1isHLvZzWA05CqcEWoJG73a/Fpy 7LMOnGVsVj9qG5ZUxVKF/Ic6SN25Ln5I9j7dky5HW3rsRShrhUQutpBbHKtz/s+H3Lij20sTl3pUe QFSTkW22V7ky7fltsRAgdm2AOXbbtLvaY55Q1dZKEvmlIay+1Yi2dFNISPPC554JeL8m03MQaMrSf 7ajmapmABC8K1+7qHFs1yPTSH+QSztDjOvOT9hUIXjQQsvINjwvB9PU+A7ZEI6VbCipReizaU2+Vi yN8tLNuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNm0-0000000C37N-0gBZ; Tue, 05 Mar 2024 05:55:32 +0000 Received: from mail-am0eur02on20700.outbound.protection.outlook.com ([2a01:111:f403:2606::700] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNlt-0000000C30w-3HJs for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 05:55:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PE5edMSZl5gqbpGCcacbpTNT/a+Tesl6JW0reBAI75R9ixMxACj5ED5DA0QnGQH0t+yovNSrCaTjzh/PoL6GXh7zsL9YliJEKn1xFlG120F3UUkvHTMEd+G7ogthTBK5JrUFHicpgZoP7DXeb1aL8ifWsXcdK17eoUDuLWQNEWqjgM3OuxwsYsXZBSITwFoD/etD6ThHWzObBTMTJ1MPXI6msQG1tWu6Ns/5eSCrJAR4EjJmQ9zhOrSU/ThxKUmUuGbS6YycAKqBBPuNyBZUjvrRjFxFZ8r4bJQa4CTJN7yuSO+R5wmptWM/R8WtKZs7nxPYcbdsEEPAMMfgI23qoA== 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=5Sv/dmBSgR8EmzNvZoJoI/UpeZyuslotiSuh5epalWQ=; b=KPc4nBgsUP8iByYajwS59DspNG0icIWmD8ug/zpsyogN9qSQZqsFk+GR1abkC9FlmJ/L0BzKdS/9NlCwCOQvO3h/RZNZTYNFzFP2jSSJJD4A8qmIC9F5ecrYt3vpCUCoGEChP0lDZp1ZCsKbFrLMFtJqbseysxe8DsNmJdBHchRefS5gSbZN1dFE1qsEknq/DCXOG4wbu5qhaRaH9u9jC5cXDwR/IRD43YtkBujEGNHhztRMstV9TaiEoUMVaqvPKcnXXhB4ZQsAh4fns2FwxVJ5cDIvPzjVcIf+jygdMp1+RYL60RQLSU+kHlsmg8cnRq+oVrW6Nmw0nMkrw9Xilw== 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=5Sv/dmBSgR8EmzNvZoJoI/UpeZyuslotiSuh5epalWQ=; b=Cbyb8WBK12GjwpHeJVcPwtW/9ZIvJamzPyektBJto5zWLIeDCveyi0S6KBxkA1Q1QQbP2SUksvyW3oMeMUPcZlVLd6FJ6nO5NaY0O4loP4ljRXFnisaSlw8VztPiu9ISNxpxFEfwrMgve1dYX6wGM+ur+N/e/oX89lcsXcWoUtg= 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 05:55:12 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 05:55:12 +0000 From: Javier Carrasco Date: Tue, 05 Mar 2024 06:55:02 +0100 Subject: [PATCH v7 2/9] usb: misc: onboard_hub: use device supply names Message-Id: <20240305-onboard_xvf3500-v7-2-ad3fb50e593b@wolfvision.net> References: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net> In-Reply-To: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@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=1709618108; l=5246; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=hLEAZIEQz6ksQuaNqwCOXTPaYxX3asHHadVtJggQpuM=; b=T5f/KljSE7T1xv0p5NsLGsznYGcVQx5F4Vt4OzlPioOgPz99P/cFkqNP+89zQmmQcTjrYxuTq HSLteXBSCFkDBXIJ3zwlNV76pSc1oupnjfUpcwk635xLl/97Dsn+cCj X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR4P281CA0110.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:bb::18) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: 36f1a7b9-96b3-4851-af35-08dc3cd8d287 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rboD1bFAcAQuZiRaj62lC5zPm91b1c5ovRDbPmJOFlLfrJ/1WlnuWyTQ9ep/oJ9DbXjE+ia5A23+8lOqgdP7bzdzoPRjv6e4Z4SSOgYH/4647Fj7cntgAs5arytFHYs7c+duKn6VTBD/r7Glbvry1IPOP9JylOvCdR9FdZcQ/I56UC0HhxuC1xdj3KWitk6T2bSioVVKekhJdsfkE5bxbcFRjmCQMY19IvqCp+w16H4Q0XX4ZSJu3v/TFxdfwr7KD7giNpD0ekYOn6Lx+LlvOlLn9ldRtxmZihhlPdTSyBDFFHs+Z51OY3k1WdNQ8FRw2oNM67oeh6NDR/lcWDPFpZroDdRalqtnpBoumR6x32IOgzVXG3YtJGg3uHCDMpBABC1ld10JvwlvUjxSujmCRcQ/NJlKDP+OOGiLDpcpsn4sVs1rv2ND95sS2da+Md1nWHP4q8OL8ENpmi+h9u/2H4MTMxivlCc8YUuudRk1e97p/9vXeINGDAQxce6q+MQNx9HBa5F1aXh+yl320V5Xh1/4q+uI54mI2V8HrGe1tm0gAj343e0J1wijh27cm1Jy+YRdE7UE/vInRhdJZZGatzTmaQvHvCb1XQxY6RlsH+TqlkRVjEeV4rG+FSZFl5/Xd/GPVOvo3Y1Yue931hvFuClLz2XthB/UWyeSOhF8eZPhoybBHYHH3QcQDNUyi3jHrzut69O4SZcD6kM9y4dt2MdBEU2Qp2g+0QXg9BLz/PM= 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)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?tMZ0Apwc4uylCbZIEGJ4lSkLjKZy?= =?utf-8?q?LjKC2VcmtTReUY4CokU7RzAXFsIZ0lRpGfZOE2/nPzYexnoMGORfQh814P8BhjQx6?= =?utf-8?q?q5glOjowE7IReRNa0K1yyrJKFQ8sbTed+HjoM6zPRK5JLtYdvteqSVdXTr89FrZu2?= =?utf-8?q?BblqSQwtGtKsonc+p1uqHeMw7raVWsDh++M2x4gwefyXUt857io6zWUp+Gffxahs8?= =?utf-8?q?bwWgi/l79nrHCO7Io/Nb6ajImIlVpLK5EsQqRWiBn97ztoYJtr+pmZO9Oz5Tkr/H4?= =?utf-8?q?/L6a7p7zT86LumT+jEteFWtsnpBsHU5xTI91z2G2sXh5yVvXCGJDMGHR4xkZOpAUX?= =?utf-8?q?kxXNHJ197T1tGx+oy26ExPo4NX8xzd1OR5aGnhj4/6B9XoHV1l/bT1RIbAVBPUJH/?= =?utf-8?q?X8AKM2ozcxa/gGqUYaptKtIeNaVR7nc/s25d+hOJRvQCdJpLeKFNNHCfn6n1kVFsC?= =?utf-8?q?9nJtON9fJtr/JTmlwaNTKDshEl4bdUeG/ObsWOlyneqnsHb4PWCY7w4fis8V3MT6i?= =?utf-8?q?vXWkRf9gcepUTg6uVcMXeEuSWlxaFLfiWWw42CL+Ai2yL88B2WzMXC/eBfYXNvd96?= =?utf-8?q?u+7rXYEoJLeDhS+GQAJ4dt65H9S5YzsvTefgWLF3MBoYi0b65CLPv21D/myn50yET?= =?utf-8?q?sy93jr1Nf7G3fa7+DYm7eBoYaZKpYbX5he9okLZeQ8v/uLtVoa1AJwY4JVhmIh6Dr?= =?utf-8?q?D6qF7DDavAWs+oHz2CijMs/Sop+B5jgN1EvXfAq7WLFT5ugyn2MrdheAmX+bR1ADE?= =?utf-8?q?PVcRZx6iL6Tg+4K1WObcWqL7GZV4Dzj3kRKlU63wqVjtkIyTfWh6nUg0/dtdz+LrG?= =?utf-8?q?Ut/Xi7npZIMPIlWTy9u7tAoysEu9Bn806wNVyPfRLO2LQN0rdvlkCAg4UUwQhPleU?= =?utf-8?q?wV47VXm4P/LvXLuA7fNewnnF8KB+0a51XDq157PErn4l5YfkTJj/brm+SFgJIcao8?= =?utf-8?q?dOSMv2LOJ8z/PxBMLB8/50KCeC6V+ppndLIPL21zoUvZD0LEH0X+8AF3Bw6vjv8/F?= =?utf-8?q?+MV4UxD0mhjhhIkJlQYHEwBhqfIdCzKEr7nMVDAs03ElkYrOUE1rq2nQwANZeB6oU?= =?utf-8?q?u3yFgWHYprRC63z+QqetlYjzyF0LywvHHdmmUkCw6T1ZyTln3hBbT4ZDwbyomTcUU?= =?utf-8?q?DHr6OXOg8Lfmtb87U7lEowREIQDa+vKpSo796rOIg74YOTKyfoJ7DDOz8nTTFunMG?= =?utf-8?q?UhFFOdRNGVvhCdAxGlmjLdlCtCBgYMgmJ+Qcv4HQa0fRkzqmQ1S2y/aq/i0yJMymv?= =?utf-8?q?uCszvW27g0PpoSZmuhEEtmSKaW/PPjDaX4Toqtjb43IlnSdk8T4R1Of+x6eecIiMG?= =?utf-8?q?dSYvfs52buCeuGUXpp07Xfd5wHgfuKbPUBeag3k2yx0N4F+zpaimVssyKcZFIZyRK?= =?utf-8?q?pesxan/nGeCbZQyzFX9ca/+PZ7itaPYZKwG3e5HjdU8nqeZdVejVHAuZdngfQbsCM?= =?utf-8?q?yaE21o45xuf8F4NKjv/DAgDIfaNoz2nSXZuxUqHNWsmjV2tEWXWnX/NSogaqykZ9q?= =?utf-8?q?GeCKyc12KAlUhAdDoCXVqYpDaY+FthByTw=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 36f1a7b9-96b3-4851-af35-08dc3cd8d287 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 05:55:12.3468 (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: 8LzEa8zdTRI1A5K9kqGVVGQ4iJN9sgFU7pd4CGgH45sP6YTl2E8GnA2aZw38rXcmfGhVHl0Nmg1nc5z1izM/VMdsFPdPJ30KQ0ujBJhBJI8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_215525_864740_E4788AB6 X-CRM114-Status: GOOD ( 20.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Acked-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- 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 Tue Mar 5 05:55:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13581684 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2AD47C5478C for ; Tue, 5 Mar 2024 05:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=VTBQWdshyPh/3VUDOIlVujCN+dbVjEBvOD1V28qXScY=; b=WHMlcJQCfXIYXusiqFqpqDdk5J IrikTF08kAW6RJ/uLqu1+oHgRZgSufdbRKDDTVU8ix3ratXc3SNxN0HbEabBYnOk6MjHS8PMsI7j0 8xKj6aKIspR51ZrAxap5i7AO0FeWBBic/c5UTvvE9TNi4Rhq32Rl2HG6GV9izSmJXgxWRBRU3K8lA U1mboteceLBXvUhFKJ5ifd9CyIw5km7djcMQkEZ6gtTMpr0hTnOzkISBJ95tM5jXe180D8Nq8AAhQ KUJfB3Z6jp8+Kv7lI9xNz3Q/ZzyVqYHXnuDQhGQRf7uxd20EhjtvuKg+1IdJd8NQLu0x0Bub+CEYN tEN87zsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmM-0000000C3O3-0AiX; Tue, 05 Mar 2024 05:55:54 +0000 Received: from mail-am0eur02on20700.outbound.protection.outlook.com ([2a01:111:f403:2606::700] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNlv-0000000C30w-2tSg for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 05:55:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c/O3aPeoPOPh7sBUHFgntGogxxFruamImB1Rx0Lb6Bd5jvDwgdSCO3n8LLekxMW2w27SDcSxj99CLP8a/h4ofpa5i+JjzqzECnBhDcAHHl5/jy8lhqlQz06IF/cwe4Zl1+Q0OLnp2RUmNcaZaaKcr/F1eoW7DZIVmmKxJVWF7Cs/nr1HyTMtKqx7YoCb9ic5MalF6exKkxFwfQUFSNhjtul5KGTAVFXFdYmeRN4wwOXwlHHPdBqlEe8AIVSxuUztotX22CKi8Ie3hxnZG2sQMLUEc52OALOg7qAp9gquwQ4uEUgstSxuYnfgybdVIA3rfUMfQqCOntZkxTeqRdHD5Q== 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=kH/FV/aniOe96OINZx9QmxJsFeg8Zf2fzNrjgMA7/d0=; b=BvFjnoUzI/RwwmWkaYiZRdAdY+5P40Wfvzu+GS7ef5yEeUbuKAJa1I4E5kxsO4xXlnYGEmh8JYW5pwoOCSHGtjUKE+TbAo76e3Iv+QNAQ1kYCah3vxjFQB48SK+hF0+YayvSoR052CrkztlzQKufR3j1/sM1ihqtakMCBPLeGcuGLEoVeC5oMH5SyfHw2MpqyigpCKnKT9JjPAWl/QIZox6QcTIcLaukNjJyAZjf6HFpE3Gl8KhqmNJ242hdjDKnFy/gA0WHL2z7DR8cufpwSOvhq2jZSwl5lAGQsujrNyq+vGZwKHPirWJnTAJP0rR9RgeM2Z8CzELZvaX7+lGSRA== 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=kH/FV/aniOe96OINZx9QmxJsFeg8Zf2fzNrjgMA7/d0=; b=lEZOx64GFvi+S5wttkT4zxb8NrgBNtqKMLP//cYHXW1Tho7keIlUCHrfJObY4qRR3R7S5KLeng5mHeRCRKCw45sX8J0BQFJnHhSewowxHydJg5O7hyTuNQL2FDEM7kn+0Uj8prnPkHQh6Dzow+aAbF2bAo9mfeoCdr4KqlEUyKg= 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 05:55:13 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 05:55:13 +0000 From: Javier Carrasco Date: Tue, 05 Mar 2024 06:55:03 +0100 Subject: [PATCH v7 3/9] usb: misc: onboard_hub: rename to onboard_dev Message-Id: <20240305-onboard_xvf3500-v7-3-ad3fb50e593b@wolfvision.net> References: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net> In-Reply-To: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@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=1709618108; l=45953; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=r4R5Kgtl0rWmdeo2iAh1lY8GSO27edNwKwN9DBE/qlU=; b=NrX/4DP1z7jtXmwznzYXisXlzYS+q+gNDZej2f8uxM9ZlOHGhYRRtjaJbwfHrTT8UMhMEUzFH i2kQDv9DMIdBsIKQKQ+j+G4yJm2rwc//UNw1tGWwIpHUrZyIqpExb6z X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR4P281CA0110.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:bb::18) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: 56c1eb55-2563-475e-0d48-08dc3cd8d346 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6ots9AKYdIQ0d+VW5YkOKXgswQsg2/RcHbmb+GSYuE7tJ6rfioxIs/XkbRiCczwnGun3vkcoSoxdar5vPHzbzx0Gui00nNH17/QTbdA5mgVUvFdK2UhLsfbucu8ltpF7dgDr5y+3cDJcbmctAEpW79zSaHaIp8mGsOAikxSgiW3kEGDFhjIUpOwmv77snh+hOlecacqawMRGVBt9MQtXjbLUpskjpGE20b25Dwe/bl1QhGlaS8n+OA/+hyW9oZ2t3MpddDILYAJKV5J6tyhfSTnUv1m6/zrFrGicqb1qKwTam9sB/PUK1gl5YV13lXURtHRB8xPFursMtfL3syTZGFoRsI4ReEttcrFgCTN2nYMMXH5yWDpadFXpm++2t6hvCSgfPpN27hnMY9PL+CQPx7/ghDMnOvGhHIkR40NbEgmnQY4F/J4uU14Bq4ND64O/qHpzUqNfSQ31lSWZZVe+mCwa4gGGcrkZc+83yahXdYMsAe/hgxOj6XGdi0d9CYJ0xIs3x75brwJks1IngD3AFW/Qn4A4yODGKauLHy9GkNQdo/iyCKqkG8MtvGleyxG0pkbYaYyVk89xXm0blyYMQf2tamqL4uwqnwomVFBJYZJJObHdmAq8fQIpFe4QAE2T5+pgcMFPjmYep5Z9D+uyoJIdQ+gFAK3F9VITIcn/++VyXSlUptGugEQkL3wAG84U3gHHzctOMZPfHUAiIUgNfztO+oA4vCLL/0f07OrNY2Q= 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)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?jwHfIa5UD5zvTmSBldEv3u64IErA?= =?utf-8?q?sm29rbq02/kHCtOQijI8lK03wopPr7z6G3iEwPvrPiqeMW6EqmXuWM4+N+kwRnTC+?= =?utf-8?q?bITJc1RAyoxIqDbfRzP+PhGYwe/8RHkphAXDQPkMlxSzWuCc7+DyedMdAGVXfTTp+?= =?utf-8?q?v8hyFXhlfSZdRBEIia23P93FRwZf8kL1cVd7NBNeHfLrzNyHNFuIoEQOBRfOec8gx?= =?utf-8?q?gdUYS1e4CXVHNXXLQmrRT3VBdlJPKE8HhajWjDjnAdZ0/mEnHTwZRi9hubFE5jXNj?= =?utf-8?q?2uPI19r0Qv6+09iYytS6FzegRFrd2NFOu1Q9iOZa/VXDLCBrmWHyb0H3RLneYRm/T?= =?utf-8?q?JgRD4hV9C9KA2GRm427h9eoWiz3FOqjRb8uh8C9C/vaw75hWsF81FtfeH0n+hSO9A?= =?utf-8?q?yms9alVXSTSs73Ceqy0v216TUir0ekRniaRGl8ldstayLx1IOmcuwsfQrLnW5XZ3a?= =?utf-8?q?u4HbzWn4BCMdYpu/I4CVzS28F5ugN/6wc2H68hgi/HCES7bF4x3IKeXQjHKX1VskU?= =?utf-8?q?Hn8+F5l47fIW6WUrKQPsc2v6NmBtTqKEzUG2LllxoV7sfbc0A7dGbNl/4zjksE5Oz?= =?utf-8?q?4qpfmf/tp24/BMflVob1cJTy8Y4SMDAV4aERLjXoP3awmxgH8cmHRrC7FAexuQpmF?= =?utf-8?q?ckaQQ98hhLNkZ2rq4C9UkKCKgBnEhpm4d8zAiYFgFiavJv4sYCwDZl6mbPRE17F+9?= =?utf-8?q?R5wQ71PyOMRdvV4v9vu4/qrUZK+ewtkhnPwmewczX4w5RIAhRIUtSQeq7JvxxgRwr?= =?utf-8?q?7AR30Rc7wTV4jC8Mpw6dR6Bk9uDRUBzNrRoo3fy2fzBY77k5B0Dlhk4rO96miiYt1?= =?utf-8?q?FdMvNx7OG8+Xj6EnXUVIE/Hq4kSsYSXEOqo0wgZo8NGY0fVYLF73q1arWdiLlkXn+?= =?utf-8?q?kPoDX6Cp1lGXTpvkT/OOQ5j/9oNt5VUzK1+6nsl+QfzEOTZUjiGaRfbyeJL21kl/k?= =?utf-8?q?5aW5rp+S4CzHwasOpZTYYwz65Q9MuojxBtj02t7b0Zg8dzzFH7X5yh3cvvd43HaGP?= =?utf-8?q?01l3ZaQgO0PPf2K24HUCcQSiEaa6KRH0Cn3gHJNjORL1eX1+TWKz4RglyM8PA+Atg?= =?utf-8?q?Nzh+wST5VE7Ev1PfGarjlrX6sq2FPvUnGL5A6cmJM4l6RFibmFAwtfNfoO7Mh7tEs?= =?utf-8?q?dX9ghLCXzAkcDuL9I80zQ5QiWDRBgLFPKTvygyWb0z8GAAGX0ebiGE89J4SVg9FFv?= =?utf-8?q?+z4ibWRRlyH3JVgePq/GShy0C+QOYHraX7kZWjw8dJ4+0m9utaQnJp/gRUucLk8iP?= =?utf-8?q?BphyipnG/hPzG8N6DwtukcgDx4YBGZm10N1Z8xabEVAs8xZwWISwfM6DCokKWpBXi?= =?utf-8?q?xe7FjSyaff++M7/YY0AwSix9HYogTXQPElef962szzua8QTw/ZgEVc1Nsh1wbjVCJ?= =?utf-8?q?icGNMQQX9Rpjr3XIo/U/ePxhY2boqqgovGcs5TEckygd63QlPU/i9kNsXOjhtRixD?= =?utf-8?q?QbOssCGLwLyi0x/zOmlcctWzAwfaJFaLlU7IGK/O+KtjY/sCLUujT/XSEKg52Lv3Q?= =?utf-8?q?lCxP5mKWWmP9XLhdQnW0bB2dZKUQA20v0A=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 56c1eb55-2563-475e-0d48-08dc3cd8d346 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 05:55:13.6463 (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: jXxwuB28Jk1+X/2JDg4lU82HPaSTzeebQ4L5h6SqpmRqKf/imqpQKvwewqaS8wFLzQDNGv3u9jXUVDHAqXlBfHkm5pHyQJ9yZuGz1uVdj6E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_215528_326459_739BC897 X-CRM114-Status: GOOD ( 22.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Acked-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- ...-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 Tue Mar 5 05:55:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13581681 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 CEAF2C54798 for ; Tue, 5 Mar 2024 05:55:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=+lI41NdBPsKooRKJaW5ACPVQ0dRzW0UdkW+ECEL62mY=; b=AJRXX9G1KItjG6s3olhzJU8w+I VvOXRUAmqqtoVBRFBvzU84fso0F/U2PuZDni2Lv/qJTD/L8xGxa7zB0qI4b2tcX8H046PFy+Z958Z pOUVKJk4+7AG9F96+12d+yZHQV26zpOlOkqYUvPIvb4M0LNlnl/hFyC+zKLAh4N2fTHc0yfa0AWxW vQt5XFNEHRniX4mFZC4guC0OoS/FzobJ3jzpbVR0Zluz0Ph7gs9ir01elnLRtSvIfOgePv0pWXemS 6C93dOZO7OlL8lqKK2S7hkpEiPcYJjNi+Xt2vMEI3LAcuZUL3JEIP5gJ3ixs+khXxMG4JAZv2XEYP Jw9inY1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmA-0000000C3Ft-3Gzz; Tue, 05 Mar 2024 05:55:42 +0000 Received: from mail-am0eur02on20701.outbound.protection.outlook.com ([2a01:111:f403:2606::701] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNm1-0000000C33X-0Nzo for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 05:55:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UtCxuMNtuHUTXM2DSk4eer4Nu+wQ0/voJpNcc1p1t54VkX6JLWfyNHuKrcL1sOzQcbTb7NyDUQTE0CXDM/dO5JJs9LL/rGUIM4NfaBstuRoUjPinaUnuX2uASOQ3EsgMsZKLKG8+uo7LS6fJDpUHIBTfGpXxyBZHUfl/c5ngOpCbRGOT4jVKultI0fA16I6Lu03ctSaPhlKhLbxUzaQgv0dP9b53Txc4y5RjEAfBpgjeXfAl3+Z2RzJif1c2QvpU67GtqJpJC+Jq7+hdW6PnvW1F5pEaJiC9I0Y2YMyvnkhMA9mOySjRxjNROPlTlTSbB9ET/SZAPMhB6FM2Z+LKSg== 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=27+M+LbDLnHsClzqGVg0LPstQNKuBSCxXcEAn92RFTc=; b=RmnqY8YLZzzImKdyxKzS6URLzAhAyI4tMDaaWRZ1AksA5JHbjy6GE1kGxpNhKNeUkR+gTzlrrA9nCMDg3j/nQ3tHie8hODGDLzhmo71MKvqMO9LHGuwdpmgcsFls4bQsN1+K4IrjtuKP9O1C23KMbaCrWVsyO+qRRhonqsEbeUniKLNOc1owSW4uJKdw24GdxIJ8Ekr+gMtTc2tIARAQVDAYUoVqR87qXDcp2hia87RoSawXk7DsWW3/ZTczH/Khk3mFrB9RpNcsAVH0HMIfPbxSsVVy5S09hkErrLHrprWyoR4eyEVkHCXenRVoK9+zwvoxsbkNqKcyQDf1p3xXpQ== 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=27+M+LbDLnHsClzqGVg0LPstQNKuBSCxXcEAn92RFTc=; b=Er6TlnJQ9EUUM6UAe+Q6j8/Cu6xPutxbYJ+nuu/0ymQAxmYoChrnbkQMqEugSxnanRvzvYYSE1Da+KZf6zsywbV2mpv/kk9QQEy7wVrgCsqWcWA7/C955Ub86zdPZEgSo5O0URdthZY+Wf5ZbY5Uz+qa9seoJpP6RFMRE6w3Woo= 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 05:55:14 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 05:55:14 +0000 From: Javier Carrasco Date: Tue, 05 Mar 2024 06:55:04 +0100 Subject: [PATCH v7 4/9] drm: ci: arm64.config: update ONBOARD_USB_HUB to ONBOARD_USB_DEV Message-Id: <20240305-onboard_xvf3500-v7-4-ad3fb50e593b@wolfvision.net> References: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net> In-Reply-To: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@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=1709618108; l=1103; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=DmgEWOcnW+zWzi4DnyV1Dvia2Y3q3WjzCukDR64EU/g=; b=44BjrUmLz+LlI0tSsIhwL+gpzuLTE9hoeOM8nhwDrQKrqBdiG4tyH76ZysfDaJUM++Cs3WxEL RM1mwJ2Zj7QAa5uSBfrXgQr39l5iaHC0dHMYfApJhla1KGKh1+JtsLS X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR4P281CA0110.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:bb::18) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: 350d97f3-c8df-441b-0de7-08dc3cd8d402 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lhh8nbDN8KnOcmVXahBGc48xRVM+zpYvCN1elApKNAcDZlT8+yg11BfC15HLydtXPYYgGv+A7x6skOtq8nbgdfMuJ/Nw0p7SXl8tAh8185flz8Qe4Vjdxwuvl0WDRiKZQ3asdtWALr5Pk8SCGfWJ1xzyWATufxT03msRUysfx2jVE1rYxsp9T2AfHCVtTwdgKAS3MJFg+n0bgGqtLJGy82vsce8E87KTxupxVHfIuoxUzw0wvHHGHjQxZK62JcUzMqvxgCBNqslK++5MQ3GPod/MXePzpp5f1/UDndzD6w0xi8NIulQIEmhHcKSaWtt9H4p2opEyUoxCm2sKUZMBxvSKqUomn1cj6bvuyVLKiTQbRS/17A1xBBHN3Ji6tRrUw81e+EO4oqN+Fz97xJg0YVKuZeBIneRp03+ZC1RFrfbnigqZwHFHUiW1Hc+rEbFdIvZT72kDpgY7uo0Gfmvafj9Ioox83vIJq+Blv5LR8lJwSslUMYiEWObcnVI/fq4vID8XUzyTEWJR14gqERYtuvy0mWLi7Xzc+oRzywvqFsa3ZKfnCI9WFTkCe4vTt79pNKVAm/6eFi05Z3umsBw4FXRtzeIpN2FhY94Ey0NBg6XSzXxCUedcYfyxY7SPJqjkvs2h9m08HmAB76OgOyRtn6gbrOj8jexL0GdLJavGM6Uc0iCg4vIjKqyU+mvp4sluS66hslPBQD3PJwVEUoUavMwCLkebKBYwvFM+IHTz1GQ= 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)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?h7kMmbXrdpDTDDLCVp+Jgt6gVnBT?= =?utf-8?q?T9gt6QdqDzQQ3rs5dk+3Wob0WlTnclhQgmOEQeGZ/R48f+5m2nBMEMpBZ4Kg8YJ11?= =?utf-8?q?+BK83mgqWKakghlLpbcRf1JQjhQgkVBGJuCoVH+Mf2yHKwlf0p9vLQgVuGG/4r8X6?= =?utf-8?q?ADg7wSM7dQWRgad0r2OL+CYsm4lzcCZ8zaQUwHxc1GilYXnhA8Xyuyx9JG19qwnfs?= =?utf-8?q?bpbnuH+mTJjy0Nw0I9qOAXVY87ce+hbYFNhM8QakKBJCZo+wEM8OZ3e+0PrMIlRRD?= =?utf-8?q?Os+BJXRp2mtQkGl6iXtdGbfMPtF2jPbOq/V0PGpGlRpLQbTPai+Ag+HdXp5EPloO7?= =?utf-8?q?eBzZVlQAzC3V9wsMGfjSZnzE4IW/26ElLLtVVUSAMjJKnLBFp2JuFhdGRbnhy6SEa?= =?utf-8?q?3cGMtm0e8e5aUxR4UhGpIChatQQ7Rfq1YEhTw3gVASkxLjwDHLDyUzP0QZLKmIiMb?= =?utf-8?q?ctfOvLY1Rh9JRxYf9qtCgjc4WYnyFZX2vcdjh2OE3gXZ7IG49zZXnfWRDtRQVMd5z?= =?utf-8?q?0tGaZnKhjgAoPJZ7C5e/svh2t0riY/jTwKHsWnSMfrUrc56sLk5stVxhuy6FiN+1Q?= =?utf-8?q?04CoalWeoTHXlVW9vDgC3hxxJKffh8nm1MoV0TNvxbDrawy05VjXtu4tNAQmCL+GT?= =?utf-8?q?5+BoHpuKtZo4SDZabmMyVwCHav5VDRJyt3Asu0IPRtlGuVc0MilIzxjxZ+YjRlNmL?= =?utf-8?q?pd1hVWwdxrPUabx6mFvLfE6AjC88ueaeWn1u/SXy+dPJ8UaFZjccPI3Uhu/a+9Esy?= =?utf-8?q?8QYi/cQcC5JG0qvp+SV2Ey5ZLrv35AxkTL039b5CMUxZD68m8KRMJ48YKcxy0YFF5?= =?utf-8?q?ZmHOsEn8Ift63JG2LHWKC/6iB9fnSEmhCVFydVm6txn+xYakcU2m3sEjahbXkAje2?= =?utf-8?q?AO21hfRlNfX2rQpBIlYujwILhumL42KE9XztwKrimMh1PCKkRom2QPhWYZJbk8ulF?= =?utf-8?q?mfiEOrUu3w5yFH8qLd/qYFoUoQPCGca6x12nYIT4ZDaze3yWFUEtiBK+N67Rwz58P?= =?utf-8?q?flnaNMSqtuUu/hScLWuyvS+eqgxagQaWoxy1MEy6RPCV1Qhc4Mpv4+H6k+9yFtOEH?= =?utf-8?q?B03U+xRVy3nvVx1CXpiMTD9cRjZYURZaDrLBoOJqyL5H70c1aqSpisnIzRbA2ygSP?= =?utf-8?q?stH+bwjXI9MRVme9dQRrq8X1XKUA0o9VTUUD3yCBQNovxrN1qNTPjrUVIgerOwJYJ?= =?utf-8?q?qSSTZCMIdPFIoPRklxAyW+GaNEg27P1fhaNEs6hm8yIG/+Bhnz757iziROfa1CDUH?= =?utf-8?q?5ofA6v5XpPSgPrjBYLRkX6BR+bBXK/M3Z1RhD/3LJlQa7Sr6jGOb5anPAE/TD/bBQ?= =?utf-8?q?KcXxMQw/NSnnSgSdepoqC2KJAsaFY0WlB7EGuuu4rVWpCuwZUJS0Asvbbd9h3iTth?= =?utf-8?q?gDs+QDfJllRdr5GsQxRg8hDIdRWgZDKLCrNB/Mf3zWbSF2Rc9v6cCK/rXIImbqe4u?= =?utf-8?q?DgvnPkEWB3/V9gkwbKoK2HZ0X2o4grGojfhUEYKGore33RcPp7ZaN/SKysGFf5Z/7?= =?utf-8?q?SidUVILiS1b3cQDewn83dJ26TgghJe+TbQ=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 350d97f3-c8df-441b-0de7-08dc3cd8d402 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 05:55:14.8136 (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: 992ZxmpLcrMrU/sAPa7qnG6ytd6Z67zPfVQms6wpBBBJip1BwerCsZDuS3IMfR1po2P/L42XogoP4KQG8+VLqBCQk8Oe7sPjq2e5YltsHJA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_215533_241828_2E6AB2D6 X-CRM114-Status: GOOD ( 11.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- 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 Tue Mar 5 05:55:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13581683 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5D8A4C54E41 for ; Tue, 5 Mar 2024 05:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=X6CESINs0mkftQ2+fUfwqRXLKCQh75EmImk52YE/1rE=; b=z0Pg+fRSH5JKfb74gq2JJyyjBW BhTuHyyvsihjdrYzvXWqUddTGKO78ZPTYHO9UhA/+bpw9GGXs6/q8TmqXLaq+X62vg2DNtD6A0ti8 gE3iQRga91Arfn1Gh/sZZlN9VfjBSzMTYeLhGyExybf2Vsf8UmW7BuRFB6c7/jIn3NT7wo9IrDHfE cU+LEe8Fw5XtU5opGYPTlsCWEFtZAjHuXEK03H3ZTv1xiMvpW1gSSMNeN434ujHet5tMc+NVjUfa8 nVmCVm71jpKEWfuQxr8s1VbD0XdddOn58XWKC0bruJljliNWvxNzAI6kodQJpUJOVEvOb2Mcndrju eclxmvKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmQ-0000000C3SE-3jBw; Tue, 05 Mar 2024 05:55:58 +0000 Received: from mail-am0eur02on20701.outbound.protection.outlook.com ([2a01:111:f403:2606::701] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNm4-0000000C33X-0Qdb for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 05:55:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZN0b+4R04apOwElQScN192xqZwU0psM3eyM+Iau9dAPlAxi17ymoynHcD5YVdJkGwr5v8CSkAYNSdWTipog1pvvoYtMt19LsmTvlb5/TE9uAsqDXxGWqd18E383HvVwwHQAaFrY8fiWzWEUseTNq7drrQIon1/mV5+R64RCR9g+vG6153w7HUZPmvZeeWpKZ+E14cKKADsC6+ezLD7c/EHt6d+tPl25OjC01UyMX20pPu0F7Aqfr6YmRmkxhzAKsgmegDD147/u6An/B3re2Y15bxSJOi+NCrfPXOkZLQRXHqqqZkSIMa64poxFMJ/s2cv92vkk7sx4u2a7TedRlEQ== 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=VnznfALKNm8NKge9AbvjBDSpkuRc5Zh/lpHyFzoaKZw=; b=QTB/JJXen+tINKYQOs8tJiZhlVpOzzCUqpZyecPMHkUl0Ybwq87B+QrwaLxt+598Y4IJxdhW4g0/GHfJS1hr4X0h+bHwOKFLY5h3BUMDaOk42UGuQX+3s8A58b1pP/1+TlSitq3rvLeFHBWtNpq0TyDjbWs2Jvl8ztqOhti42a73y2HppMjbzOBH69I/v4ntYiXIBo26IBWbPmDxm6TCEF2mk7OgiAS++z2fpxqNWckimnErVn3DH33Cz2E9AEtj2JIV2J+2KEwcqBe8qAYmoe/FMMCPsxLvtk+B/5WNB18CF8GN7EvTml4iOv27TLqVJwv41Zeph7H65tk4mPiM/Q== 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=VnznfALKNm8NKge9AbvjBDSpkuRc5Zh/lpHyFzoaKZw=; b=J1UAy32XqVduD+GuijQVUrnsmlYdXOhfRzgCWCiZ/TxkCOtTmDbgKV4GZnnx9BERXcuxVP7DvYPktC2nHixg1DmsEj1TuxI3PpNEgsLp+A3vrqhHd8PBSeZUe9tmFv9ts0qfdSV8iltY7xrm8d8OHE9KLh+Yel4t1vN529Wn1vM= 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 05:55:16 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 05:55:16 +0000 From: Javier Carrasco Date: Tue, 05 Mar 2024 06:55:05 +0100 Subject: [PATCH v7 5/9] arm64: defconfig: update ONBOARD_USB_HUB to ONBOARD_USB_DEV Message-Id: <20240305-onboard_xvf3500-v7-5-ad3fb50e593b@wolfvision.net> References: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net> In-Reply-To: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@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=1709618108; l=843; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=r21yUYwV8jx8UcRI3ydIC4Hjq7kpknUfqPyczBg6Q2Y=; b=p1CZQ3jtBpb3u4DiMvOxtP7YnER9nNvph5d6NqEfzN/frD8yEGVnpdAIZBGIlLFKPcg/71lRE +VpfeR2j+vWASUffZcwr2zCQswJjXg7bEVlwjS+o6S4hkFS8YCSPUN0 X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR4P281CA0110.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:bb::18) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: 75e6f86e-f674-42d2-85c4-08dc3cd8d4b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UaN/vafiEV4I2346GNr9qFcgRUEs78AHhXLbfnZAdGVt2h+vvk4Whvq/xYia/PvolYpSc2iOgqatuRyAMnmyRQLEQXE66baaxTUb4ee0Nzd0I/T9cpjD23Jq2GzVoDh11KkDg3cZxV3VuiYDcF1FFmh/xW8Zh0ZYdTOVRDGje4rQjalYNt1tk83AQisxHQ1XCjN8YtANhReJBJbQSoq2ih55iEg9Ub+/ghcSdvjvujyk/SmWVLsUuDOhkaciSOvJEGD0v+lzvGd+5X5Ry6vmrJdQdcAnfICsz6bldxyBeUKta/wryfy5JO7M3mvqhI1CYO4GcccSJjWPvceS//cUbXXif8uGW1EhRa0HIJ1BliwaMqxfHNeSGGCnC8vej7ceFWLQGc1ukRG3q2gtxy562CUMRpgaCrDoTHayVzkYcvR9Z8kmitv0FL7q3A4PTfAwdx7w+T9Cz1sPjmjBazKEeNNTmHy0c+ZZ+eUFjbPNVLawkWn8u/60W/1Y6/FTMzj0wXD4sWSCV5xNbEc1y7EuJaBM8jdo9GHZ2KQ3oqBy7nGTVzSxpeSzPY1oDk03TP2N4cHD/TzWjspzZa66AbmVGzK9SVarrj9jCEsKRBLRStdTS4LGikKMGZJ8LMgMMLYcNUvMdQm7nXeFMqShOmfmF+i13wFEIMIJjbz2FN2scdx/1QvYfZKIngd2zfyucvf0yGsfZAFH4BK9HFbl3izLjWb3ejld0HaLakfl52PYSIk= 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)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?zb7lqWswOMiklNmbwDlKXSBpgUuI?= =?utf-8?q?edj6BCk8wQuEdpegFfsMUjbuu4t6lIlxMM1PmJAmY7n9KS2/bkfUPm221BXUR2t2Q?= =?utf-8?q?dmZTlLw/R/aXWCYWuf5iz9pMkJc1q7NRQbAdAS0QPgvmzGrJbsUVKSRtJZzV7I/Rm?= =?utf-8?q?HZ42yTtlUHNPKeIEodZpm15x+AnJ7LeQNJwQqPBnpU0yOlTerjvB+sjxaR1JH5tEM?= =?utf-8?q?BWM60eXwfuGzY9DgQL9pdVp2c9KACkp8VldOkCl8LEaS8xu9c34bfm64/xCYrZUGy?= =?utf-8?q?tPYy/rCfEWz5lZeWQ6U5S419YG1PxsrWYhXmXNIq1+8+PDmOpi/+9DULtszogs9zG?= =?utf-8?q?jUoWKImcBooQ0s/L9k1TR4k3wuQdtRhGWyk//BNotEMyILqbelZ5LQaAp6Yis9HeW?= =?utf-8?q?SgMZkFV1GQsgBU+QRJlA3DnyTloHuN8B9sREVuxIojC4eAe1RPKaRCtp4TL2tp36+?= =?utf-8?q?7KXdkaCjoj55bt/yn3FlQ1yV3LV+aFBBlibq065W8jQB8mjs+90CLnRAAaZmUA19V?= =?utf-8?q?Gzib5wClMoKcILGP8AEBNouZWTosVL0QosmvvSoPBO6tUkUnNaLIBhrF4E4k+ioU9?= =?utf-8?q?DXghRbjskJ+vR5fA+ocLqmimSHFATWOC7aaUddPwfUeoi1B9pP+lzwdWKR2+c380l?= =?utf-8?q?7Fy8ZF7VwnBSeUHIBnx4tiWhngAp9vq/uMKEWtxQhbqIqh7jq831vxJunctxpijav?= =?utf-8?q?JKHby60qCCvxk7JNvmVD1PygFi24bjfajj3vzwbeZdVfa0IXrzkFXTXkpCS/7pTrz?= =?utf-8?q?B+vdpKJsQrI6VxzA5/Zi3m8AzrM9zkXp8RyXgWCO0gDT073j2DZbnhFrtpgkUbKwF?= =?utf-8?q?Fmm37pVfn9zuBkO8C4dMEqjvSwkLz33PX8dnBaGf1Toq6jaXRkmPQMS5QApLEEUVj?= =?utf-8?q?11Kh8tr8lixI5utpPhoWnIcOMki2C5CKZRLuP5l3pwWO8062hKr9clw/b3ls0aqm4?= =?utf-8?q?6hJCAtkHpHhA/as5+I7fUZhoBO7QjI0XfoIoBMN0PoyPS2aA8iAilBBIf7KJ9uY7C?= =?utf-8?q?8LH8KLeatE1QKMvRg75Pu6K0UqegNijY14JoLjclNCNJjHRy+8R42Bym8ClCRr7xg?= =?utf-8?q?ckVE9zfjVTEVUvrFD91FD1jaGxfmsiPNoeoJPna3fVNrZ+npu0Gg8wUF3boZyWyWK?= =?utf-8?q?ihuLuyfhDK71rjtPohjaXwUbYiwNjHUMclrmHuE6YfJvyvKDM3C225AJUhdkwRLdS?= =?utf-8?q?sDJTltQUtpHkgBpRyZU50xdyK9jyEiIMxOvjNbKpbJs1Sm78TXVjqpn505ETK7Iu0?= =?utf-8?q?oq3LrbRBck9NFnY8dNIUF4ZFrECIgosz5XZ2N+FV5tDY4BM/EkmOZDgt5UoRKuyd0?= =?utf-8?q?TZ3yeqWANxveiRsETEe5gi2QD4pJPM89NztqOCm7hl7SFu+Kp7416dcgfTLKzN91M?= =?utf-8?q?tqzosXgnE20ZEeNtBtrAboVgHbstQ7Xzp/J+9/NPuJ50l8CCxWbi0vAQu0Hfh0Bmd?= =?utf-8?q?07h3c7+7EYDsIpW3EUjxPIj7dT+UC3gpPvzrAnZhm4lRVRM1G/LmH3AaClg0onUoP?= =?utf-8?q?w3xBE4isNEo/C0w4lDPpQYX3L4QoN2O7uw=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 75e6f86e-f674-42d2-85c4-08dc3cd8d4b9 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 05:55:16.0365 (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: 1KRJZqW7AVoV505V5H392mweMNk6JEwd9Hbzkcf4nX+id7W1jY2Yyii+Sem7bY6plpcekOtPPqvbI1qk332CuCzmiw7d1/taAvu37qry+I8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_215536_697511_CEABCFFE X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Reviewed-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- 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 Tue Mar 5 05:55:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13581685 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 131C1C5478C for ; Tue, 5 Mar 2024 05:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Ff328hFz4a4ID7BBLyomERNnSEPJvZhSBt+k6aeK4X0=; b=VcMGWN1p9kKAL1h8Bz2zZfRHqJ fgx/i0eWp42xyL8SuPVc+NpHV8GdgrSCYaxMsqYBqczPeIpWhKV73gMFHN0iQiukazBDLJkHwKqrt pQjm97WKkDOX128HlWFILRDwrp0I/THm/nh0RaUv7ng0Qsjg3Lj7w6oVXVKVzbBrfPEBeIvNDDKNE OrACPL7h4MP/2fQFVf5WQ9ZefInZw6mdGXYvsl66RPBOfRSZ2EYz4yJf8NOoUKteIZU2/qVsa7Tue HfnvC5hFQY20JgvmkIRVDqdP2Mt78wtQc+nWTPa7S7R8uoLEhPi0GXu1A5PQ+ECf0ucV6ua6j1fAe FCwEbW8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmc-0000000C3Zg-0QKi; Tue, 05 Mar 2024 05:56:10 +0000 Received: from mail-am0eur02on20700.outbound.protection.outlook.com ([2a01:111:f403:2606::700] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmA-0000000C30w-0ekz for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 05:55:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h4RYdcUSpnFkZZLpehRqlEH3SGMJJgH6HuoC81K86OsAEwo/VMdv+92CXnnX5Sv62iYMrQebTL46W0BXFtZC+fmSf3t+uJHLhvfXv9jgTPNzuurbfl4Wu3tvv13E0tGodpLu5jmJlFfFFntCHYOzoTQJmffGlUQ70tQnHpxwQepk78T4UTT43T1CF76AtPX5TXQVpYRQsGX4yv3RN8Yzk+xlLoyYk37/oqXV3A+1pWbdFYbd3FqeMyOWgZP7AOzi4X1WFU1hKGJ2zsvn3+S4fZ78F+39MJ0KTPfhqiLZT/cua7za9EV2k1ZAb51MlUSgiD4nJ08fjPSNGXf2hvjOvQ== 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=NiGZDt5sC4cczcJU4BozY6Tqgd/Hy8BbY7gF7Z1dhSM=; b=VF0VZXEapcaklUtst+RAzg4cStu59pJZlcYB+i/tjTvBHKpgt83zOfdLJZxI5TcVCN/ucz7T09bMX9Rf9NM1hC+D1RgZI0hIjgXf1lLQKP4CVCMh8S6d0O2nm3Ba2mrJVP/w+rXG0YyUdbGBF2v9R6rfMOXKKAjM9muKlc1R1qxRlCapVXZTG6OZRVG0LCrIZoKiggJo11iGRZ7GKr7PGnI5NPmkXw/quDITQzm17RbanYavUXoWHfjmPd5eSmsR12W/VpCzpIGOV99qAkSip4lght3Y5k9Qa+PUj7zC0iUa5Rfp0j7gRbWG/8iakI09XuVWMQoI3wxFDWNcUXdJ+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=NiGZDt5sC4cczcJU4BozY6Tqgd/Hy8BbY7gF7Z1dhSM=; b=Avnvq1SMmNguE5NhK93EcU16DM9/TabmTA4VVkIrGGb2422mLPSKYtV0sM2zgJNlg+0ev9Z2DTwr6jQWCsoKCPyszq8LiD0CQsFTrRJPb0b2cMC/IA17cGxsLqVng8aZIp2MMIoDJAiqeS5Wv5uejMJ8Fi5h3VzBfWBT6Nq0VA0= 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 05:55:17 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 05:55:17 +0000 From: Javier Carrasco Date: Tue, 05 Mar 2024 06:55:06 +0100 Subject: [PATCH v7 6/9] ARM: multi_v7_defconfig: update ONBOARD_USB_HUB to ONBOAD_USB_DEV Message-Id: <20240305-onboard_xvf3500-v7-6-ad3fb50e593b@wolfvision.net> References: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net> In-Reply-To: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@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=1709618108; l=903; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=5HWgsmTtck7nNPdlmIAo1wtxif4fEJzdIeQ3MU4/0n8=; b=Li0HhXs9vKBdjCkMWSJMOX5RlgYfAKGPYFhi+goaxbIDq1q7SU0hVUQBXxhkfNcrN2TPHbbbM 785TfA6MXWoA8P1opl3MFSp4p4BTV4H68BalcfrVZnH03NExx1a0wPe X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR4P281CA0110.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:bb::18) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: 9607432e-4927-41d6-5a34-08dc3cd8d56c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KJL+1RmWrUkcFoxl4ZDgEA63iV1nERHA30U0O3oql2nn6Z4b4TVYyh6rHX92Jbdw8CLej8NRUidGh835k45MZUT/k3/b6XmpIQO4XjJCcoaAznGPnW0LXS2qHmQI4Yg1F/y9cj8hrlD0OgjwMmHAhEAFHgFdM9ujh9492u8g6TKM5ESlqOEOTlHIg/RWesh4dpfnEDPJ6u1RUr2l6JlkiWfTh6hm3DfqO82vKlGlQkZ9ViFyKYwNgoAM9uTGQ6T7Ned41+uAmapKQm5oaZKIQkPsg29PQPdUi9YNbqvUP7q3jAyI3iUr7Ink3/PwsNOst3AptEDYBioSU06F6iYZSLnndffWnnSAfcPKaZYAOtX1RwDLTOXRjCrHLoSc/FNdYpAitGplQ7c8EUwkfkJOtl7uevhIQbQtyxW2Nz+3dDenprZIERSe5vi7ZQV7kapkwgPa3znMCo4OF99jc7I8fcGzRpX+q5a9NIWdeFUKqQoWp5uNVZZxMm2c/98Nufz9SC+q1ruPWycLHhnN5/xEcoFnbnXrbb8/N4kDsZGGu1xcrXCsapX5eWmeK9nHfriufqljqPQ+ARvao0baJIY+awh4NYcpxUc+TfG4a9BdvBQc/ha/wh8WYBO2KVcoJzdvhm7lzGAY1om+nNWwQHnLRtGE9qNHCfzdH8Gkond7xw+pHW4it+ikK/j0UkaYKPiSh2Jfi48NMdvD3fD0JKQhZqFXj356Vxc9TfvIecR/5Ag= 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)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nS19CIm2cgCqswx9oy8/0f2Z63mv?= =?utf-8?q?N4miwTFmknc7WZHmJC4oXeCMlu5gra8TzFZiZJxJ6pkNkc0LboYH+fv4vFMpW6G+P?= =?utf-8?q?6dk+v/TXFlH3hoCfxJvOx7zGZSQu2eijBC+FAZXjmGIv+J9ZjW3m+bwsHPoLYLhmk?= =?utf-8?q?WkrSm2Mmgj1nS6c3Wu0oBo/6+CemBV1WhNAHQcicfuWt6FBbGqtC4vMpXL/ikPK42?= =?utf-8?q?JYk/Nb//8Dye+nAD09nc8GWG7oZeobWAeZSgctVQPPZvvNIYSyuEjecK0a2EJHPui?= =?utf-8?q?U1HK2kJBkTQDSKNd2I6AibznTWC+CI10ep12GtDbVsGK0DztTwQehGftZhS6EFt27?= =?utf-8?q?fHvK5ScWVgXa/zgL7faJZCCQOSsGsDB41PUBva2ry5o4fwElMnf+2Xm+m8fhTTM4P?= =?utf-8?q?PauB2ty6++/nzj0aBHRoJtNigg8xrjxHzEthGjenDugxNqdXpI+lkMy4vFwuYHP63?= =?utf-8?q?BAyhyY1W2bShDwsZnYEVbl7i4Mit44kUU4U5XADsLa1L0/kKlXZYIVmNXbYcQzBu5?= =?utf-8?q?2QSxVo44LHWb6eLqYCqn6lWsMavg7alammOpsuWtcdZ+8AG/xKtSjTQveNjFMJ0X+?= =?utf-8?q?RK7nYwqz5/Bxx7LPNfV0UGvh6D9IR/mKrjtdw0SutEZBsFaOTe9qq52s6QNTS5feQ?= =?utf-8?q?KxpWyJwqQkkPDI6uLwUZTTUlkEnnJ7kKNjnWORVvaFGR3kgaVEesI9ni37NztfGWX?= =?utf-8?q?oR8dVCE0wCSN1bJSCVYZw1mV5wxcBK1COXkYwtcJ2iTVXKrhNvk1kxoDuDwbdzSMy?= =?utf-8?q?KpaiVnaeleYWU2G9ZVU8Z0bat4u+HWmDefmOlQrOcdS/FLGs7H7LCBqlwM2tz5eeW?= =?utf-8?q?0m3KC7WLXfpHmmF2RW7R2KiwKDrQbaRGivhszS3H28/hYnoXwjyFgNc2vvGoIDxhY?= =?utf-8?q?n8vVWj+acRwXqHO39WM5FhnlYRxja16iRsVmo6Ln13Nb0/k/7fISV+zRr+LeR8k7o?= =?utf-8?q?Bu3eUZd7HhZlOyhR8kc09OowCynxgDjlbAd3IwOBBUrbyKj0rOFG4m+gwZGaCEmsa?= =?utf-8?q?vfJpbAlR8WuIEWO7XObqRO+xcaWgi/KJ1wiJTwg3BoIU4dLY5dk5CAQU/uzhyJhXY?= =?utf-8?q?m/e/lij6klWcWAaySljAK0+Qvu46FmkdotKdMVN5blIRSt7sWq2hDZAFVkEw9AAo9?= =?utf-8?q?8PITEDX7QsNHf2TDaXvCK+0/DkFtncJdscybigBZOxrCfA/E5k1GF2WJCCARmSoNG?= =?utf-8?q?x2QDyE+Jn3fjwJp5zm3Jd8s/AepUO3OzboX7XIArzQXE6kwaQE6bw5ipxJdHhPa+c?= =?utf-8?q?WDDyfHWWak++IuaCAjsTNEiOR1KGJEPXsyoiHj19hNBWVqwAQAc8dajRjh3Sfl/Gg?= =?utf-8?q?FiBPsrAvPmP4BLaWjN5j1x2QFLgxGLB/ZHWrNHjNzlQd4zWoxG5fAINtY6ATE1JId?= =?utf-8?q?DP2MttTLzThlJlXMxFHIXuzYPK1EgA7zepDVjtmEyImyrQK9dsrZv45hCXgSQeQIv?= =?utf-8?q?Ra8x59Oyv8m4afDzLwogqY/eHcqIM2j80KryX6YvpnLanaa5IiPl8DlAqbRDiLaQF?= =?utf-8?q?2bCn2BRVs3z3srGFwEoKRW6h+THYWyCXvQ=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 9607432e-4927-41d6-5a34-08dc3cd8d56c X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 05:55:17.1921 (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: eCkGxX89ztvdW7aaErcffY5wIZ6TJWRNis+1w1d97t6rA4OYKsdf3AjG3lb/qyLSx+UQdocFRbC/aoeC1GlAWm9e9WO/PeONSBF9ir5HCAU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_215542_742270_49935AAC X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Reviewed-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- 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 Tue Mar 5 05:55:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13581686 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 08AA0C54E41 for ; Tue, 5 Mar 2024 05:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=A8HGQ6GdgEeE5ElxKNQncn3H26qTg7wsGYmd5TH9syU=; b=vmvveSrUXmQ4LBxbTew3iWQPrh UsuF6fARnWRep3Xor/Dp52PtCgp5Nh9aTRtdngPFlYDSe5Pxf1qcHpalsqEbOqBpe0c08Ewy96/1B R9JUnhAlrprB7lLGELaZ/uauMMqhN8801JQV43zvi9Jemvz+t19734FfUW07o2r7aStkReVw/oX3b kYVrHojOIZThYtXDDvBubKIIsRLGbNWUZPq+z7wEgBTLmOns8H5/z+sPbODEOoXk71sAiadWaxBZp Xz8MTdGp7Dgr+QWU27IQNoYz3RvSRE9Y7MtcbeWiUDdcdvsWtPt8tbsnynaGhkZs/iDfKuge5ahhA SqjeY0rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmf-0000000C3c0-1SJT; Tue, 05 Mar 2024 05:56:13 +0000 Received: from mail-am0eur02on20701.outbound.protection.outlook.com ([2a01:111:f403:2606::701] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmA-0000000C33X-386a for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 05:55:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U4wBhiPtO+eUtXUzdiMEMC8X3rKCdQUWQfIp2278zk5Dud7nIpdB7SKIPmOB4d732REFYe3zX++xapckfbDtncuih5PNPweLXHdtAoB6GT/K4SvSObmAHmr298Axge+yTrqROKAhTqQkUjIg0uB7JXN5nvMa2rhammCqaAN1gu4ugblzuAgCYVim9CAXBa0BeenYWObmo6OUCqsbNQcWm8fITMOG7V4TkCqN9p/MU2t6aaRlas3h4sOe53l884Zx4czfyP3xjxekqT7cofNAdlbGrnDc0AH/ruk6AzY4NDJ1KvfRm4+vQtIfgcxjRVA0R3VdiJ0f9k5xpExt0M4euQ== 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=U1CdGpA9y443e3RqRh+YFYO9AtKfAMW080qGmyfpPo4=; b=RrvURRx5QXpaSLMeppACCxiueKYs49prbebtMmm5E7rSD9GY4ClnhN8L6Dds2F/jRxS8C1UqtPcNhu0Nm2EpdvgGoAyGjUcAaH7KzgJ3ujwCVQVolqdKdQmWqMikp7b6mU0MH7QlVOnW4XC6tcSbMz9sJSij+UbMKOPTRoG2YXF3zappD48NyH44Xfi99J/K/drVLEP6+i5oBb3pbbJF4qfx3I14q5kCDbRxhkf62mdw/j/3TghquNGw5eyUIAmg6N/Z48zPDMm6RYt/usHiqDW4Jd0AR1G2xZhsTA4og191UBm+2bUxErB5tj/vCBE7JqHfAFZ9aLCAiZVvqCyaOg== 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=U1CdGpA9y443e3RqRh+YFYO9AtKfAMW080qGmyfpPo4=; b=W5csrf+aCOrROERv+DLxg8I9wj30SOZtaYk7Z1VXzpSVyuKROgmsdRGa/5l++OL6inmNSrvO0O9kwEuo/ucf5x+2obLA1g1GOKVLcQdvG5+7usdLqruU3JAJkbXqpNDUCb9Hjbvb9gg2A3NwvzQ9ntfRhlgXo4dDK1XCVjEMDKA= 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 05:55:18 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 05:55:18 +0000 From: Javier Carrasco Date: Tue, 05 Mar 2024 06:55:07 +0100 Subject: [PATCH v7 7/9] usb: misc: onboard_dev: add support for non-hub devices Message-Id: <20240305-onboard_xvf3500-v7-7-ad3fb50e593b@wolfvision.net> References: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net> In-Reply-To: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@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=1709618108; l=3971; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=wHEtQy1snznHud7XugAlCGlHC2ytRi60iRhCiOKvhRQ=; b=wRJDUqanRxqeT9+JJ1vwwr6UBao07gzhCDfnXIVTwjfONNszgk29KaNHFtj53SlxXtOrQORJW HXwSXiHb0b7CaAaaY84qCC32z/BeGhx8qkDKoK1LrKaVbXT/RtmmCik X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR4P281CA0110.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:bb::18) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: 071e3fd1-3324-4eea-fd39-08dc3cd8d620 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j+b7KErJzEd2IgNME0u7NMKcEykvZtY3vz+aiki9NWkl3BEr1SRCLa1fuvMyiFplzqYMGFZ0uXyWtXmKSMoJKVzSWfdH3nQF2eMbpl9nGWiKEQ6rBFJfthO0UF8RwDYV1K6Be3wBGhk2YYiKZ5dfvbKjpuD7Zln4iZ0KLkcFf7F6Jlmr4d2HyPuKjaQ7iqA9ZHGBCB65V6+qEaEfVS9OFiynt8PAL4a1G9igXtR944vwCY6UYxqXG7HDzChOTUEldE9QY4MBeN3Kc4ErOwFdTl//KtdkhoHAjKH9ddKZ2+ofP6z9UmsOxKC4k59wfsGiztZi4moIie+qnzKsMEYcJ4so644iU/X/XmiR8dI18RYKZbdvN4b6hSRKR2YIfbeNKNzRXmd3zNg0bpMpkdf0yZrbxoA2+1IUx6i+t62QnS1+tiSO5dWzHAazjd2XX5lg76DZkPHV1u4AyhBffk+iJ9PuBGlnvRfbwMOnRunR/2v6idh/E0aguxyT/dfy4FdB9jxCb0r9Kj10qyPAPkHWpAI1gqcmU6qLKeS3qJFJKMNUvi7rEjP7xOGQdyFIMeD6hUQBYfQdfEJ7Yi6D/cOyoCkg9ONaHuzBMCxpl5de5+ofGcdJpiulQpwOJrMQj3OFpq9qpa2zpvagR4IbkD7j3hkVNf5J7ryKtJhuN4zuBMYR23BXTMp8MAVbsZ10hrTpIu+2KdyeTUxM4gXiS6eZqibo3AhYW4Cram8XUT7a2lI= 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)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?X+GfOidc2o4dVOfYurGth9sxG7iz?= =?utf-8?q?MeBo2BzvSldxEM01XbZkHb+djSFTZXvtRfO//Zdsfy1VakGJQVuXgE03e9AVnXbZ7?= =?utf-8?q?v4YuUNT3Lac9YljzkrGvNcPBHap0B3tkJN6m7n3My12TGinoCZvGUO7JrThFgdEN/?= =?utf-8?q?ctvYjfUr216Y1T3Zbd66y1E42AW8HQ+HLkqiSooXlsg2ukCthLdYIg9tnhYSywczF?= =?utf-8?q?ULZ9s5bIn+FUrGKJcdk+EfQ82d5oSSo1gvAgpm5JKbYpws2hmRlurQi+BbxIkG6IF?= =?utf-8?q?B9VzLGpnlWRNRs8U0gvUBmzizVIlV7purLb0P2kSC1kbX0mhHKGGgAzwQw+Vj8yG8?= =?utf-8?q?6oKEly1ilHXcm4WJ6CXXtpi4c867mMXrH0wP23rhmUeeoxbCw5H/e0iFvXfOm0MVS?= =?utf-8?q?mAFCDpHbtuRAZWL5TSqKP+mj1z6FBaOmoaQo2OK96Zh4WgVoefT7hwUsOV+hRg2ZG?= =?utf-8?q?f0iaxma0MczFdj1/s2MaJTIcQ0dNJhFgr9FFPItRp9a51iXEDU79+VUXSm2PLfWb3?= =?utf-8?q?9ngKAmu1/hXjyvlORAax2pqjKO4+iQbgN6r6/ScLx8bXjVBWSGiK4o+zKVCL3eHIz?= =?utf-8?q?qzfBUv91Di0oOQZ1m7SyJm3vDtNy/QLm+xaAhoAjEB0BKBv59VDw6Z0EwLtb3tAwL?= =?utf-8?q?prgWxnIPenZB2bKAD5sdFaljL17505AKdCrP5sbLDHKj0mwulWMQPax8Tg31Q2wBt?= =?utf-8?q?z2Paftz9KIf46Ctk1UE/Vn3xBo5fqAx7rjkCjh9NuNvCLr/o8rxlOucJbO6nPqQ9g?= =?utf-8?q?t15F4vqFfNoKIqWn+pByPC1v9MiSV568PRyWVwhT7C4dedDr/61ThcO6i4FfCB4r1?= =?utf-8?q?fLTxsAdOt5q45IHDZCOc4XgV6631ez6IVFkZtrCK9kCOfa9lti0ATumcFE7a4WQr/?= =?utf-8?q?6tFwPscW4qRUSESPydtgAyIo9bzhksEiqbFESJxMARNuPg0KjWkQ+Bly+uRjPUb4c?= =?utf-8?q?sq0hEW11FQdPCJB2CZ3bwkKqJ10mbPxV6UNmVNrlumH0qxc0XPdPx4HAorMwEgm36?= =?utf-8?q?XxhgR86iMw+BLuxSjSeZd6SQgb6tlJ36uavZo0KVfznBuYzHEdfjiydqni3G7//0q?= =?utf-8?q?B+wxJuVz+rtRt+doFqqxl0bxClm6IAjTfGi1QqNxUFa5RXmkT+i0BZ+Uv9D3hpOlP?= =?utf-8?q?IgZBqfacxX6+cla7w4cTcU/ruHd4boXwBrdAa0I88xGz62t3bJ8Om4SPR76FkOslm?= =?utf-8?q?q1jAzCf+O/TetIlsfk4TNUe+m2+X0bvMaI+RmKDw0URnvWlNP3Ldbok6na7UcKKzF?= =?utf-8?q?SHj6tKnKVJt8Q1znqFtRWfSuzLaxh8S82dz3XMeWxVGQhZsOeqBAo9Wfw1zsTBbTc?= =?utf-8?q?33zPtcCodwFKgvFwsFJYQ+J9i4Geiv9eKG5BE0/vgm150eIypRCl/cOkK/l5STwvY?= =?utf-8?q?yn8nHP/86Gey44BWFNl/x1j3tX54HvPNCOPZcH7EZyqX4Do4HQboouobsP06v8y2E?= =?utf-8?q?l3aQuc8X+prMnq4muCtHqdEogKkkOENedVcY/oLyhttLK+6IcemVTzX2Z+rXK8FX8?= =?utf-8?q?v+AAJgqGf/oNCtzlwFLHGgqiBRoWI8rTlg=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 071e3fd1-3324-4eea-fd39-08dc3cd8d620 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 05:55:18.3743 (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: acPjnPC28pdT8m+3AXsKpkFMatMbBGpP/iC2+kkOKSK5w6ybtcnnFFVZGs0CJgTCpSo4T1kdusKj1jTajyCaBDFazXgq/GHCuMCvNLqSwco= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_215543_081202_14BAF4FB X-CRM114-Status: GOOD ( 19.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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). Acked-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- 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..ecdce06ea0f9 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; }; 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 Tue Mar 5 05:55:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13581688 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0FA82C5478C for ; Tue, 5 Mar 2024 05:56:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=1n9PEIMaadiD4hqg+0/Hp0DJdHzwne0uYqBqy5lDCVU=; b=CXHPnGtMiltOCHzr/BrK9rXJio 5+y5L3/vDxodFkhrE5fnyiG1XWPJ5q+C+K77YgEGSAWHHiCjje4cqwB+GFT1c9Jy40OtWkFoprw0d QHBoRubMRcaJLdO9FlDFenZTe3e0HoBSaiazZ2dCQ6XaVbrJqFdaj38UO3uvddEWvY30cO86AQgul 988apkzwbVrZ5OabRUCXj4QquN2fie6wiayF0fh7eZpB7E9OlTeAgenQeARsQsor2WEhbBPvSZnxv m6EYsDLtWcRe69dEFGfTQZ7LhkDGVAOJcXyCPA8h52wofsDk/vHA9cahQGRjNWpB89T8DSRiA2pzq q4GQaucQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmi-0000000C3eF-29V3; Tue, 05 Mar 2024 05:56:16 +0000 Received: from mail-am0eur02on20700.outbound.protection.outlook.com ([2a01:111:f403:2606::700] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmI-0000000C30w-10zq for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 05:55:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X9fiFL9JayeCOLhZg9ZS1zxg6lVY2rSv/P+5pm66wsS8eA1Pvs9h4VW1PJG26fv9tEhLTdCkYHV9cBjhS7VLzFJcoUSU4iw1b4iClS6IbE8iaUr6Vst4npyIRR1ZQlg6WWrXz06nx3Nf+GtDtEytkGymw3VNxBDaN52WO3TCaQAHtAC4tejoL5hF/18WERXlsHyY8DhEoAzmi0KM+rGiQAnh45XNcESWDdbbQQVojFhDvnFmF0ACRK5HU72XMyMi1AGrNeH2Bwq7Ml/ttVGXvQ0tL49Q/z4Gyc28nIOdJg1nISDO4PTaRMNNoJDgzY7H/gfjWGYTlQkIwuHPkFAdrg== 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=nqitDVVRMyr/kGdOSIxHyMUkZ8AkYYyGmQOwRgguH0TOshXBdDcd66hnTcfY7duA9tTZC+IZus4EXES/TG5QZ+QFbKZjZ5Nkv6GG6r11XzpzTM9ujlRUAvK1R0q43EMSKIStaKlQDuJQ3PEfI/zIcaskAn+QJ4a1zdaiSGmuKgehhiVndyzYfNZ2FkYnz6/BDo8sxphK/97FLRfqPzwwZFMTW90V+ffZ09I+A/hZ3Iz5cr2MeTJ2dZMvAfzKh3dGTH8Q6kgdW6/WS1a/Mj4tCzt/dGYfJOEIpYS/n7XlwHbY0++ot0E3X/koXO6PHwZ8+YgC0nme4A86qUPOZy9O6A== 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=X81DUIu/sLpL+2LTQSx7XRIOXJErToluQvWd7GGkcgWELkklFwjZng8GRmRkwcNn9B2IfcUqrbg3Bundkh/8WA/SoYc04XkRfKqAxoWms17cOzwk5afIBi0wmyNk0QUKpraUhe3S0MIJ/IsjVaxyGidt938kStLAdcb0JY/qH04= 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 05:55:19 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 05:55:19 +0000 From: Javier Carrasco Date: Tue, 05 Mar 2024 06:55:08 +0100 Subject: [PATCH v7 8/9] ASoC: dt-bindings: xmos,xvf3500: add XMOS XVF3500 voice processor Message-Id: <20240305-onboard_xvf3500-v7-8-ad3fb50e593b@wolfvision.net> References: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net> In-Reply-To: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@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=1709618108; l=2173; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=aK/tqoGoFX3bOzP7we28NQCLoIDGur9v/pKHCEPg6Ug=; b=wEURFk/qx79Dnvum5+va6FkB411+KyO8Wzq0r3laegKyoPiJjKeobL3JifwvzrciwO34jDWQy aNPSsgVXs0IBRD4B2pwVDDxt+asYnoMwKTo0TXqwiqU5iAqz9Ao1Bp2 X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR4P281CA0110.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:bb::18) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: cc6216b6-37f7-4114-c68b-08dc3cd8d6d6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JHMvKyjkKDw/8+iaFTYT/GCPk7L7uT0p8l8TTSauFAhx0qbivqgJNiALrMNJvog/a388qhr0siX4EvrLnPdIf/7vsPuI1zWjPcnWPxYokwY9b68nEgyXlGeKUZndVsd10ScKYlXF7h3NiMosz9DYA6xwR0wNqqwLxpS9DAT+/S1TUPjk55cWtyiFLMzXk2EEytVthaMCPClR0Np7FgfT3pzhUnxK+G9PGMaofORZbmk7g2UIw0dXUPCNjxga20qfaBcFMroggUOOAGbE+dBsxG/FDepDw1+00plT9jMoZXllKpdVLY4WPYEJHZ+GSZ13DL68e24QAgcQzlVU1Lzfg3f5PGjWnVD3GbRWKIQiA9h5wysDpmEWvqRHN7OyzkSzGo5Xe1IkBWf2wci0JI5FBQoBfqkqJDMPizj0p62oh0T/RXTSakk0R5HR3zwI/ZIzR6E+NKosjzdfMwTVtzmfsNklHrbRViAkDCIcdNyE8GS1N8dIT23CAKXKheSg0O3EOwIUej4zy8tg6xRaD7VKiekuR6zSFPTqMXYnWfrC1P4s8evTY6Qdje9oUxB/9aD+OOTotNWOKcreZbOHk0uww7loPfl3JpDWBU/kKEgYnwPyZ2sn1uwBQFmL3JhfE2KDeryqbNTJVPxEoslsld8ik1nqyUoSXRiQlzVXDLeYmFQ9fsVED+BsA/opTPYGxqfc 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)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ZSwVWkitvM4an/LE9NX7CJ2KYjPb?= =?utf-8?q?iO5xvrm1g2EQ7SpwS4TopQFjPaZr7trEZm7jdhpxiT2q7/noftNz8n2MpnPy8Omke?= =?utf-8?q?dOVaKA4DEwRPHDsqyZVar3qRclBcMaR8IYX/lhmn2SJKSx3xpb4fDSi8+QWzxZi5J?= =?utf-8?q?RujqHxQiG6qSt4HBgg+u7BxEuftdSF1ycHADp92AMFaXvaj5OVTzHdPW8JFxCFRKv?= =?utf-8?q?sLpbwNUUT9TrSj2kdD68/Q6QjbboUVBw/oDLb4elZQfH5igHq3OPk3zrWf3jzkLJR?= =?utf-8?q?jDNFLzoT27MRZoFEtsHLL06GiZPfTYBMnLEoFIGfUT44joIPFoByKhneZ82UjAUJO?= =?utf-8?q?s3xtT7ThdgXV7TYm7XPWNAHgeXbfQEV5F0lL66opub2eHGosyBoKWzjGRm2/LPT+e?= =?utf-8?q?n7PoPJ3dnNkgQc6kmAD8eFrj48s+J016sEJxYoOwDZDa7trR7dXaNPMHlFmmXWlsX?= =?utf-8?q?YFqESXLfnXVSMOAso83O/8v8pLQ9YtiJyc7kkuRmfi+421Ap4rNj6xL+2JPnhD9U9?= =?utf-8?q?4Feu2REvwSqyOeB9ohRlS8D++/PUZcnGUSnFNU3mCIadKaxumudYAWOrMS2EeyJOz?= =?utf-8?q?Zx1FrLq1CAHpzacpvT6jOvgLMQnV39JhzbO4Ed99GTBXZzK17WKsbtoBXPftOK13S?= =?utf-8?q?TyBbSm4n0bLXwp3GN680V2wrvd8vgHmn+kUM06WD1nHuw8G6GM54JEqR5iAcAXYR9?= =?utf-8?q?pd49ms/krmyp3nGr3HBjUABGQMPt7e/9Rh1gX+MNNvzhqvgib/uxkvTlxAPDjssIs?= =?utf-8?q?iEKkSdUxHd0M0N3PzC9Yxg3wv9zTdwEUgj8S8QlaYqJ33mKh41Vzvj+CScRsh290t?= =?utf-8?q?ZQokv+I3vgqx926bqAenxEoRhtiCEhZOXxLNPUH4Gve8adORxXbPUbKrg92XYbqfi?= =?utf-8?q?QQNAnwJffxaGLShVskIBjxGZowJbpIzyx+RyoM0o5jUH+TGAEEVJ6/uxQjD04xsu+?= =?utf-8?q?0MtSyi61SuM0hNJaK/ugOP3AYiuwEmvvWIDh5aRQUQl/0xJmfR/ZOdqgsi0wjTpaZ?= =?utf-8?q?pIE4VU5dtwDzVwhyvv7mrnm0gmSs4jwn5SoYdfFTjcw+dzQX3/g2Tb1g4FvhQ1BvK?= =?utf-8?q?si1mCS6EE1CY4wltIWYLjwXWVqr21Z6Pw5k9UsZZhAEyo8KfkGNunrH4Gjk39cj4Q?= =?utf-8?q?Wk5UzQKMJICsgty8fJvV+HMYF2rPsSso9/EaxRMwXyseAsnoorGcWsbGKWEpF0Kyz?= =?utf-8?q?0XLmtsRpBe6eU+KdkP8zdJ7K0tCnXpEFoKUrT0SWN3uy3jffeVBpFiGlEiS4H3DtT?= =?utf-8?q?DnDvypuumnCs4ITbqabqFQH+AWWaaTtUA9rKKGAoyOI5Cw0IMBhDd4kSokbAAVQHh?= =?utf-8?q?6DW0tzOQ24rQu0Xz+30Nzo+8bamZpoPyOnmVd8YyhMpQjxqxfcs6ireU0LTblWOhz?= =?utf-8?q?0zdtbV8YsALnOmsf6ULNvsqzltg/lijcwl/vcrMjsypIALC8ENUvo7sqeM8CDAVmZ?= =?utf-8?q?mkd24tbZQKU6MwIUxDSv42bqaCz1/KKLC7Vt4iyBp+AppkJHjAi8+GxJMy2fXMn+w?= =?utf-8?q?bOIIlQMFnA9TdwlIaDxNnmW9H8Jx1swRqA=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: cc6216b6-37f7-4114-c68b-08dc3cd8d6d6 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 05:55:19.5837 (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: ihkxjQTVBBzmDZH5UvwyYWDJiADkN6ou4EsANkRFMYNs1r/92d7+KNs2xLstjzxGhiPpchqd/pCvcMwOFY3JtOHga0ISO1qcPVb4ei1Dxyk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_215550_641751_D9B3E8C9 X-CRM114-Status: GOOD ( 12.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Tue Mar 5 05:55:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13581687 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E4E0EC54798 for ; Tue, 5 Mar 2024 05:56:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=hGK6ah6zyboYX1rkGOp5WMjdmmHrzOn1MfhCctyHDYE=; b=xinlTMlNpQYQVYCV/hYSUPrKUp /7AeaevXm5WKkAdq0lHW6eTPBOstIf99U/TFVdq4RBdugLnj4ZRDsq8wCSSpABakiq/EuNiYYI0r6 +ou9DC6ttz5ai1Wi6qTNHhgidoVjOpVQ/fyZ38JEQxEZ8dhq7S5OxVpXE4egJfO3FIfVY2MR71Ppx 6CmV2KXViXlxYCYBmYJlT9yZ4X+NHRCbxDDEOG1JpqkJ6B+wRwGlkhU/SbjOzwtg9juLJbHelIqvA RhkEX5EcKY8ystpT2M9tjn3pthVHz3NVT6kHRszOBJJEN+MhBel4jyS27kAN0P3UXbFBEr22g4sEO t/IDLV/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNml-0000000C3fi-01Lb; Tue, 05 Mar 2024 05:56:19 +0000 Received: from mail-am0eur02on20701.outbound.protection.outlook.com ([2a01:111:f403:2606::701] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhNmL-0000000C33X-2ucd for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 05:56:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PDSrm8Z5sviIcak/ZiKBY1MQZryDOC6yfdojEmVycM2LzW+srN4G7tV7MGqcr3MxcPtA6GUbjZxjH7fgp7Eu6Qefs6xPHkEwuIvM5FjzRKKvDljvtOwknTeMCH/YtPraPqb/1rS8oIOD4cnj2Q3ksfYokSWjyu/xxySMGOiQnOgUszxvRH4Av9BlqS9iG5qgLJmdQ5i4qzS1VlnPaiItnrT0RCjZae6PKePXD90v/UxnLDHnNkU7bSa3A7+ceX1oQisZuLe4hPJTGe0TbRfxczreQ1fTtcTiWuKzmM/XrKdQhyIHH9Vs1da/I4w1/6595JPo+Rx0V0Da96A2HzBqiQ== 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=d5NCX79gFOkPGzpTWXJJqnYCS5QkzZucZsmla9B+/Lo=; b=R6IRa83QVN33d4rsihgd5vqehf0F+AVKNqRExaJhwhQ11830YehNDP1i0wjdxyacxXuj3eWkll6LPWWJwNhRXFksT1ztY4I1WG0Y7APAMWjDwvVcRQWqfL+FRuQsRfzTZV7O4rhMbEBzNA6pf7pxVabsSnt6Ou44hbhiLHluIUSRIiENv+qKQZ+6xzUgxRK9/JAvit6EsoJQwMHTOI+D6HGlSsm56iKcDvgcsHyhedm7Jgdw5O/lZgPWxVdImgCT1pmJmXrKB9tHoPCoLmRKATUYUw/F467X1SYrtGxmrg+bJZPngLXgxML7x1TxY8UOqq0FBjqALakonhgImbmwvA== 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=d5NCX79gFOkPGzpTWXJJqnYCS5QkzZucZsmla9B+/Lo=; b=MV946VyasT4uxeh2+fewCr0uPNZhDeog5A/LLgtae1XVqLLuK3OqC/48v/caKG+vsirjx7uzbeMkYAxzKKAYw/0TmSO67aAzIywMi6RigLEQyVxcJ1jvawyZo6rGghm85BwwYonz9pIjd1mkQ1Aon4l+zVsDhdXg0zB4vpPGSu0= 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 05:55:21 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 05:55:20 +0000 From: Javier Carrasco Date: Tue, 05 Mar 2024 06:55:09 +0100 Subject: [PATCH v7 9/9] usb: misc: onboard_dev: add support for XMOS XVF3500 Message-Id: <20240305-onboard_xvf3500-v7-9-ad3fb50e593b@wolfvision.net> References: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net> In-Reply-To: <20240305-onboard_xvf3500-v7-0-ad3fb50e593b@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=1709618108; l=2727; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=oP3Z3uy29CXbEHFvt4p4kCUd0enQb9o+q0vxd3NPfPE=; b=b2njzOhU5pKjrfz0OdJfAqYlUwWtBZWxv4ooK1gvY97eCki1QQDXOQVvIkGPTwm02A1m3wTP5 GwPVjSzOqqQAdIbkZyMJeMNLC/1jtRX7uCS+w/fYIqPIx4ds60CfiX9 X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR4P281CA0110.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:bb::18) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: 03f46579-a273-46d6-86f6-08dc3cd8d797 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vP44r4ccJr+e5Dw6PR6d7HrhdQwqKb+iZy7/QFA55AWrT477J+pwdh2eoBJk6q10oodoiD+cE8Dqu3pDyDDsBuT12fzr/R8F/gXyvFyt+RyJI70QUbHjI5dkdEIBHOhVxUoklw+6nixwsJiwojnrmpYGwYn+uQTknY8lJVx+F0Y5M8hPTHQDDYOaFv/w+NHD9E0ovovoL5icd624ZY/S3A4+CSzJyzqHz9327UCYUWPP7bR1igFX/+2aBlXF7+eTIYdse8sqmLwzguIqPagb/XTi0xP5V3OtYvCu6kSiFaSPfYxpT5K3UZTrzciqJh2jKcXx38it9yrGS5krgTzE8Jbi1On1smmKRpqFa++hLwogXCzmOlPW26BXdOcNGxEqRk1cUbwbCnFr688+53+2KZ4fVfu5DO6ZAQOzdmg96JJkWgcWDxrvi22P9WKFNRnQNQs5t7HbR2W0m4lmQ7JvSd8lDCgrxiaS4KMekRRjJyVu1kTQl6+8p5gEASkgZyoZJEiRHX0lxzIilKlpCFsYm6gfk2Suwt78Hc3p+E8uIqOOyDwzxB8rNKoIOmPa43E/4noMYnWu/YyYkgBSWU7JuXl/3A5PuvuEx7AXPyRgx3DazozsaNTvSa78UyTEIwwbbrBXcA3JUmgbgnnQ0Z4nGeUJEgCIKOSKf9AnCKVYZ9VllF1HZJJDtUZwdZEGNOjL 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)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?tuSgIhjwPGzfiQ86dYCQhLbgH69f?= =?utf-8?q?ouw+rm9jRIboK97cs5zJgT9y0z2iLkvUeSqcfdb5XZcemiLXUlMG1ekNESTm8Ne6U?= =?utf-8?q?U+4hT5zk3EGxSH8BY+BjVCHpcGKyd0eItEDMKrpThFAAoPjP1n4px9bJjOziquFdN?= =?utf-8?q?HK5+cZZprKQNcdtvSWw6nNETtKsX8op3F3CB5TTvPWwtMYbMsVanYJx1gN3a9klkS?= =?utf-8?q?NgZRo+Nd3yvXOyCESOeiFM+ZqT3QyhM3noeU6r2xKZhAXDnLUkrb/D5ZtbSZPfvRv?= =?utf-8?q?QYmrF8NIxB5TBtOWdoypjFlLNdt9tEQj1bJei1O7/pX0jQdVRB89js6C4GOfbo5qF?= =?utf-8?q?LW2EZRNwtAmkIOsYYZPk5UBmc2gQuyPhYFY6g0g9e53oA+qGhB+aJbHyHK9J7UaC5?= =?utf-8?q?Dtvq1j8f4MlyB/yw27RJSAYKMxTrQM48uK/VWW8gcf5pwvxqHJvpM1L8+0mrV4PUS?= =?utf-8?q?2nbqtLxNiZw4lKutgXtUDOPNueHFlgyFkKdyFdTWezqncdePDKLAozAAROOaG+itn?= =?utf-8?q?K/05djU5OEENA0JktM7wJNV/BS9p2fcnvoHmEkhgpuUoQWlSBMypVHw4hzWGc41np?= =?utf-8?q?ekVwbRcddg0QYEEBrl91xVqhCmNs1wR6eD5lRuoQsY5+ZwWqVTUkp60JNh01AVcsX?= =?utf-8?q?CQ+1xO6LWjseJRWkOEFtntglu7VvXVNk/qnjjGLXDRFKY5SkNqZ8mw108qjeKOamv?= =?utf-8?q?ODnEjaSyhyhm5xdg7MBQqT6dY/UI64FnmrFC0oYAD4YHu5D0PFPZkPEZPkGxUSI5O?= =?utf-8?q?EPkN+vCZ9ySVuXx2DrHuCGlH8051LrwExjqgMzYslXKrAvJJf/QFsfvK/DI4Cu6si?= =?utf-8?q?hgJ+KONtUQn6wtTLFC7PvydvdkOCy33Asv80QGNt6wSf1Zxpr0E6pxuWqgOiTJ6EG?= =?utf-8?q?z6lMVUsaXVCkWLe2FNIzDFqyKk03WWAlhNP092LAlv+iaY8d+qbb9ZsUH85VlKYfA?= =?utf-8?q?qv4ABK901bt+/mrO2ajMG/MV0IL3xEhEC4ubX+hj66JUOevMo1/2GkBQONzERk2uk?= =?utf-8?q?wVdw5xD1wzR2u7Y4KyR5Gp487TZb6uZOvPczMdjIkYRPXwIOtG2inSriTMBhdrzGh?= =?utf-8?q?gBKzW+qu9ohH9pS1UJPp/XrfvVg0ZvUrkm5bMcCnrSAWeUKgb8FI9+d1SiFOL4Phu?= =?utf-8?q?kq/uXjtrarNzRwjNZly8WdUP3CkCfMWY2fNLDBsuP87QHL532Jvv9ond9ppK6FYD9?= =?utf-8?q?wHVJvm95lC0s0ba/WoSLLspU3e5FTy/rUC2eBAiBK7S/+ounwsgD+dGnqXnBK6tM8?= =?utf-8?q?YD/JaN9T5UQPUXHRtXRun+CcttEulLQfeuhdR/MuEBC9j5MalZaIJP4MtS6wEJU3+?= =?utf-8?q?919Hw6UGy425B9rZM+/qqhCaJdKtlqC/375WdBSGnyvdcw3W0gMlK7E0ybTS4702G?= =?utf-8?q?n0TcmrOl/xqiV9jLS5cUJozH9u7tHU4stAriJJVHCS/l/19qeZnqTLsEDVhONEGP5?= =?utf-8?q?WYEp8psznItLqVhPk2PgrC9D90eDgS4NkW6kqDOMGPuVIR8vc60ksQLNS1FFiWJRa?= =?utf-8?q?TiGsG+got3xDL7iNdNlRSfAQGUjYh3s4cJaUCQBgRUEcUSKfhicb7EE=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 03f46579-a273-46d6-86f6-08dc3cd8d797 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 05:55:20.8437 (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: 4PxXMQ8/wvVxxwfoyfYqWQyrQsGH1RSdNe1OUl4sH++rBx8a1pzYRaS0bdhboe/zIp4bAQ1601Anvs5mF/sVv1OTjVOkvx5yyUUZL9tiJmI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_215554_114684_0E45C2ED X-CRM114-Status: GOOD ( 15.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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/ Acked-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- 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 ecdce06ea0f9..a43fd80c24ab 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, }, {} };