From patchwork Mon Jan 20 07:13:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13944789 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010046.outbound.protection.outlook.com [52.101.69.46]) (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 5D805145A18 for ; Mon, 20 Jan 2025 07:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357276; cv=fail; b=bIG+zjJUPm2SV9AT7IXUM4ZB3h1NT/okivphykpEmvGXpHg3zYDo5ml+oOfdNfslXsnvCfHqjmIWLvqJXt3s2V8+kz+EBa5VlXZfx2FOEJi/zFqVmQIQUGwmT771BLoEpa17hgX9IU1or6QVB2IY7S0XZ1C0NdkiwRmciphg2Gc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357276; c=relaxed/simple; bh=1KRQeOaY0NwsChU3zgWJrihWfOJfb3GZxCctaJQQjiA=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=L3QRyfCQ+RRgaEVfF778+6nrIUqqXRlpOfL0atJOeZWb/pFJIwgq6SWkLxCqaBIufK9tazdga22K1lynZVnGFLhq5u7QuzpWlkbrSLdM+XmESUPhunIuj3l7JtYmVxiU+BEu9mqWw1dFEXDgdHkyu+20yNjdtRTBVVjW8gxOSxM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=mtRUcaXs; arc=fail smtp.client-ip=52.101.69.46 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 (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="mtRUcaXs" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KcKlGYpBVnwrbEOqQddcyWWESD1EpEpPOZYJQL+5aZfTw5EzcDOl7zL4aO9o4wo3QA5IHOqnYFdFhkOenPQuDQJk1TH3HkE6jUhpfPYXaZS+fb+avybi+S/4+6OsV8gEwEzog3cu7Ls5lqoN2fir7ZXcMKKyzQTUJkKrAW8Eyxe5GzlVXQF1Wf4jnMNQzh2+0yjGkWx0B82XZtmIQW++WJkwsWWXTg45yoH9OGyyam6w9gAXSQy73GlrBDNpsDUak12omubUXgU06qjpRPujr9OMYXBgfHG7lwYDaH7HpHRYmCE36FGlzB0LrTG4fLm6Cmg4KCKHxO36Exq2B6bhHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=erx8eVIlp3RSDPcLYTeD6QYzg9uYKWXIG1suoWmMaWI=; b=SKSQ5m3KDF4ej6uLrMC7CvJglp14LVENg3P0R/fVcp8G7uLqrm44FTo9c5sGsCMWsRM2G3mgCa2AWby0KlzeafI2CvjTYRvn6kJ89D9rx0fbuQL3aQA8YHbAyzZvGigABRbye+jk16uxLaJjFdoIYTPSXMQws9ZNfQP+bP206/1CXFLArIOIsYSyd1i32Amt8/pQkvVI5FD51bZmeGZd/xCltxcmckAyCtAgw+0Rt72QEKj1BSug3gDErKzha5BmpOwF8gPkOG/1bS0XDFg0XFPlvcwpCNlLVRl8GTv0KKIsxteD5mjICJy9bQAO5oVcj3eIWPQmziUqQ24qpEwWNw== 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=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=erx8eVIlp3RSDPcLYTeD6QYzg9uYKWXIG1suoWmMaWI=; b=mtRUcaXs1Uj2BBDlIuVm+aJkDG2+pSTtajqihR5QXm63XA74uDYEhqO+XLQr+8k3mvjAt8CTYJjFW/i6AMpCAVb4NOySkzTy5kLKcAsQ5UPA/7nkn4QI5u0dOsUUTz+Z4z0Wo5gbWioGR2N2p9dvKTcHvbPU5wvdEHKmxVmuj26chbIBtdpPwRXgMVqL+hL7XhPwkiU2lpr/eknd8zQz9TwlsiHkk+Z8A39ZsQSBANTFb91LfG+di3ywGXOqLjP1dUugJW/jaLPGaBvF/C28wFCwdCDqTDiJOd8WJoTHgb9oJTO93em8gm9zjhY+PJ7zNNVnY9yG/g0YCN0UCbuafQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by AM8PR04MB7442.eurprd04.prod.outlook.com (2603:10a6:20b:1d8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.18; Mon, 20 Jan 2025 07:14:30 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8356.020; Mon, 20 Jan 2025 07:14:30 +0000 From: "Peng Fan (OSS)" Date: Mon, 20 Jan 2025 15:13:29 +0800 Subject: [PATCH v2 1/4] firmware: arm_scmi: Bypass setting fwnode for scmi cpufreq Message-Id: <20250120-scmi-fwdevlink-v2-1-3af2fa37dbac@nxp.com> References: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> In-Reply-To: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> To: Sudeep Holla , Cristian Marussi , Saravana Kannan , Linus Walleij , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, Peng Fan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737357232; l=2383; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=TTcs1ka8AGza401JDsGE2qHEBDq+jKflhkDqiuEGx+Q=; b=1btUXnBuoQIXcElwpFmt/LWfmSpOvjKwRqA7P4VwXaKv7QpbsJCY1xXjKxtfoMKw0L1xj9tGs rqA0MRmQE18A7oVFSZgfW07JGdpYijAMYCdc3US6Y819BxGd9RU9x+a X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR01CA0129.apcprd01.prod.exchangelabs.com (2603:1096:4:40::33) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|AM8PR04MB7442:EE_ X-MS-Office365-Filtering-Correlation-Id: 2886f9c7-c03d-4110-51dd-08dd392214f7 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016|7416014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Byj0ipgfDkLPesimIZp+SyLFw/9hLnA?= =?utf-8?q?WFlYh/L0H2Z+X9nHDvX1cAP6rfvPsVsXE8IJqenUNN1wmjeHgvzDaz9EiEJhvOEOn?= =?utf-8?q?xx4BVoc54IegPzxxb00uhNy7PJNyxi2zYryRFk/IX1/ox03g1YwMzpUN5kdVWknTE?= =?utf-8?q?PtD6AMv1117+WZstoxHV921fF1rvZeB4x4kaqdesVbbyDpbHYAh4bDw45rXjqtqQg?= =?utf-8?q?IDdJRQLqrVCrLBK2rHYgYEUnVWQwEe8fFFjy07UbwbDlywKlDMo6cXIkLtxyFGokq?= =?utf-8?q?Zks7ec5HqYSXHbxr3AzUFT/tIrj9I5rt+C/+lrwtUdnqVBCMsVogbuUYvBRM4pLd7?= =?utf-8?q?twALEp4Vnt7QmoWP10NneZ5Q4v29Zs+GF6pfWr4gfrLx3lZdMULIhkycCHadasK1E?= =?utf-8?q?0Xi6HdFTVoF2gGwZ2oZRW5APzYmLjeRiL6XRjtScbiJPo9JHkvjloveKzobutvDrE?= =?utf-8?q?hIQtlJf9PeJfMK2+nWRUumCEzdTFU0y+jbQVtZ1DsdFSwPChB1xHW4hY0jLH3sayL?= =?utf-8?q?9CMWLVpfMdkkJXfTlXmd2FKFe44ps3TRjNhXoHNTT+/+QBwWTie8lvjzY8ZpBJ7/F?= =?utf-8?q?DC/vdZj58wKPEsDcatWMyFxkhpDvFGBFsaMeoF/Rcsv4LnCuAgsHOyO64lq4aUdlJ?= =?utf-8?q?Sj5FyHuYQQExmcFb6Z0Uq9LFfMPEB9IcCSQndf2OcEESGvYamwmuXXNLC0xm5RUG8?= =?utf-8?q?q5zhdO6zSjDa0xw9eJePm9siFfAyPgsN12ZCaPcVFdRcOqmYpqSb5gLH6EOqC55Tf?= =?utf-8?q?1NzSw37Ta8kR6jEGEiAPoHj0K4c2PEF9jMXnoutiYTqH1Y/jUo1DAVaEXG2SSvKq/?= =?utf-8?q?yBNOcvg+DVJkLS+KghMsgiWEfgOsJP2UIfmIxQx0m6zmTtxIHiY6HaCR0TWTaluXT?= =?utf-8?q?tobGbWGwcKYJKxOjjRko8bsTZZPMPmX0VFMdnJayU4GGMgVSUvCitVu6L98KYHu16?= =?utf-8?q?KW4AIqVi4RnnL04FphA3gD3sgfe8g/YJ8eYh1MtoWdEFtvNRFYR0CHfftZcDyGBiC?= =?utf-8?q?yPCNnyS8ot5RORqZKHBDWmXOnA/dibOpRXp6Y0v9Yiao5aXfBbxppbFyFCoYzgdef?= =?utf-8?q?UGYg0AsU82T/9AISKemrD8yyB/hN5T7EZF7+J1PrqFY6fNFDVVJn9BAj86nkqBG9Q?= =?utf-8?q?Bok1IBMoxjnrYyJV8QIEvcEdlSG3B5CPi0SMpU4j1zcXPHomViVbfLmKNaPYXPs39?= =?utf-8?q?BBUquVZaTVvPFASvSw4N0l7cwXzU2TdEdV1UHMfMMPgylcb2uaSPs6S3jSUF+U8pF?= =?utf-8?q?SqCfXFqNe+KYhQclXZyvGl2xWyAS5qG6FoY+dkQ89c884lxLnjXAsec3G+ORK3x4o?= =?utf-8?q?EiyGLIcbT4IAI+T91SdiWHSv8Eeivqz9qzQR8xwTeTlsxuHBb+ca4C10bsPHsdh5E?= =?utf-8?q?JmCvI05dlIGymP5y2IsFBUHuxykWdpk9w=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(7416014)(52116014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-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oRa0qH?= =?utf-8?q?Ij6p9zNlfAbB0p6qZjig09vfOtQypIPp0Swdw6qOBHT0H6Ef8Fy10KTHaSh2o8ipI?= =?utf-8?q?vn/TJb+SFMXwmIdpESDo97IVuyOqtWIuXlgiDIDxIayhhKDzGVgSk0x790ER9H029?= =?utf-8?q?m1zFrJFWMnMtzeDl/niXFqifq8MRfzaTxZTfFJn2uvZCvg/hP9ZSCzwtIDYlgeutq?= =?utf-8?q?k3iTmSPGv/KnsUxOxXxdGfDTPLe64FGcvGQE/ef+WYSHqVA9uT9bjmpnReHWhshFy?= =?utf-8?q?ylJ5L9zJ26pyvQfmkXKJl4oiz281j6C3konrlClEjDG08ovPtOv+VfrYAnCkPUedm?= =?utf-8?q?U4O0N6YJIYoyTo+DEOzo9pbrSU4zCT87sMgXpRvWey+idHmoagt31jUznrNPBqvLh?= =?utf-8?q?3TS0aR5gbtPun+k7Nutb4zS12BO+lUszPU9Fnd1vdsGeMq+TNijo3+rNugGGOZHK9?= =?utf-8?q?jgcfI9wwVn4kKkglAjy+JLNsmGnTHHxTkwPmTt6LJA9mqeAVIX4tzzDMgmzcx7zlL?= =?utf-8?q?3Jtf/H+FTN86XNtjTM8N/nXSR9Jt4LaMuhGTP/UDfsVzSYv8mpt+QNWfDXdFRTsvn?= =?utf-8?q?aQiQRuZ5CSQgLw31Za6xTO+YOX7r156gGHWrUl1/L7kZvViT/ZxLkgJdVO1mjyzHx?= =?utf-8?q?+qy2CQIOcSC0iXqlI5Ljn7YJnz97y5UMjVOoSoj86LY/4tx8J0xk1DEJlBxQmWz2W?= =?utf-8?q?6rddpyxCI7uZ?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2886f9c7-c03d-4110-51dd-08dd392214f7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2025 07:14:30.1672 (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: SZJWl8Y2QBWHsU/kTRaI83yyKJCEToKmC2v9xd08BH1L2FQ4MgBg3+NRHD0XcAMC8Ex195IYWjimiK2LfUqbKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7442 From: Peng Fan Two drivers scmi_cpufreq.c and scmi_perf_domain.c both use SCMI_PROTCOL_PERF protocol, but with different name, so two scmi devices will be created. But the fwnode->dev could only point to one device. If scmi cpufreq device created earlier, the fwnode->dev will point to the scmi cpufreq device. Then the fw_devlink will link performance domain user device(consumer) to the scmi cpufreq device(supplier). But actually the performance domain user device, such as GPU, should use the scmi perf device as supplier. Also if 'cpufreq.off=1' in bootargs, the GPU driver will defer probe always, because of the scmi cpufreq device not ready. Because for cpufreq, no need use fw_devlink. So bypass setting fwnode for scmi cpufreq device. Fixes: 96da4a99ce50 ("firmware: arm_scmi: Set fwnode for the scmi_device") Signed-off-by: Peng Fan --- drivers/firmware/arm_scmi/bus.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c index 2c853c84b58f530898057e4ab274ba76070de05e..7850eb7710f499888d32aebf5d99df63db8bfa26 100644 --- a/drivers/firmware/arm_scmi/bus.c +++ b/drivers/firmware/arm_scmi/bus.c @@ -344,6 +344,21 @@ static void __scmi_device_destroy(struct scmi_device *scmi_dev) device_unregister(&scmi_dev->dev); } +static int +__scmi_device_set_node(struct scmi_device *scmi_dev, struct device_node *np, + int protocol, const char *name) +{ + /* cpufreq device does not need to be supplier from devlink perspective */ + if ((protocol == SCMI_PROTOCOL_PERF) && !strcmp(name, "cpufreq")) { + scmi_dev->dev.of_node = np; + return 0; + } + + device_set_node(&scmi_dev->dev, of_fwnode_handle(np)); + + return 0; +} + static struct scmi_device * __scmi_device_create(struct device_node *np, struct device *parent, int protocol, const char *name) @@ -396,7 +411,7 @@ __scmi_device_create(struct device_node *np, struct device *parent, scmi_dev->id = id; scmi_dev->protocol_id = protocol; scmi_dev->dev.parent = parent; - device_set_node(&scmi_dev->dev, of_fwnode_handle(np)); + __scmi_device_set_node(scmi_dev, np, protocol, name); scmi_dev->dev.bus = &scmi_bus_type; scmi_dev->dev.release = scmi_device_release; dev_set_name(&scmi_dev->dev, "scmi_dev.%d", id); From patchwork Mon Jan 20 07:13:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13944790 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010046.outbound.protection.outlook.com [52.101.69.46]) (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 B9C4D145A18 for ; Mon, 20 Jan 2025 07:14:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357278; cv=fail; b=ad4BEnOkQxQ0ZDLAaZ6UIJsAh2DZ/T26aZpjKdyZrGhZdx3IpDh2nskiyrMKy45D/Y82ZGPcv/GzbH6fGXUxU6nTqACU15KMWDmITyxTYFXMkWn8rY9dG5iBwzvr5jyxlRRvJz0O3uLKNNQ8f5poGXgjOUOt3wqKgDkD3SuHaVA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357278; c=relaxed/simple; bh=sp+OqPQfpWgE4cAJIx1oo5i1nCWvRdX06yZ4FCxSaNg=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=A4Q8LmDwNADj8LnJKwG4P0/gmpxXG03MYPioLlhin9DrHtntx1JAtEHdwWgJA2i2I/449vnEikbePN71Jj4LPGWVnkoBnxlb97jzs0vjUgkuwjZ4k93OjqMkCa5/nCLdeKVDay4ZKYWuVLyqZORkiAA1oniTO7B8wzYVi++ZPmg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=aJBKPw5s; arc=fail smtp.client-ip=52.101.69.46 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 (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="aJBKPw5s" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WcgalTFbfcpsV+yDz05D3jlw221QK8z3V+PSnbSRtNboZQJF4kHQ0CjqScOxR6VriiVz2awycFabd8NcFVwfO/+qRYpW7w18epEP6UETdbAqDQu+C0JdhXOJM5fgFUoSgbWXaAxIxyGz1crXWbju7eoZ9gPPkzXfZFgFjSQoC8f47g61rvc5vZdFH80+oqwLUlq2nvzSH7DEXqi3Kp4I1WJKRW5CcOPWlwUQlwrmN1IYLJihp8xSalRy2IB5j1MTEx0ZUaQ/eq2liOykOheVBZ2/u5BTRTxuNVimyt1qlO89Yewn5D3RtFcdUF+R59rfohw6KiHi/OwczEAUdpyQFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=5N4soaqVvGniFGVKXuIwxhaCY94c2fcgCzLF1RtnT2U=; b=gIGO/zI9f8xeblbFH9S5B1/DAMJYEmNrBmkOugjU5TjFbDGAD9oYyPdavFwBKzwFwWlOtD5dBjzme3bR6l7AaDKi3qoI7EPQd8MCLWyBdWpDYOoFIOo4eVQBo+bc9TDiPDYXCJxxxEhBsJn1ESzDsrSYQnFBoAcJJhulJ39xu+FApJKlJjXIpli7j5kLdoKHGRNeOk23fK6M+X0BnWCOEa0nO8PWxml14mISFFDGmxwl0jb6OFB2HVugWxOfDOjl+CE1W4d3GHHHKOLJXuA7qboJDld1Hu8BJe/97WLodxfPl5uxMhZ20G2isrwXtmK1ykcCzLi590YZXcDdnqRz6w== 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=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5N4soaqVvGniFGVKXuIwxhaCY94c2fcgCzLF1RtnT2U=; b=aJBKPw5sUMahEG6vJrQn5QdseNQzNUu+PQmeyK8JNI4jwIOSXHkzsJn+6pBm7XZhtujpo8VAE2SWlfuNiKolFsMGHbMgPfDmNTBa461k1L8Dd3AuC/PTO111rWcTNgVcAbFz9kPRSiqQnm5UKwj9DE8+qnb0DV/4zmWjusu0tWvhfJcG+qt/YEmBLWaEIDJwYUm3ONaSCHGM0rJcroxBv+s5li114spN+4bdPsx2qXc6DxBEYz59MqfImTeoi72I+ytxVt5tYJheQPl6ztVHxHVnaciMqk+aTnhyhBa3fcA74zLXq26FQ1pp+ycrbIzgp5ShE1JXHnOoks722AcXzA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by AM8PR04MB7442.eurprd04.prod.outlook.com (2603:10a6:20b:1d8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.18; Mon, 20 Jan 2025 07:14:34 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8356.020; Mon, 20 Jan 2025 07:14:34 +0000 From: "Peng Fan (OSS)" Date: Mon, 20 Jan 2025 15:13:30 +0800 Subject: [PATCH v2 2/4] firmware: arm_scmi: Add machine_allowlist and machine_blocklist Message-Id: <20250120-scmi-fwdevlink-v2-2-3af2fa37dbac@nxp.com> References: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> In-Reply-To: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> To: Sudeep Holla , Cristian Marussi , Saravana Kannan , Linus Walleij , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, Peng Fan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737357232; l=2685; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=aQkTl5KnV+Ghr5dkzA87eUlMVoRB+D46A6vU1kqaigQ=; b=2VL8YIT/05Gg64JAQiw/Y2bzpscQRRjXN/on6j2pFc5P5hM0/NihawvdpJmFbEJQQb+20Rg6M MfGAJ+yl1pdBV6ezgTlbGKzcXN+C9vgw3n8RcKHVIZ7a14O6HG9YCWc X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR01CA0129.apcprd01.prod.exchangelabs.com (2603:1096:4:40::33) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|AM8PR04MB7442:EE_ X-MS-Office365-Filtering-Correlation-Id: b7d68899-72c9-40d1-3a60-08dd392217d7 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016|7416014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?33SSD9fpp8M+1STcCBONy63Hu+FhK3F?= =?utf-8?q?RAHJhbnCae+G8Wh9Ty5ErCyTqaDz+1l471+EB0keUASy/iutNc5fgQOnPVDMvwbUZ?= =?utf-8?q?M2XO47kiHC36roJ2dpuuFM1huvfP3vNwl62ZXBn6apc1Rm9DhdFz0n5kvbUMhHxef?= =?utf-8?q?DYLlCdk6gSttqvs3WlMSi3DfR0jz/H4TOql+4wQnwO9XiKVJ0DGs07NAmmFnHg1Cd?= =?utf-8?q?6JJB2mNBNi/Q0Cst2cDq73CK/3QpEPG08YkL7hrjCGOafCTwi6hxLdpLZdDTfsxFp?= =?utf-8?q?rCPzzkKf7v391knTfWonaJNu0zM3rFlQjtR09naa8vus9ccHh7Gc6B2zO4JCJdXeZ?= =?utf-8?q?TlyLNRnflEH35wEzfsJaVTFH/ZosHdi0EVvN6Po07HL8joQ7lY50FbUOVv095cCr0?= =?utf-8?q?v3nIr+4V06OaWCax7y300rMFfwaOG9OnRRaU2Tm80g0iWJDff1xeEEin1y3eywP7X?= =?utf-8?q?gDe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eiSaTHOkkXbuqs55yqgABll8OFW2LkueGGjI23m+TGQjrWMbi7JfnB?= =?utf-8?q?/rWY4sIQDb3?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(7416014)(52116014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?yiWm7XZeZq9COmWusj0AUR0ikwFS?= =?utf-8?q?aD20FZHYkEn8iPsJ9g1YXn4X1R5cgXcL5r9DYpY0H/0pzHBKgWu3/em6ufXwzezbR?= =?utf-8?q?fcLhCD71w9GtshTEhEQJ+JL4IKysnCQrfwOd3JGcBW5hp8VugXGEXBXFNaLWk99mM?= =?utf-8?q?0BWH79AKXqk6Ha2n4cF/hcWi6zjrnwtyaBz+x1m9Kz9ABO85Y15j2ZCPb7DXjeW+6?= =?utf-8?q?hbPkonR3kaCcC0oAzC1G3r6VVypEmXjC7xneyas+6UtQFa0VAGPzAGuW7WVgzGsKL?= =?utf-8?q?+5ljaYq9yT9wRJolCTN+kYQfXfKPqe8YdaIvWiZkduDXprxftH7ydUo8hY/1BQFFm?= =?utf-8?q?WQR025wbu+xlKZtj3rbRSuyL1iONJ6gjB4HleFeHjV94kxTx9Nt+Z9SBefo1L49se?= =?utf-8?q?m88xydQUItKb33Dg98MYO7aKb7c9eFpEV0BNrzq7r7Gf3PC+lr1r9BDpGRUMMguze?= =?utf-8?q?4IQtPfoU4dhsfq3BWp2b5bqZg/MoedrTYuGuz37AgDBRRXjJRLHSJQHyMb1TNHAiU?= =?utf-8?q?n9k2qWfinw6EZO/6Ir9eGag3YvZ0fAeJaL0mFK2Wq4LCPbvHiekN7KuI9tfAhvCXS?= =?utf-8?q?T9zjF/6e9IbMTmd7cAWeQhNY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LduW0Wn39Hua6gmez8WMMMOtib6h6wweIfWG9QMUv93O+3T?= =?utf-8?q?xtBFdtMKaX5x?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7d68899-72c9-40d1-3a60-08dd392217d7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2025 07:14:34.9012 (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: REi370fSPUW4AcLbqJ4vA4XwXQMrOWGlh+kw09ku3PJ47vzlyFEoB2eGWhY6g9Kwa9UC3rNm+MJAubKfxLb0Xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7442 From: Peng Fan There are two cases: pinctrl-scmi.c and pinctrl-imx-scmi.c, both use SCMI_PROTOCOL_PINCTRL. If both drivers are built in, and the scmi device with name "pinctrl-imx" is created earlier, and the fwnode device points to the scmi device, non-i.MX platforms will never have the pinctrl supplier ready. Vendor A use 0x80 for feature X, Vendor B use 0x80 for feature Y. With both drivers built in, two scmi devices will be created, and both drivers will be probed. On A's patform, feature Y probe may fail, vice verus. Introduce machine_allowlist and machine_blocklist to allow or block the creation of scmi devices to address above issues. machine_blocklist is non-vendor protocols, but vendor has its own implementation. Saying need to block pinctrl-scmi.c on i.MX95. machine_allowlist is for vendor protocols. Saying vendor A drivers only allow vendor A machine, vendor B machines only allow vendor B machine. Signed-off-by: Peng Fan --- drivers/firmware/arm_scmi/bus.c | 14 ++++++++++++++ include/linux/scmi_protocol.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c index 7850eb7710f499888d32aebf5d99df63db8bfa26..76a5d946de7a8e16f5d940abc4f542aac5bb2b92 100644 --- a/drivers/firmware/arm_scmi/bus.c +++ b/drivers/firmware/arm_scmi/bus.c @@ -55,6 +55,20 @@ static int scmi_protocol_device_request(const struct scmi_device_id *id_table) unsigned int id = 0; struct list_head *head, *phead = NULL; struct scmi_requested_dev *rdev; + const char * const *allowlist = id_table->machine_allowlist; + const char * const *blocklist = id_table->machine_blocklist; + + if (blocklist && of_machine_compatible_match(blocklist)) { + pr_debug("block SCMI device (%s) for protocol %x\n", + id_table->name, id_table->protocol_id); + return 0; + } + + if (allowlist && !of_machine_compatible_match(allowlist)) { + pr_debug("block SCMI device (%s) for protocol %x\n", + id_table->name, id_table->protocol_id); + return 0; + } pr_debug("Requesting SCMI device (%s) for protocol %x\n", id_table->name, id_table->protocol_id); diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 688466a0e816247d24704f7ba109667a14226b67..e1b822d3522ff25168f895a4b1ed4c4e9a35bfff 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -950,6 +950,9 @@ struct scmi_device { struct scmi_device_id { u8 protocol_id; const char *name; + /* Optional */ + const char * const *machine_blocklist; + const char * const *machine_allowlist; }; struct scmi_driver { From patchwork Mon Jan 20 07:13:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13944791 Received: from PA4PR04CU001.outbound.protection.outlook.com (mail-francecentralazon11013047.outbound.protection.outlook.com [40.107.162.47]) (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 6F837191F98 for ; Mon, 20 Jan 2025 07:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.162.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357285; cv=fail; b=hVbo5IdgfvCCvHpaXCN0Q8FKd0dtLbBgWeRxmOUYzydsbo3zBTQVj+tCbt0PzRD3945W9asX/gjP0pG3gEF6jWZU+5uMcwK9okcsKBvh4d55mjV3VrOYzNM2gSBabve5oObh19RCnVkgklW1rBhSrPMMcfk28Qk1JZHrgD523K8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357285; c=relaxed/simple; bh=AxZ1+A8ksw8Nyhdc+1dKlBIilh5HETwjGy2jFH+8qzA=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=eYIWZ83r+SdXvcOADWRY62MBGNc0tLWAcPa+ncdwm+ymYNhl3INi2yVvZ9AjaF/ToD3rN03KXlSTmzQubRPAIAmqExxTcrq/dxfkWZCIJ9JSDiYa0DWmhe1NBVGcXHENUH++fKYYnuea8Ma0XYeMHDYPZjRdQ9+Qy2ydJMw6yvo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=ICHvNupe; arc=fail smtp.client-ip=40.107.162.47 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 (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="ICHvNupe" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lnHWYyw5FYac+g54BFkbfYguepicGAyWBnGtAI8yP1EbzopKUH6dAQcG3IuVTjXZN5We7Szbvr4ulVdJh1OXNth0LKNWQZnIcFOxtqamRUeTb5USQhyn2lLzyoFxndSipS3LMTHXRPghiQK/RiLWo7DtA6rQCTuEyy/FYd+kxayizLb06p6E9DIjdT5PDO51gFlFIdeSz6nZX5Pahzi3KuKUEMdGpWfZUiwwX9LlCsAL1EogaDc7+gUqvUj5V8sfwke0bX7kbTR70mYgU1IU/PlnVeKdX4iP9Et9PlD58uV1hIdvRZvm6kqFBd6O1fi6aMc22hNZiXitgn0wv8M19w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=WLP9ePf8DIdQ8k6igl4N111BxUUl2NNmcWYXPawAUf0=; b=xtpPgymMjgF84Cu50ZKhkesMCQeM8rGmrPf7J2K6Sul7I1AfeIVAoGNNarb73kY1vewNRwLW6lLsWzW18GWqLxrNKChW9QZn7sp3sUtKiX+KK6Vbe5ketIelyhigDj+6qQIc0DFeYt5PqyBTJ0XxYg4bBNXgbb0Vh0FM3gs3c64ZukSdFqkYgMarH1UGo1hrDPKT9tNX+YUWaPy5txvwBaumyQk6+rdmOCf/SD9TI4veXCmSwWTYwYROcJtV9IWl9J2RpiEXCacble0mc6ol/TAhtv2H5IlHRzwC96FJxVfe4vc9B4jYGfZOsu5foAyGMXS/na7DiBwW4mlmgBZ3/w== 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=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WLP9ePf8DIdQ8k6igl4N111BxUUl2NNmcWYXPawAUf0=; b=ICHvNupeJrrSOrckpvttE+KTLTe0XmeY69oHH/t8nPNAbgeNhBFJJz0/1NmvvNmOSO4CyfM9QU2Sz8Jl70kTfZoHOdK1fBSZRpq6iLE7gfCc028+zDYlAEzYhiRttntmluuva4iCzvBVdfe1vF1b5nvEZ9WG5ySy1EL2tw7+pEqdTl7xBxAR7Oe34wzQsJopyw8WJ0IAZyJZ/Z87PyZA6ixKg4Lwust5PqZQzGT670sYDx+D1QFHVgbxMOzddz52RGMxZHlIGaj50bC+vLVd/vt16E8ImYzmPrRLokSfHz3X3hwGugf8lA8tZvBzzHdv9ws0c6dHtAl/4UyKSl8Mrg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by AM8PR04MB7778.eurprd04.prod.outlook.com (2603:10a6:20b:24a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Mon, 20 Jan 2025 07:14:39 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8356.020; Mon, 20 Jan 2025 07:14:39 +0000 From: "Peng Fan (OSS)" Date: Mon, 20 Jan 2025 15:13:31 +0800 Subject: [PATCH v2 3/4] pinctrl: freescale: scmi: Switch to use machine_allowlist Message-Id: <20250120-scmi-fwdevlink-v2-3-3af2fa37dbac@nxp.com> References: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> In-Reply-To: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> To: Sudeep Holla , Cristian Marussi , Saravana Kannan , Linus Walleij , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, Peng Fan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737357232; l=1763; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=2s7AFkufdGtLMEQE7ZFE1TCbdTfpzQN0LEcffg2DHes=; b=OmHYdKsZn53XzTgHlqAfjmWlrWi56j4pV6t8zldbvzdb5Onl8BAvIssNRRvl75m5TcyZbVzsd zTg/3xdGzJSAbygPKMXchIItDH47Ddqr4sWDu6419a3m+d6DIdv5kax X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR01CA0129.apcprd01.prod.exchangelabs.com (2603:1096:4:40::33) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|AM8PR04MB7778:EE_ X-MS-Office365-Filtering-Correlation-Id: 9acb8423-1591-46a1-9848-08dd39221a78 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|52116014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?WwGoMIabAiG0uRQL/ABZjvTJ4ja0IQT?= =?utf-8?q?cYuSJ+KZvij3vscakazn9bMb0oZlIIZ938maFtOlbaOXrPPBhtTKtDj97+bOlkar8?= =?utf-8?q?SliSSV1w22TfSJEAH7SVGY+mQM+A6LsYN8OXCPvPoUoO9773bV5GQE4XiD6VXwz1g?= =?utf-8?q?M+sRmtUUniEMoHoY3ziw5WZ8irk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gLjRcx4Plc+9IvB5QTGa9+9Y5UtgifUBF/FVD?= =?utf-8?q?4A1OI4hXNGh7pwC4BMSqk7JIIwdbVB2gCd904SHXvJ3ZV+AaNtEDAaXghRl5Ih82e?= =?utf-8?q?WEH60R2ejiG+LWkYu0ZI49oB+k05frxyBNHRByUveTx57mU01xecbxJTD62pXOKkb?= =?utf-8?q?pHOarDM01ny0mqLKSEv3818fuy2/bq3BOJZJ3uKaGWpEcS9FuN3O4friVlhbXxOTX?= =?utf-8?q?rUP+SlGiB5uazSPabI4w849OAHFZtjaKpm/9etGKwbMRSMxi3MNjP8Rc4S/H5opaM?= =?utf-8?q?RI+r0Ol/OxiDAFz8o6ki/Y/4+EnapRc/H8JEn+SeB+OlRN5HfQijr5D+CXO66A25x?= =?utf-8?q?T9VQWss3FW0WJAASsKPWBBn6Gr13UVb5Q=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(52116014)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?9jMXg5V4fVUdCJjb0NT8glwR00WI?= =?utf-8?q?aJLziESlhcCmdlVgVQo9AOhFzuZmlvi3fK+fNQU8Ybd3giGhjN2NhmGkGplHtgd99?= =?utf-8?q?IDeOK86gm05U2BXD/jY1yniEk1xoG69uar/1hNSj46uDDX7TI9khNDqo2DOaAmf7Y?= =?utf-8?q?mvUFsPGb7FDpetGnGE3pk3c6r12jj4E3GKw5J3EPecjfy9m/iADOrjluvG9MJtpSu?= =?utf-8?q?QGXDFmpRZjfv9QYF1lC5RD6uUtQ/dZoC92cirWC9G+AFWv5EoTUTj3dmy6lyAi+MF?= =?utf-8?q?ky8uUW/n7azQ04pWDe+C6O33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8YcKF2BoqTwlUHXB1rQhKDg6V2ay1mUHR8awb6Cvm+Ocll6xGc?= =?utf-8?q?EbUaB6Kuz4kAXwXS1fySNZqBO8O5ckGecbYrvPN0MHuRZXilkCBoqa3PhhOQj5xIK?= =?utf-8?q?edcl4FkW+0/sD5qqYi1PnFjAduQga1O38JSDC8Hh7J8JlhZfNWzqWW5xd5r6sIe2E?= =?utf-8?q?o8umlAumSMv2R/NE78KzKfOOCr+LYFSEyC6OV8ouTald96q2EBbkn/xY052t1Oxth?= =?utf-8?q?gDCWiVhXqO7/jPg5vg6tYt92f7XIorwt0RkOoHasn1/y2esadTVgus0l2vJPMN8FP?= =?utf-8?q?Xh57cFwChFOPlAgEV7QX4bB7GpS3oAypze4E1IdG11dDH5X4JHkLQ0slfq3e1WHxu?= =?utf-8?q?+NpHXBLL4MWk?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9acb8423-1591-46a1-9848-08dd39221a78 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2025 07:14:39.3248 (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: QDk7pnRgzhcu7x+9aK7fB3dtQ6b19ALlBADvihW9UTlbWDr0BwpBHRHHK9Z7kd7Q0ss0nGnq6ZC9cabRr42kBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7778 From: Peng Fan With machine_allowlist, only allowed machines have pinctrl imx scmi devices created. The fw_devlink will link consumer and supplier correctly. Signed-off-by: Peng Fan --- drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/pinctrl/freescale/pinctrl-imx-scmi.c b/drivers/pinctrl/freescale/pinctrl-imx-scmi.c index 8f15c4c4dc4412dddb40505699fc3f459fdc0adc..058b4f0477039d57ddae06f385ad809cbb4784d6 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx-scmi.c +++ b/drivers/pinctrl/freescale/pinctrl-imx-scmi.c @@ -287,11 +287,6 @@ scmi_pinctrl_imx_get_pins(struct scmi_pinctrl_imx *pmx, struct pinctrl_desc *des return 0; } -static const char * const scmi_pinctrl_imx_allowlist[] = { - "fsl,imx95", - NULL -}; - static int scmi_pinctrl_imx_probe(struct scmi_device *sdev) { struct device *dev = &sdev->dev; @@ -304,9 +299,6 @@ static int scmi_pinctrl_imx_probe(struct scmi_device *sdev) if (!handle) return -EINVAL; - if (!of_machine_compatible_match(scmi_pinctrl_imx_allowlist)) - return -ENODEV; - pinctrl_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_PINCTRL, &ph); if (IS_ERR(pinctrl_ops)) return PTR_ERR(pinctrl_ops); @@ -339,8 +331,13 @@ static int scmi_pinctrl_imx_probe(struct scmi_device *sdev) return pinctrl_enable(pmx->pctldev); } +static const char * const scmi_pinctrl_imx_allowlist[] = { + "fsl,imx95", + NULL +}; + static const struct scmi_device_id scmi_id_table[] = { - { SCMI_PROTOCOL_PINCTRL, "pinctrl-imx" }, + { SCMI_PROTOCOL_PINCTRL, "pinctrl-imx", NULL, scmi_pinctrl_imx_allowlist }, { } }; MODULE_DEVICE_TABLE(scmi, scmi_id_table); From patchwork Mon Jan 20 07:13:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13944792 Received: from PA4PR04CU001.outbound.protection.outlook.com (mail-francecentralazon11013047.outbound.protection.outlook.com [40.107.162.47]) (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 A27251922E7 for ; Mon, 20 Jan 2025 07:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.162.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357287; cv=fail; b=ZEIRFvccnwRsny41WTni2NIl0vT22sytuad8x66eeRr/DUg6rnyVwxwE2Trh0PVO3yNFlhJhOG/H9OtCaCh2s6tZey/nQGmOOzdw6H2Lu+p4CTO9WktbveNaS8LTSTRtn9gLT0N6qgMKx/a3H9zNGRmLj8fpD0tJMnpYZTP0Lmw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357287; c=relaxed/simple; bh=nkl5d3YY/qHLV7k8ahkYMZBbTm/SeFBorP6JxzMdbTk=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=nzVY6YbpNTcFMfv3GgP1nsvsFvxZwUvq6Gjpev+0hHsCiYMXd/8CjWwXR8TM83WIPE1i47i3i6STbxNX36Ug9P4hioPnfV1eV0kocLnmFYWplqdHFb12xIcKZCFOuTb3i6ljCuZF6OhNZ9uIfzdlhoL8Esbw5Gwaq452fC3RHMo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=UhS0AXxC; arc=fail smtp.client-ip=40.107.162.47 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 (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="UhS0AXxC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=f3b4cwnVJHOCM1fyQQt75gvGB5ScpYgZ3qFqQwY8DWElb6a59h2QnakUmWipgXjVqGCrFO9Ycr8xCcUbZj5sTFDXb/hvVrakC4RrXojkfDodpnG1OqlXVxWPN5wSbtAuz9qEprw7IzyhxGf2Zf39TkB8BQQMsPbekDg43rHCZJE0k+coXgSFjPu9fRTM4fgf17Ek3HE+vEirAcUORrjCnzbRBlPBp3r3PFSMGOIcV4tOX9pDMsTmbHemA6JyOBCvx9xDMRaAbWdwnL2w2iDokOZ35bOdigo4pyyXbxfNKSMmsjArs7yPSfKmOcrT9tsGQSDYnPQvdV/xgc5UtOW/qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=HikyuC85c4OtraaH4/n4z+kHD9b1BNSNvuSvTdQjvkI=; b=hdbbgsKdVKOieERjBFB8vdRkaPCdB5lNZMUqC2J4ZW7JMS8DcbENlWHvFncN/sGr/yh7n+kPnHMKRdz7HrIxAWkwn+EFRVtOW5SjBGnrCvRnhon4cVG5R/rrGOFGhBdFw6thLRnmgS0VKusu8k11LfoM4kC9iL3zYNggIEh+M76jIR+0043CHx9yYQWE9C0MQWHsc18RBLPOqCurKtG2Q9aGzs2IIOcTFp5kDaVdnyftYuRsjpiRZ2rym1tR+aEZ1FPj37pR+AOiuGx1ZAHaKgW9yCaLNFC2JHz5IlkL4HjQWlf6Ym69iOU/L5fkmytSHDhK3dCsajeZLeNOFnSyAw== 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=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HikyuC85c4OtraaH4/n4z+kHD9b1BNSNvuSvTdQjvkI=; b=UhS0AXxCuP+8AJ94DdiF+QEpP7PZKAD+wrWBhU3TOcBsZhqmAdbqR6AFEUpZAPrk71pkQhi26U/oR2BAP7fgcbSbo8KDSoZCHABrDTgeRwZ6zIMS8g7UUn8OJZ1yRy+uYVfMi15ZHtHyXFYN7ejR/me4Dyhi9SfK6xMXlaG7IcPmx83XdNkQZBYs6WDEj3hYt75z3RgYjs+pwngRxS5Y2IKpwGyZjaPKnFoMVuLbp0AxppbD3cCoENIwQRqdPB1GXLiZ/0CrKcroWi7+Eh1DXTzqG0qSFY9s+G+MZzxbmJ20O6Qun+5yBimy0K6l0ewLj2d8Osktcm1I+g5ynLT+WQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by AM8PR04MB7778.eurprd04.prod.outlook.com (2603:10a6:20b:24a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Mon, 20 Jan 2025 07:14:43 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8356.020; Mon, 20 Jan 2025 07:14:43 +0000 From: "Peng Fan (OSS)" Date: Mon, 20 Jan 2025 15:13:32 +0800 Subject: [PATCH v2 4/4] pinctrl: scmi: Switch to use machine_blocklist Message-Id: <20250120-scmi-fwdevlink-v2-4-3af2fa37dbac@nxp.com> References: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> In-Reply-To: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> To: Sudeep Holla , Cristian Marussi , Saravana Kannan , Linus Walleij , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, Peng Fan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737357232; l=1588; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=y7Jz62QD/LOAhaSVNi4OjY5Sw5Y/G32ouDnOiFpe8Ls=; b=fG648whABDouqN4JkTlzP9apGuFyMly2VDnFJtrGI9WX5yafoZQaDqiJZbEzSCKOIu1qgNFnJ Qx8k6znkT/qD7ymvWCrjSw/CjPNoHiE3oPFHrbHqhOPxK1Pg12V9w/7 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR01CA0129.apcprd01.prod.exchangelabs.com (2603:1096:4:40::33) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|AM8PR04MB7778:EE_ X-MS-Office365-Filtering-Correlation-Id: 4530a3ca-ce49-4ef2-e484-08dd39221d1b X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|52116014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?9L1YeQzIkgl/G1IDVjkPk8FFfSz7Z20?= =?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ib8KNiBJNBswVIk/pi6EyRmlGn8E6ic0B7Bl1Pukda79KL3dH5Ebd?= =?utf-8?q?IH7Zu72/7NyzmjXFNqKRLHSF8TPiR2BLj/MtwSu1/3QjH0HoWdLpeDoGterwJPyfK?= =?utf-8?q?Ac+iSMiLUq60WdYxUd5JKc5zY8Zh0knm2cE/eEN08/SQdgJH3d3cpbp0+7Hr/iP9f?= =?utf-8?q?sN9wV1gnoEVeV5Oo8b4OwyIG5RwRDM62h4SRRQE6FY16dPstIZvfm3bpksPecqCKk?= =?utf-8?q?FWLooTDxKxM99DVyP8czbQP70BGuOsH8xDX8P8/U29iPAX5nFVcFjiVxynTOi8Wu9?= =?utf-8?q?iNoCldXd/kRWUTxOKYwk9D/sSFW8aYH/bctU8SX/jl4b007+GRvYvd1jVxMqm62BY?= =?utf-8?q?VXXTWsSezFxwVbrttHe/Cl0xb1HJ5eTerq7LZ3HT9dcQT0y0ZM2JFGc0VIZ56HUpE?= =?utf-8?q?hWT3rVljA3MVY8WsJx8RsqsC8mrY0i6D7MdqL1R965sP0cpqviJ21Ocxr0FsJbGh5?= =?utf-8?q?KjbhkfEywlF?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(52116014)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CDmOeUqj5r2Yhgb+lCMcfRYW49Ex?= =?utf-8?q?LcsQEWRb0nacUObtKlcYr8clga54i81InG355YcrQ1LE8XI5YZF6YsgTFLSSjkhSR?= =?utf-8?q?NXo6hEG5tODJ8uG2Q1gBFhV4sNyw9YUuuhuIM3+TXzBlPC1ZKI0sCpcjD1fxq4f+C?= =?utf-8?q?R32ArFi0ncPeK0nGy9J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Gztx3IYKafxZ32UwvbWbWOrFtqU4mq96P/NMdTG4ugvt8jxZurbAL8i+nD?= =?utf-8?q?EPFdhlXpLJWhA/dvs8yb4AZiAF/EhyJhWRhdbkI2RihpV9X+hi+IJMvMRDJVZTkPG?= =?utf-8?q?DNoYwwmu2+kXrk1NM+rUQYtMUgn1JhQAKKanzhf9jaBMEIoZ4ulKklBjT5QsZmRlq?= =?utf-8?q?4U8jZa+0ikJzOVvcIthTQNuqCEChw2sJIQCaKEiu1+MEa6al5Er7LVcCfWAdCcsrg?= =?utf-8?q?1aXKQKFiP6kUBbff6L56clVZ9GE22k8hd7uqRJRdIyhutr5ytjXOI8ODzztGAGvHJ?= =?utf-8?q?xkQfOwKNfA93k2JV0qWv29OnniwUtZlZyiEWb4Vl/LCDMaXiyA1EhgAwcemYlQ3JJ?= =?utf-8?q?j2BXjulbM/bbHYDXDRyjWTWcwbtgOGq6ny6DoFhv0IrPuOThPbR0A1ylxppniki7k?= =?utf-8?q?3WywFFWdpFmG3+27dedNfNbk2cwuijdl+zmMmh6dR8nXhiLRKXW99MX/OQ2tmAIxi?= =?utf-8?q?m/iCOf95jyt2?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4530a3ca-ce49-4ef2-e484-08dd39221d1b X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2025 07:14:43.7644 (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: Vbepuf5AUcIyZqx36fN3xfH4qvz6q0ewqZDC4tAOmm9c67LeMKBxjlFHXedr7nMNOISh7+3J8fswAsrF2shgPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7778 From: Peng Fan With machine_blocklist, the blocked machines will not have pinctrl scmi devices created. The fw_devlink will link consumer and supplier correctly. Signed-off-by: Peng Fan --- drivers/pinctrl/pinctrl-scmi.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/pinctrl/pinctrl-scmi.c b/drivers/pinctrl/pinctrl-scmi.c index df4bbcd7d1d59ac2c8ddc320dc10d702ad1ed5b2..f041478758b50e85d99214f4fe42208d0c8c808f 100644 --- a/drivers/pinctrl/pinctrl-scmi.c +++ b/drivers/pinctrl/pinctrl-scmi.c @@ -505,11 +505,6 @@ static int pinctrl_scmi_get_pins(struct scmi_pinctrl *pmx, return 0; } -static const char * const scmi_pinctrl_blocklist[] = { - "fsl,imx95", - NULL -}; - static int scmi_pinctrl_probe(struct scmi_device *sdev) { int ret; @@ -521,9 +516,6 @@ static int scmi_pinctrl_probe(struct scmi_device *sdev) if (!sdev->handle) return -EINVAL; - if (of_machine_compatible_match(scmi_pinctrl_blocklist)) - return -ENODEV; - handle = sdev->handle; pinctrl_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_PINCTRL, &ph); @@ -561,8 +553,13 @@ static int scmi_pinctrl_probe(struct scmi_device *sdev) return pinctrl_enable(pmx->pctldev); } +static const char * const scmi_pinctrl_blocklist[] = { + "fsl,imx95", + NULL +}; + static const struct scmi_device_id scmi_id_table[] = { - { SCMI_PROTOCOL_PINCTRL, "pinctrl" }, + { SCMI_PROTOCOL_PINCTRL, "pinctrl", scmi_pinctrl_blocklist, NULL }, { } }; MODULE_DEVICE_TABLE(scmi, scmi_id_table);