From patchwork Fri Dec 15 11:56:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 755307 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2065.outbound.protection.outlook.com [40.107.104.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F7662D61E; Fri, 15 Dec 2023 11:52:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="OZg2jsXi" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iQUkcpncIJaTS7w9Z4OqbGSYYLgjFNp0h8KS8KdEvKiAZLf1JlMB0oEKo8qPMxhEyMI13/iKRObitdK15uEAN/o675xyfTZvJcu1np4jeHkJAEhUfOSe1Qr1JBzHZoQGmallAcq3f1XMUTKs4EhEKcevxDkJAAz6Au84aljuZfQQLEKaPrOtS+ytqdtA6/bms2sN02jwxzBJPqWrJoyH3EmU59BGDpHDRjfAp/NKvr6pcxI5Ke/XdZT/0+PdgnUNMkMrV1LhlUUH4yagE+WaOoyZ5MVdpyEAKIKtnyaFpb1/lsbGijuQufhWlul8rb8qVXLZeIcAmKMCVieEYAINNQ== 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=CCB9GqT9L+fZJ0Zywsd9Jf44DP6UKAAsJwON0p3ppcA=; b=Ho718PEzie6tNYBFESjJuwVYu/OXKSarM/WapXiyBznTverfIu+S2Ul5fv/or29h15uKj3srbCxWAw5+659fbXC0AjiGismHcV6AwGDC+LzX4wt4RhOLODz8ByZ3EUo00vgiiXxyU0EofLRQSyfzKxEh+B4WELZodjhTPIVyBBTdSNjp21aAc+U1zpW31TL4itNU46DTsFHdR8mkFVpKXEv7k1VhHR5Y0+LaFxtnbUmgDjOSofjpmP//r5b9oQyrbQT8+MITg7iXdFiVcxAvj+mafTH/Tf/QOGCvYsFFSSZquAkQJGYjVHBDsFK9q+KgoShFmKYVIWrdBoE+Fv0IrQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CCB9GqT9L+fZJ0Zywsd9Jf44DP6UKAAsJwON0p3ppcA=; b=OZg2jsXiPLOKUrWBz3ECSl/HXg6bEwIyJ7IO3ePgiMn9WlVU+KbweJs6+tAmxbwEFDvyD1yOMmn5wJjxLjvUnnYCbb75WVYkyXNSV3NQWujDf2r3BgmsddQCaUfuynjXOD+P2Vw/QPk2tTAUu+9hN0fZOatYSq7ZKSlVotvo4Ls= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by PR3PR04MB7435.eurprd04.prod.outlook.com (2603:10a6:102:88::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.31; Fri, 15 Dec 2023 11:52:27 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ff06:bbb2:c068:5fb3]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ff06:bbb2:c068:5fb3%7]) with mapi id 15.20.7046.015; Fri, 15 Dec 2023 11:52:27 +0000 From: "Peng Fan (OSS)" Date: Fri, 15 Dec 2023 19:56:31 +0800 Subject: [PATCH 3/7] firmware: arm_scmi: bus: iterate the id_table Message-Id: <20231215-pinctrl-scmi-v1-3-0fe35e4611f7@nxp.com> References: <20231215-pinctrl-scmi-v1-0-0fe35e4611f7@nxp.com> In-Reply-To: <20231215-pinctrl-scmi-v1-0-0fe35e4611f7@nxp.com> To: Sudeep Holla , Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oleksii Moisieiev , Linus Walleij , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1702641405; l=1116; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=FRGxInB0b3KsSvsP0EAYnn4A4HfxHZyqmybMfTc2pqo=; b=08yi4PqS38l04uzUotv/HklHNJ5aXPKqCbaoSd3nOAZP9IaUiSURvnfL3v1k40inaoR86gsw8 Z63wwtifZ+7CfUStb0X39byjCJ8/T08jQ2/SM16XAijV2fvTpkC4I82 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0138.apcprd02.prod.outlook.com (2603:1096:4:188::12) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|PR3PR04MB7435:EE_ X-MS-Office365-Filtering-Correlation-Id: b64403a2-b8a8-480d-0f46-08dbfd644f17 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8/t5kQU3wGa38FmqBSI2rgRSEdF+zXACu7e9O4a0q6wAhCu32pMyk23hAIxgZX6smVtYuHqVUsyCD4wUy82gKZ2UOs/2oqq+H7EemAHTwNAgtrds734K3p3DZyTRGEqj78JKhccYMrYgsz/vSTM0OWdXSD8lAjmkJcE20sUcdzDoInPtP1X7ew80NT3FL827n1fBhxF2p2Yn8mLOgG6U8uEpWerR4J82BeGKy1hw2dZvNQuVbftWDEX44aGfYTLvS6yq12UxJPXumy7JHcYd0PJT/kRZxOEX2AkZ5O+vouig0vILEM0W1sKwXYDeq1OsIExC9E/YSWyO2jdyIDqhaIvI3URreBEsjG2GHzd52WapepC81XoW2pEa2kS70FMMV8iqqsDPV4zFrFFfrIf+9zIHWxHOstYTo3lTC2I/Yz4saTFWimSvLKmOX3x+tEnUYvkNlDgXdYMJscUe+atjj41FxWjuewDHCPoIwi9P5sfub+PZzcZpZVo1SYZI9y2h3sMGd+of5kylWPpaoIWdzSg4Axezmt5Qmqz+Gh5owWC17YyFcNZ2DvwmJCdjzPsd+RZFSJ8NzXLK/CFXc4ZzBoA5Al+bZW0pkujUAtIxb/mJcmooH514n8RTQwobHfT2VsBfV10TmG5p7n+5247gfw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(376002)(39860400002)(366004)(396003)(136003)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(2906002)(86362001)(4326008)(8676002)(8936002)(5660300002)(7416002)(921008)(38350700005)(41300700001)(36756003)(478600001)(6486002)(83380400001)(26005)(6512007)(9686003)(6666004)(52116002)(6506007)(110136005)(66946007)(38100700002)(66556008)(66476007)(316002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?hTp/CKBS7y0dhKH4r953dx4xl/FE?= =?utf-8?q?Wg3xFcu4wblsFQYRaf5fyPHJapEXUTfJh/h5zDdahLhj/zPgRV51asEkDsR6Qms2k?= =?utf-8?q?TtbdXUfbBA20C4izf3u93h8YMjDnAyjDoNBYjV/4gcqzT/HyxkNcz1qjA/H99hBbV?= =?utf-8?q?A4R/tGWgUYGsggk1pyoijMPd9wCeadHVkjbL/RpD/0asJGqLUpb3YQN3g1/gQ1ixS?= =?utf-8?q?2BGTn5rWdqrNjZjMJ5nFAy8eT3Jd8846tFAcDisA19QIacHxNBfV7ugONwENCHHqU?= =?utf-8?q?EoejXfnYQhe51LD9ZqiQxSLzUfv0/JEGwdKg4rFQ4Q1r+zEpP/FqjGzuqo8QnQ3OD?= =?utf-8?q?VUGIipGR1Tu8vmMQH4DbjRKnUmHjLNHepqhw9nRiQIbNFv0vKjFbLBgR2VtcAEXIM?= =?utf-8?q?v/hnmfOkrIT86LKU4AiJjhkpCqTkg0yTpzHfvny8wnLyAgkOqcaSHzi/AEx1wUWT4?= =?utf-8?q?2Vf4xMGEiVeAS1RB9NCc6IGnkH4+MuuDB2TizoZEKmo+Q7QqTaJIhNRZUTlzkm9vO?= =?utf-8?q?MX5InaLUlXJQKUnPYMp/BFPuWGWAmWkfaRCQK9tRwdEnM/3iAnGJKeFOs8TAUE5UZ?= =?utf-8?q?mbHzUjMVYgJaTZpNXz/TjA1AHIzmDbOAERNJ50bTUheyXQ7wwj7SpOhUK5eYusttM?= =?utf-8?q?5rDzOauOUDpwVVXA12p1nJLTaPRNZYMQF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nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b64403a2-b8a8-480d-0f46-08dbfd644f17 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2023 11:52:27.0020 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Kp8AQTttAWOcsAcXXK9czwgED3CudeWUr4nhsDE7BxCjl+lRETPlU2aLnYld1cQMv3zpsaMCsDVOjMNjyUx59Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7435 From: Peng Fan There maybe more entries in driver->id_table, just like platform driver of_match_table. So iterate the id_table, not only use the 1st entry. Signed-off-by: Peng Fan --- drivers/firmware/arm_scmi/bus.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c index c999edd18cd3..aeb7da841b9d 100644 --- a/drivers/firmware/arm_scmi/bus.c +++ b/drivers/firmware/arm_scmi/bus.c @@ -282,14 +282,18 @@ EXPORT_SYMBOL_GPL(scmi_bus_type); int scmi_driver_register(struct scmi_driver *driver, struct module *owner, const char *mod_name) { + const struct scmi_device_id *id_table = driver->id_table; int retval; if (!driver->probe) return -EINVAL; - retval = scmi_protocol_device_request(driver->id_table); - if (retval) - return retval; + while (id_table->name) { + retval = scmi_protocol_device_request(id_table); + if (retval) + return retval; + id_table++; + } driver->driver.bus = &scmi_bus_type; driver->driver.name = driver->name;