mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00: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 <grygorii.strashko@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
7d1311b93e
commit
3f2dad99f6
1 changed files with 8 additions and 8 deletions
|
@ -417,7 +417,6 @@ static int davinci_spi_setup(struct spi_device *spi)
|
||||||
flags, dev_name(&spi->dev));
|
flags, dev_name(&spi->dev));
|
||||||
internal_cs = false;
|
internal_cs = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (retval) {
|
if (retval) {
|
||||||
dev_err(&spi->dev, "GPIO %d setup failed (%d)\n",
|
dev_err(&spi->dev, "GPIO %d setup failed (%d)\n",
|
||||||
|
@ -427,6 +426,7 @@ static int davinci_spi_setup(struct spi_device *spi)
|
||||||
|
|
||||||
if (internal_cs)
|
if (internal_cs)
|
||||||
set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select);
|
set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select);
|
||||||
|
}
|
||||||
|
|
||||||
if (spi->mode & SPI_READY)
|
if (spi->mode & SPI_READY)
|
||||||
set_io_bits(dspi->base + SPIPC0, SPIPC0_SPIENA_MASK);
|
set_io_bits(dspi->base + SPIPC0, SPIPC0_SPIENA_MASK);
|
||||||
|
|
Loading…
Reference in a new issue