Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1428809 > unrolled thread
| Started by | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| First post | 2016-06-22 15:50 +0200 |
| Last post | 2016-06-22 15:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH/RFC 6/6] spi: spidev: Allow direct references in DT from SPI slave controllers Geert Uytterhoeven <geert+renesas@glider.be> - 2016-06-22 15:50 +0200
| From | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| Date | 2016-06-22 15:50 +0200 |
| Subject | [PATCH/RFC 6/6] spi: spidev: Allow direct references in DT from SPI slave controllers |
| Message-ID | <rMQHv-47X-21@gated-at.bofh.it> |
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
Back to top | Article view | linux.kernel
csiph-web