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: 13944794 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 42375C02185 for ; Mon, 20 Jan 2025 07:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: 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=erx8eVIlp3RSDPcLYTeD6QYzg9uYKWXIG1suoWmMaWI=; b=C6TsnmIoQsbiorC36ELUFsu+Qe Bf4tupOaDZ4BqaAwv6UCPlZV9ZAAu8mTGMDaU0qTI5U7CVMHrJbeRfr+7KdMb7238HL7cdPnAeTr3 dGP/KXE83jtjq1ICdbsq747gnvu51OHSF5R3t3jdGEGjP77MUib1cqjVqgkR3tKNZp5CHkNzikPm+ jczdjNtU8AeXDKVf6CspjDUo0r0QirOah4iag98vS99OgFF8G83r54SkiRxtjX9el4+gKO4Fd2nkp N7SQozHMwqqwVNRjuD0wuIU+fj6/rEJZ9U3MI1Uf/Ogm/5GYn29OvYKW4LGhisqnUfN9eFcqxP0pc hxXi+ueg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZm24-00000004tpZ-0kif; Mon, 20 Jan 2025 07:17:12 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZlzW-00000004tVG-3s7E for linux-arm-kernel@lists.infradead.org; Mon, 20 Jan 2025 07:14:36 +0000 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) 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-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?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Swdw6qOBHT0H6Ef8Fy10KTHaSh2o8ipI?= =?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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250119_231434_969634_483C72E9 X-CRM114-Status: GOOD ( 14.47 ) 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 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: 13944795 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 02C43C02185 for ; Mon, 20 Jan 2025 07:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: 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=5N4soaqVvGniFGVKXuIwxhaCY94c2fcgCzLF1RtnT2U=; b=zWOXdrxYFdLKYGw+I0EqwtDxRU nLblZ/j287yfBafP5gEN3R9jUSNZR8xnakB2LIMj//fQYwRgcFDUrjI23lyo7rM2Uo9EUMco/1IsJ kk+5sCCh5x1LBqbVffA6jl7cEc6eTQjl7luYpgvxhvyJ5yioQoANgId5lYkuZJb9HLCzZ+uEaeOSi lXDkIVGzrV/kcOrQt/2c2a1t4ztexrpDFm8GQdvTxzcDDQpxCyjCXuAuD468WPiQri5vztgBd2Oup pSbyWy8fFj1/9GczAstmVpYGDlavt74FQsr8W6FuMYcFc5Sjm1M0NPqd3o/gjfu5xyOJ42nZg8mwX 8pkRvmoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZm3K-00000004u0h-3X5R; Mon, 20 Jan 2025 07:18:30 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZlzY-00000004tVG-2OHU for linux-arm-kernel@lists.infradead.org; Mon, 20 Jan 2025 07:14:37 +0000 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) 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?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Vf1EVtlscxEBoFqmlBZQzpL7TvWgIgGlcN9RousF3EmMcw78s1ucvMHEDbC+M?= =?utf-8?q?aP+wmdtfxxeCKYUhxVAx9YJ9P+F85R1r5npYBkLfWaOlpMyo/QbpnOipzwrLu1qEq?= =?utf-8?q?2GUOPFuKYioeiSaTHOkkXbuqs55yqgABll8OFW2LkueGGjI23m+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?4IQtPfoU4dhsfq3BWp2b5b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nAq44xdiSXQcjnSz8uX3nnCuuHyqF/43YJjAlhXT5A6BsdeUGp0Goo?= =?utf-8?q?sS91U8BH0Eyw5iYJWIh7KW0RsnYHobluEr83rmjAeBNhbngMXXxu1ePeq3sNzIXiS?= =?utf-8?q?KkE0WE+za9NCUeDqsiLduW0Wn39Hua6gmez8WMMMOtib6h6wweIfWG9QMUv93O+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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250119_231436_615759_8ECE9097 X-CRM114-Status: GOOD ( 14.46 ) 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 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: 13944796 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 463E7C02185 for ; Mon, 20 Jan 2025 07:19:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: 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=WLP9ePf8DIdQ8k6igl4N111BxUUl2NNmcWYXPawAUf0=; b=eZSpoUlSt3xDrqrcx0Rx+299dB oVpqfP3elkM0bVi7vgMN7V/NKhi+72cZ1wAoLP5xSH7b5VXC9rnyAbv81e3Jj5PSg9+o0Rg+gQCox jYKx00nT5j/Ln+CONWVWOO9Vo7hnC5W4BwDIq6k7LiqtBY5C3ljDXTZEBUxxYV5NjAMrdGU40hMu4 ThxK1KhTuEyVYGV+2qrtQdh2DMAgxi4l8mteTpliDOUyYWyeFbqRCMv1bdsmtjRNS1Yx9NvfJJcK/ KInDe9t6WSZM3GyXq+eh5IfEFWNgYHQRuZyVwkpCy6A25BHJNF4DgW/fq7bgQkTTk2cAj6Xafj4Ps Lzn+/fiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZm4a-00000004u9J-1yrS; Mon, 20 Jan 2025 07:19:48 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZlzg-00000004tWf-0MSk for linux-arm-kernel@lists.infradead.org; Mon, 20 Jan 2025 07:14:45 +0000 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) 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+sRmtUUniEMoHoY3ziw5WZ8irkU7QCagFRqMkE6aaGXuDdfhM00YfZMbJFCispCS?= =?utf-8?q?oS09mMGq+VnWedOzZ3E17J/9AdMPNaw7z9ycC4pDhZrX580gC4CpGgYYh+XLb6lo/?= =?utf-8?q?CUPHUzGnnR11y5z/+uBqsfZyOI08yb2jg4xzTXZJ1yZUc74LCQeRJ2wOvlvOqCqo8?= =?utf-8?q?i9XDLuzE/OoPqKvQ+OEW+4vHLxfOcteP3DDHyKvU9gATu138v5f1mBI/lMuiYKe68?= =?utf-8?q?sfwbsMp2PHk/aeOsz9ChH+ZRvEkSaqvS+HebW1atdpmpI2J+tEca2vIXquPT+pTGR?= =?utf-8?q?WAxmsAtgfbMxVNndnoHp+8tlrmYlcjoXBvzG0vo7GWdm3X1fD5OaVheGwVXpvv+gO?= =?utf-8?q?FtL/YfwLVDNhfNDYeW/zgjl78dUg2QZ5W7VR3epwDgzWjP41qP+8F/4wNzMgHwgaE?= =?utf-8?q?GjzkvphnaBpY9idlTCNyRX2LPkmriQtaS3yYAfaAv85TqXQxRwjM4fk3d41tqi3F5?= =?utf-8?q?gzK9g1mu3h7HKIMjPSzUn2/bvbRKL/3PUDcISPXnPMQItZ37Dl8yMDEnAK7+KYVZo?= =?utf-8?q?3Z9AsgU01EvTxj/gRzQMi6vEnE8g6VCNvahYiEpQ3GCp41lP2bjvIeo02J6QlIEBj?= =?utf-8?q?AbHKyZyhrCfgdlw+sbU6VNPNN5URXWZedZ1bURfmpb27xSEzcWwzX2ZPk6AjGggXu?= =?utf-8?q?dtJaoTHmm+gQsHV1tLSI0C39HtA9oO+YyfLuSMS7gNeIUqy6ArAerllpqPIW2zXes?= =?utf-8?q?TK41zUV1fiPk8++VRNwN8h/Vr87kFsH3Z3ItfqgqNEbidKBSZ3aNQG0MkjTdOIwmS?= =?utf-8?q?8znx5Ay1UcxYJheH1Fr+QlNo4snj8GpGxQJ1MEYDsw8aojunY04+A4T/SYW6wTwi5?= =?utf-8?q?Kgxv33TgoFu28pf+JOudqZ68sH/xgLjRcx4Plc+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-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umQNoHxOjm+P7KhkNAuuKz5ovJeKpMgw51YwVnCYAlbOYIt7N5d1T8?= =?utf-8?q?v38v5P5NQLyzYcRhEfzqVeg2mXPTCGLNBeZuvjHmwyBcVsj417loCXKxIy65Bx/Gu?= =?utf-8?q?5jSRsHh8eSoLss6g+JvcbuhZAGAHb6GVMlzYh+PdSAdwEDvgEiXzKlACc9b4YVWKM?= =?utf-8?q?nkPAGnetgr+JgDleAV3rzLVZ3SMH+2JsSbQGRsh00Xnl5OV1m0oFXPWGFNlIxbqVy?= =?utf-8?q?UWqyKUitMA1qzqZv3jzdFSo7kQBycTKKnNMt9vGvLRyQvKPkhSlzbeSTCOdHDfaPV?= =?utf-8?q?mVC6o9LwF2bq7ha8YcKF2BoqTwlUHXB1rQhKDg6V2ay1mUHR8awb6Cvm+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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250119_231444_231529_A5C0C3C8 X-CRM114-Status: GOOD ( 11.22 ) 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 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: 13944797 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 5F8FEC0218A for ; Mon, 20 Jan 2025 07:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: 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=HikyuC85c4OtraaH4/n4z+kHD9b1BNSNvuSvTdQjvkI=; b=hRDius6nzTzCtBe0ZJd53sLHUu SPOit/sySDRlJYqjDLRjTxoLL06lsVDGkS5OmmhlG9uZ4D+ugWdy5r0uupokBH4yE8V5DRK1K8HMb G+auTMnljBwedSuByWWrQAO4Yn2AdIutd3Swbn2W9IG35cjPWr4uTzNe9UR2w22mSkVSUJdKhU0we XaYLdupDO9oADUBqttES3gBkuXitUMfRt/wkh7OcBBZmrpC03aqsxDd5Fwitbkiy1VcqPJMu1w0fW rdGxbx5QddO540vk+OyUgUtcOtehX3ElJ2kID6FLsxtFCIGLkxn/8jd3pJa9yKzx/Z1PntEhGWXFv 23CA/g4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZm5r-00000004uN7-0vuq; Mon, 20 Jan 2025 07:21:07 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZlzh-00000004tWf-2h47 for linux-arm-kernel@lists.infradead.org; Mon, 20 Jan 2025 07:14:46 +0000 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) 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?= =?utf-8?q?YI8YEAimoqHddZsPRVQrlksE0hMVwkHsi6b6YWr3+nDpSOpRnbstfgbX2cF7eGSeb?= =?utf-8?q?cp2vAMyLyIFBadt3LfYdYnG4B8Oi98ua81rgN0tP8oKP3nOsX46AJ6NlNWKU2dJgI?= =?utf-8?q?JT4/ysYi0gs4t1+4TyZ+Qf5kjO0EVAZoHz7qyMeOHQBVLHT7WPY4aB7D4kuwZ72rU?= =?utf-8?q?0xiK6HOKhNDKaRGnjZ0U0aBoUKUj9ORMNymgPfbEsFeXcluSbF3VBSppTq6v4HGrw?= =?utf-8?q?5TrYaBS9BTBiOIyI7z1EdlNKeSwq3migyKHWkMlSWl5k/Y27fDI5W0yFqV18mypUc?= =?utf-8?q?h+LPax5ulmBbPV98kjXTgqw0ir/b6uZXcyDqZanMBvrRGMNGYzAOvq7iJhmO3azpG?= =?utf-8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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?R32ArFi0ncPeK0nGy9JTBxKydzAkAlgpjlCPzNNGPnwmRx/Icfh4dkB0iiuJsEd2a?= =?utf-8?q?ugQSaqa7iMXBAttILhvM0+GE8JgTavRIFszDKw/MPeRzbtSFSuscRGqU+zDVKMnTr?= =?utf-8?q?i5cz8bMeRWjjOp9Qh0qCq2lVpcwAx/4a9iBEp6Y+zmrqZwuQDRO3FvRFg1nDgrD9M?= =?utf-8?q?cZL5B1UZ+hFyXYygTIaW1G8V+eFdG4xe9OnMBxGHCWp1p1ZIOFj0kxlgzN4kHLEyx?= =?utf-8?q?laF1gCUkUF3oFriSy1nmRdaCy+2WZNYsK5Oeh0SJdlWqBxAh0+5AXXEqhrVG285V/?= =?utf-8?q?xJHaQyr+AKc6lMalCOqYFQdGT8/dWFFq43uuYYwJG36EFaxspBFeXXt8pipckqJOo?= =?utf-8?q?vczWrTD/k6im5Kte+HcVDqm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HYDXDRyjWTWcwbtgOGq6ny6DoFhv0IrPuOThPbR0A1ylxppniki7k?= =?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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250119_231445_713827_AA1771D6 X-CRM114-Status: GOOD ( 10.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 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);