Re: [PATCH 3/3] spi: bcm2835: Enable shared interrupt support

From: Rob Herring
Date: Mon Jun 15 2020 - 13:26:06 EST


On Thu, Jun 04, 2020 at 06:17:32AM +0200, Lukas Wunner wrote:
> On Wed, Jun 03, 2020 at 08:46:55PM -0700, Florian Fainelli wrote:
> > +static const struct of_device_id bcm2835_spi_match[] = {
> > + { .compatible = "brcm,bcm2835-spi", .data = &bcm2835_spi_interrupt },
> > + { .compatible = "brcm,bcm2711-spi", .data = &bcm2835_spi_sh_interrupt },
> > + { .compatible = "brcm,bcm7211-spi", .data = &bcm2835_spi_sh_interrupt },
> > + {}
> > +};
> > +MODULE_DEVICE_TABLE(of, bcm2835_spi_match);
>
> Maybe I'm missing something but I think you either have to reverse the
> order of the entries in this array or change patch [2/3] to drop
> "brcm,bcm2835-spi" from the compatible string:
>
> __of_match_node() iterates over the entries in the array above and
> calls __of_device_is_compatible() for each of them, which returns
> success if the entry matches any of the device's compatible string.

The order here doesn't matter. I'm pretty sure we fixed this years ago
to always match to the most specific compatible.

Rob