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 05:18:22PM +0100, Mark Brown wrote:
> On Tue, Jun 28, 2016 at 06:23:38PM +0300, Mika Westerberg wrote:
> > On Tue, Jun 28, 2016 at 04:07:52PM +0100, Mark Brown wrote:
> 
> > > 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.
> 
> So you're saying that it's not possible for ACPI to use anything
> *except* an explicitly listed compatible string to bind?  What we want
> to avoid is any ACPI tables that explicitly list spidev since that's a
> total abstraction failure.

That's exactly what I'm saying. We never match using the node name
(which is always 32-bit "string" like "SPI0"). For PRP0001 match to
succeeed you need to have "compatible" property.

The ASL code looks like:

        Device (SPID) {
                Name (_HID, "PRP0001")

                Name (_CRS, ResourceTempate () {
                        SpiSerialBus (1, PolarityLow, FourWireMode, 0x08,
                            ControllerInitiated, 0x007A1200, ClockPolarityLow,
                            ClockPhaseSecond, "\\_SB.SPI1",
                            0x00, ResourceConsumer)
                })

                Name (_DSD, Package () {
                    ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
                    Package () {
                        Package () {"compatible", "rohm,dh2228fv"},
                    }
                })
        }

Without the "compatible" property you get a warning from ACPI core:

  \_SB.SPI1.SPID requires 'compatible' property

and it will not match anything.
--
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