All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	"maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." 
	<bcm-kernel-feedback-list@broadcom.com>,
	"open list:SPI SUBSYSTEM" <linux-spi@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" 
	<linux-rpi-kernel@lists.infradead.org>,
	"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>,
	Martin Sperl <kernel@martin.sperl.org>
Subject: Re: [PATCH 3/3] spi: bcm2835: Enable shared interrupt support
Date: Mon, 15 Jun 2020 11:25:52 -0600	[thread overview]
Message-ID: <20200615172552.GA1978070@bogus> (raw)
In-Reply-To: <20200604041732.7ijkvad2yadtgjid@wunner.de>

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

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Scott Branden <sbranden@broadcom.com>,
	Ray Jui <rjui@broadcom.com>,
	linux-kernel@vger.kernel.org,
	"open list:SPI SUBSYSTEM" <linux-spi@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	"maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..."
	<bcm-kernel-feedback-list@broadcom.com>,
	"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
	<linux-rpi-kernel@lists.infradead.org>,
	Martin Sperl <kernel@martin.sperl.org>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Subject: Re: [PATCH 3/3] spi: bcm2835: Enable shared interrupt support
Date: Mon, 15 Jun 2020 11:25:52 -0600	[thread overview]
Message-ID: <20200615172552.GA1978070@bogus> (raw)
In-Reply-To: <20200604041732.7ijkvad2yadtgjid@wunner.de>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-06-15 17:26 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  3:46 [PATCH 0/3] spi: bcm2835: Enable shared interrupt support Florian Fainelli
2020-06-04  3:46 ` Florian Fainelli
2020-06-04  3:46 ` [PATCH 1/3] dt-bindings: spi: Document bcm2711 and bcm7211 SPI compatible Florian Fainelli
2020-06-04  3:46   ` Florian Fainelli
2020-06-04  4:23   ` Lukas Wunner
2020-06-04  3:46 ` [PATCH 2/3] ARM: dts: bcm2711: Update SPI nodes compatible strings Florian Fainelli
2020-06-04  3:46   ` Florian Fainelli
2020-06-04  4:20   ` Lukas Wunner
2020-06-04 11:13     ` Mark Brown
2020-06-04 11:13       ` Mark Brown
2020-06-04 11:21       ` Lukas Wunner
2020-06-04 14:05         ` Mark Brown
2020-06-04 14:05           ` Mark Brown
2020-06-04 16:40     ` Florian Fainelli
2020-06-04 16:40       ` Florian Fainelli
2020-06-04 16:54       ` Stefan Wahren
2020-06-04 16:54         ` Stefan Wahren
2020-06-04 16:56         ` Florian Fainelli
2020-06-04 16:56           ` Florian Fainelli
2020-06-04 16:46   ` Stefan Wahren
2020-06-04 16:46     ` Stefan Wahren
2020-06-04  3:46 ` [PATCH 3/3] spi: bcm2835: Enable shared interrupt support Florian Fainelli
2020-06-04  3:46   ` Florian Fainelli
2020-06-04  4:17   ` Lukas Wunner
2020-06-15 17:25     ` Rob Herring [this message]
2020-06-15 17:25       ` Rob Herring
2020-06-04 12:32   ` Mark Brown
2020-06-04 12:32     ` Mark Brown
2020-06-04 16:05     ` Florian Fainelli
2020-06-04 16:05       ` Florian Fainelli
2020-06-04 20:24       ` Florian Fainelli
2020-06-04 20:24         ` Florian Fainelli
2020-06-05 11:35         ` Lukas Wunner
2020-06-05 10:28       ` Mark Brown
2020-06-05 10:28         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200615172552.GA1978070@bogus \
    --to=robh@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@martin.sperl.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=nsaenzjulienne@suse.de \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.