1 From ce0e4cf60033eb7e15266b329183f945f2a82c61 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 2 Dec 2019 10:28:44 +0000
4 Subject: [PATCH] spidev: Completely disable the DT warning
6 The upstream SPI and DT maintainers are completely opposed to declaring
7 in Device Tree that an SPI CS line is to be managed by the spidev
8 driver, even though the facility is useful on a hobbyist device like a
9 Raspberry Pi where arbitrary devices can be attached, and the
10 alternative to DT declaration (spi_board_info) has been almost entirely
11 rendered obsolete by DT.
13 Continue to override their objections by disabling the warning.
15 See: https://github.com/raspberrypi/linux/issues/3361
16 https://github.com/raspberrypi/linux/issues/1054
18 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
20 drivers/spi/spidev.c | 1 +
21 1 file changed, 1 insertion(+)
23 --- a/drivers/spi/spidev.c
24 +++ b/drivers/spi/spidev.c
25 @@ -728,6 +728,7 @@ static int spidev_probe(struct spi_devic
26 * compatible string, it is a Linux implementation thing
27 * rather than a description of the hardware.
29 + if (0) /* Disable the warning - this feature is too useful */
30 WARN(spi->dev.of_node &&
31 of_device_is_compatible(spi->dev.of_node, "spidev"),
32 "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);