ar71xx: fix RB4xx SPI driver mode bits
authorFelix Fietkau <nbd@nbd.name>
Wed, 11 Jan 2017 11:26:27 +0000 (12:26 +0100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 11 Jan 2017 12:02:11 +0000 (13:02 +0100)
Accept SPI_TX_DUAL in device mode to fix the CPLD driver

Signed-off-by: Felix Fietkau <nbd@nbd.name>
target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c

index d8c71fb5a770afbe3c1d10919dfd6c4b0acca81e..9175fc7ae33966db676a3364ff4596774210731b 100644 (file)
@@ -261,7 +261,7 @@ static int rb4xx_spi_setup(struct spi_device *spi)
        struct rb4xx_spi *rbspi = spi_master_get_devdata(spi->master);
        unsigned long flags;
 
-       if (spi->mode & ~(SPI_CS_HIGH)) {
+       if (spi->mode & ~(SPI_CS_HIGH | SPI_TX_DUAL)) {
                dev_err(&spi->dev, "mode %x not supported\n",
                        (unsigned) spi->mode);
                return -EINVAL;