Re: [PATCH] spi: spi-fsl-dspi: Add ACPI support

From: Vladimir Oltean
Date: Wed Aug 26 2020 - 14:33:47 EST


On Wed, Aug 26, 2020 at 05:55:52PM +0100, Mark Brown wrote:
> On Wed, Aug 26, 2020 at 05:47:44PM +0300, Vladimir Oltean wrote:
> > On Wed, Aug 26, 2020 at 03:23:12PM +0100, Mark Brown wrote:
> > > On Wed, Aug 26, 2020 at 02:47:58PM +0300, Vladimir Oltean wrote:
>
> > > > { "NXP0005", .driver_data = (kernel_ulong_t)&devtype_data[LS2085A], }
>
> > > Based on some other stuff I've seen with ACPI on NXP stuff it looks like
> > > they're following the same scheme but only caring about that one SoC for
> > > the time being.
>
> > So, no argument about caring only about ACPI on one particular SoC for
> > the time being, but there's a big difference between a solution that
> > works for N=1 and one that works for N=2...
>
> > Showing my ignorance here, but is there something equivalent to
> > of_machine_is_compatible() for ACPI?
>
> The NXP0005 is the ACPI equivalent of a compatible (comprehensibility is
> not ACPI's forte) and they're tying driver data to it there.

Where I was trying to get here is that we could have a single _HID for
the DSPI controller, and corroborate that with the ACPI equivalent of
of_machine_is_compatible("fsl,ls2085a") at driver probe time before
assigning the driver data.

Thanks,
-Vladimir