linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Mark Brown <broonie@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Magnus Damm <magnus.damm@gmail.com>,
	Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>,
	Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH/RFC 6/6] spi: spidev: Allow direct references in DT from SPI slave controllers
Date: Wed, 22 Jun 2016 15:42:09 +0200	[thread overview]
Message-ID: <1466602929-4191-7-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1466602929-4191-1-git-send-email-geert+renesas@glider.be>

SPI slave protocols are typically handled in userspace through spidev,
hence suppress the warning when the SPI controller is running in slave
mode.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/spi/spidev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index e3c19f30f591115a..8b590dd96480a9f9 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -713,7 +713,8 @@ static int spidev_probe(struct spi_device *spi)
 	 * compatible string, it is a Linux implementation thing
 	 * rather than a description of the hardware.
 	 */
-	if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev)) {
+	if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev) &&
+	    !(spi->master->flags & SPI_MASTER_IS_SLAVE)) {
 		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));
-- 
1.9.1

      parent reply	other threads:[~2016-06-22 13:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 13:42 [PATCH/RFC 0/6] spi: Add slave mode support Geert Uytterhoeven
2016-06-22 13:42 ` [PATCH/RFC 1/6] spi: Document DT bindings for SPI controllers in slave mode Geert Uytterhoeven
2016-06-24 17:06   ` Rob Herring
2016-06-29  9:30     ` Geert Uytterhoeven
2016-06-22 13:42 ` [PATCH/RFC 2/6] spi: core: Add support for registering SPI slave controllers Geert Uytterhoeven
2016-07-18 17:02   ` Mark Brown
2016-06-22 13:42 ` [PATCH/RFC 3/6] spi: sh-msiof: Add slave mode support Geert Uytterhoeven
2016-06-22 13:42 ` [PATCH/RFC 4/6] spi: slave: Add SPI slave handler reporting boot up time Geert Uytterhoeven
     [not found]   ` <1466602929-4191-5-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2016-07-18 12:14     ` Mark Brown
2016-06-22 13:42 ` [PATCH/RFC 5/6] spi: slave: Add SPI slave handler controlling system state Geert Uytterhoeven
2016-06-22 13:42 ` Geert Uytterhoeven [this message]

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=1466602929-4191-7-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hiromitsu.yamasaki.ym@renesas.com \
    --cc=hisashi.nakamura.ak@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).