[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1GIVy8l4vKsUYLr@smile.fi.intel.com>
Date: Thu, 20 Oct 2022 20:41:43 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Mark Brown <broonie@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org, Daniel Mack <daniel@...que.org>,
Haojian Zhuang <haojian.zhuang@...il.com>,
Robert Jarzmik <robert.jarzmik@...e.fr>
Subject: Re: [PATCH v1 3/6] spi: pxa2xx: Remove no more needed PCI ID table
On Thu, Oct 20, 2022 at 06:26:01PM +0100, Mark Brown wrote:
> On Thu, Oct 20, 2022 at 08:03:37PM +0300, Andy Shevchenko wrote:
> > On Thu, Oct 20, 2022 at 05:58:39PM +0100, Mark Brown wrote:
>
> > > The driver won't even match and therefore load if it doesn't have a
> > > lookup for the device with the current code, the type code comes from
> > > the match. If it has to go querying a device property then the driver
> > > can load but end up with a device property it hasn't ever heard of and
> > > end up misbehaving as a result.
>
> > That's how all MFD devices work nowadays, right? What's so special about
> > this driver? It's being used as a child by MFD. If what you are telling
> > is a real concern, we have to have a way to assure that all drivers that
> > are children of the MFDs should provide a match. IIRC there is no such
> > mechanism exists in the kernel these days.
>
> Most of the MFDs don't actually have multiple options for a given child
> driver, and it's common where there are multiple options to either bind
> with a different name representing the different child device or have
> something that looks like a switch statement for the IDs which will
> error out if it hits an ID that's not one the driver knows about (like
> spi-pxa2xx-pci does with lpss_spi_setup()).
Okay, would it work for you if we check the named resource and only if it's
found take a property? In such case we can guarantee (AFAICS) that the 3rd
parties (like unknown firmware) won't mess up with the driver.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists