[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240428-pinctrl-scmi-oem-v3-v3-5-eda341eb47ed@nxp.com>
Date: Sun, 28 Apr 2024 13:07:51 +0800
From: "Peng Fan (OSS)" <peng.fan@....nxp.com>
To: Sudeep Holla <sudeep.holla@....com>,
Cristian Marussi <cristian.marussi@....com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Dong Aisheng <aisheng.dong@....com>, Jacky Bai <ping.bai@....com>
Cc: linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
linux-gpio@...r.kernel.org, Peng Fan <peng.fan@....com>
Subject: [PATCH v3 5/6] pinctrl: scmi: add blocklist
From: Peng Fan <peng.fan@....com>
i.MX95 will have its own pinctrl scmi driver, so need block
pinctrl-scmi driver for i.MX95, otherwise there will be two pinctrl
devices for a single scmi protocol@19.
Signed-off-by: Peng Fan <peng.fan@....com>
---
drivers/pinctrl/pinctrl-scmi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-scmi.c b/drivers/pinctrl/pinctrl-scmi.c
index 360b813072df..8ff35869efea 100644
--- a/drivers/pinctrl/pinctrl-scmi.c
+++ b/drivers/pinctrl/pinctrl-scmi.c
@@ -11,6 +11,7 @@
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
+#include <linux/of.h>
#include <linux/scmi_protocol.h>
#include <linux/slab.h>
#include <linux/types.h>
@@ -492,6 +493,11 @@ int pinctrl_scmi_get_pins(struct scmi_pinctrl *pmx, struct pinctrl_desc *desc)
}
EXPORT_SYMBOL(pinctrl_scmi_get_pins);
+static const struct of_device_id scmi_pinctrl_blocklist[] = {
+ { .compatible = "fsl,imx95", },
+ { }
+};
+
static int scmi_pinctrl_probe(struct scmi_device *sdev)
{
int ret;
@@ -500,10 +506,14 @@ static int scmi_pinctrl_probe(struct scmi_device *sdev)
const struct scmi_handle *handle;
struct scmi_protocol_handle *ph;
const struct scmi_pinctrl_proto_ops *pinctrl_ops;
+ struct device_node *np __free(device_node) = of_find_node_by_path("/");
if (!sdev->handle)
return -EINVAL;
+ if (of_match_node(scmi_pinctrl_blocklist, np))
+ return -ENODEV;
+
handle = sdev->handle;
pinctrl_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_PINCTRL, &ph);
--
2.37.1
Powered by blists - more mailing lists