RE: [PATCH 3/4] pinctrl: scmi: Check fwnode instead of machine compatible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: Re: [PATCH 3/4] pinctrl: scmi: Check fwnode instead of
> machine compatible
> 
> On Fri, Dec 27, 2024 at 03:30:20PM +0000, Sudeep Holla wrote:
> > On Wed, Dec 25, 2024 at 04:20:46PM +0800, Peng Fan (OSS) wrote:
> > > From: Peng Fan <peng.fan@xxxxxxx>
> > >
> > > 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@xxxxxxx>
> > > ---
> > >  drivers/pinctrl/pinctrl-scmi.c | 7 +------
> > >  1 file changed, 1 insertion(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/pinctrl/pinctrl-scmi.c
> > > b/drivers/pinctrl/pinctrl-scmi.c index
> > >
> df4bbcd7d1d59ac2c8ddc320dc10d702ad1ed5b2..aade6df77dbb2c391
> 741e77c0a
> > > ac3f029991e4bb 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,7 +516,7 @@ static int scmi_pinctrl_probe(struct
> scmi_device *sdev)
> > >  	if (!sdev->handle)
> > >  		return -EINVAL;
> > >
> > > -	if (of_machine_compatible_match(scmi_pinctrl_blocklist))
> > > +	if (!dev->fwnode)
> >
> > I would prefer to see the blocklist to be explicit here rather than
> > implicitly hiding it away with this change set.
> 
> Using a flag to inhibit device_link_add as said early in the series this
> could be dropped and kept as is, I suppose.

Since the list will expand to include more i.MX9[X] chips, I was
thinking to drop the list to avoid update the list every time
we add a new SoC. We may need to use a machine
saying "fsl,imx9-sm" or else.

I will give a check on a flag. Thanks for suggestion.

Thanks,
Peng.

> 
> Thanks,
> Cristian






[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux