mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
spi: davinci: fix SPI_NO_CS functionality
The driver should not touch CS lines if SPI_NO_CS flag is set. This patch fixes it as this functionality was broken accidentally by commita88e34ea21("spi: davinci: add support to configure gpio cs through dt"). Fixes:a88e34ea21("spi: davinci: add support to configure gpio cs through dt") Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
1 parent
7d1311b93e
commit
3f2dad99f6
1 file changed
+8
-8
@@ -417,16 +417,16 @@ static int davinci_spi_setup(struct spi_device *spi)
|
||||
flags, dev_name(&spi->dev));
|
||||
internal_cs = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (retval) {
|
||||
dev_err(&spi->dev, "GPIO %d setup failed (%d)\n",
|
||||
spi->cs_gpio, retval);
|
||||
return retval;
|
||||
}
|
||||
if (retval) {
|
||||
dev_err(&spi->dev, "GPIO %d setup failed (%d)\n",
|
||||
spi->cs_gpio, retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
if (internal_cs)
|
||||
set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select);
|
||||
if (internal_cs)
|
||||
set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select);
|
||||
}
|
||||
|
||||
if (spi->mode & SPI_READY)
|
||||
set_io_bits(dspi->base + SPIPC0, SPIPC0_SPIENA_MASK);
|
||||
|
||||
Reference in new issue
Block a user