[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20241225-scmi-fwdevlink-v1-4-e9a3a5341362@nxp.com>
Date: Wed, 25 Dec 2024 16:20:47 +0800
From: "Peng Fan (OSS)" <peng.fan@....nxp.com>
To: Sudeep Holla <sudeep.holla@....com>,
Cristian Marussi <cristian.marussi@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Saravana Kannan <saravanak@...gle.com>,
Linus Walleij <linus.walleij@...aro.org>,
Dong Aisheng <aisheng.dong@....com>, Fabio Estevam <festevam@...il.com>,
Shawn Guo <shawnguo@...nel.org>, Jacky Bai <ping.bai@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Sascha Hauer <s.hauer@...gutronix.de>
Cc: arm-scmi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
imx@...ts.linux.dev, Peng Fan <peng.fan@....com>
Subject: [PATCH 4/4] pinctrl: freescale: scmi: Check fwnode instead of
machine compatible
From: Peng Fan <peng.fan@....com>
For the platform that not compatible with scmi pinctrl device, the
fwnode will not be set, so checking fwnode will make code simpler
and easy to maintain.
Signed-off-by: Peng Fan <peng.fan@....com>
---
drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/pinctrl/freescale/pinctrl-imx-scmi.c b/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
index 8f15c4c4dc4412dddb40505699fc3f459fdc0adc..5277d30af7084b9bbf83e3523f09c8136d41705b 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,7 +299,7 @@ static int scmi_pinctrl_imx_probe(struct scmi_device *sdev)
if (!handle)
return -EINVAL;
- if (!of_machine_compatible_match(scmi_pinctrl_imx_allowlist))
+ if (!dev->fwnode)
return -ENODEV;
pinctrl_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_PINCTRL, &ph);
--
2.37.1
Powered by blists - more mailing lists