diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2014-08-21 11:25:05 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-21 14:08:56 -0400 |
commit | 3f2dad99f6fccfce46aea289ff174485320b69b4 (patch) | |
tree | fde3edc3e543bf7cabf0e13fcda2a60ee4298cac | |
parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) |
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
commit a88e34ea213e1b ("spi: davinci: add support to configure gpio cs through dt").
Fixes: a88e34ea213e1b ("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>
-rw-r--r-- | drivers/spi/spi-davinci.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 276a3884fb3c..48f1d26e6ad9 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c | |||
@@ -417,16 +417,16 @@ static int davinci_spi_setup(struct spi_device *spi) | |||
417 | flags, dev_name(&spi->dev)); | 417 | flags, dev_name(&spi->dev)); |
418 | internal_cs = false; | 418 | internal_cs = false; |
419 | } | 419 | } |
420 | } | ||
421 | 420 | ||
422 | if (retval) { | 421 | if (retval) { |
423 | dev_err(&spi->dev, "GPIO %d setup failed (%d)\n", | 422 | dev_err(&spi->dev, "GPIO %d setup failed (%d)\n", |
424 | spi->cs_gpio, retval); | 423 | spi->cs_gpio, retval); |
425 | return retval; | 424 | return retval; |
426 | } | 425 | } |
427 | 426 | ||
428 | if (internal_cs) | 427 | if (internal_cs) |
429 | set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select); | 428 | set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select); |
429 | } | ||
430 | 430 | ||
431 | if (spi->mode & SPI_READY) | 431 | if (spi->mode & SPI_READY) |
432 | set_io_bits(dspi->base + SPIPC0, SPIPC0_SPIENA_MASK); | 432 | set_io_bits(dspi->base + SPIPC0, SPIPC0_SPIENA_MASK); |