[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGETcx9E1MYgzd7Hupz8YAqk7-D1Aeb+AAyQiEMia-6hnFQTRQ@mail.gmail.com>
Date: Thu, 13 Feb 2025 00:13:41 -0800
From: Saravana Kannan <saravanak@...gle.com>
To: "Peng Fan (OSS)" <peng.fan@....nxp.com>
Cc: Sudeep Holla <sudeep.holla@....com>, Cristian Marussi <cristian.marussi@....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>, 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: Re: [PATCH v2 4/4] pinctrl: scmi: Switch to use machine_blocklist
On Sun, Jan 19, 2025 at 11:14 PM Peng Fan (OSS) <peng.fan@....nxp.com> wrote:
>
> From: Peng Fan <peng.fan@....com>
>
> 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 <peng.fan@....com>
> ---
> 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);
>
Definite NACK to this. Please don't depend on indirect
conditions/flags. There's no guarantee that this check will hold true
in the future.
-Saravana
Powered by blists - more mailing lists