Re: [PATCH RESEND] spi: spidev: Allow matching DT compatible strings from ACPI

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

 



On Tue, Jun 28, 2016 at 04:07:52PM +0100, Mark Brown wrote:
> On Tue, Jun 28, 2016 at 05:35:28PM +0300, Mika Westerberg wrote:
> > On Tue, Jun 28, 2016 at 12:47:42PM +0100, Mark Brown wrote:
> 
> > > The big thing I need to check out here is if this breaks the check for
> > > directly listing spidev in DT so we end up with the same abstraction
> > > failures that plague DT since people refuse to describe their hardware.
> 
> > You are talking about this check, right?
> 
> >         if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev)) {
> >                 dev_err(&spi->dev, "buggy DT: spidev listed directly in DT\n");
> >                 WARN_ON(spi->dev.of_node &&
> >                         !of_match_device(spidev_dt_ids, &spi->dev));
> >         } 
> 
> > As far as I can tell it should work, with the patch applied, just as it worked
> > before. For ACPI there is no possibility to list the node directly in ASL code
> > as we always require DT compatible string in _DSD.
> 
> Yes, but does of_node get set and does of_match_device() DTRT if it's a
> DT into ACPI device?

of_node will be NULL and of_match_device() will not match (returns NULL
as well).

> > In other words we never match using name of the node.
> 
> If that's the case then it's definitely broken - we either always warn
> or never warn, neither is good.

For DT we warn if the device is used directly (by the node name) as
previously. For ACPI we never warn because it is not possible to use the
node name directly. We always require use of a proper compatible string.

I don't see how that is broken.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [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