Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f2dad99 authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Mark Brown
Browse files

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 a88e34ea ("spi: davinci: add support to configure gpio cs through dt").

Fixes: a88e34ea ("spi: davinci: add support to configure gpio cs through dt")
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 7d1311b9
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -417,7 +417,6 @@ 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",
@@ -427,6 +426,7 @@ static int davinci_spi_setup(struct spi_device *spi)

		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);