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

Commit 0510037f authored by Girish Mahadevan's avatar Girish Mahadevan
Browse files

spi: spi_qsd: Fix the CS logic for multi transfers



In cases of multi transfers the SPI framework sends in the raw CS bit
value to be sent over the line which the driver uses as is. But for
active CS low devices, this means that the driver will end up asserting
CS when it shouldn't be. Change the logic in the driver to check the CS
mode before asserting or deasserting the CS line.

Change-Id: I774d98dbcdf82aa8bb1f289eadab415de717e758
Signed-off-by: default avatarGirish Mahadevan <girishm@codeaurora.org>
parent dec3acb0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1523,6 +1523,9 @@ static inline void msm_spi_set_cs(struct spi_device *spi, bool set_flag)
	u32 spi_ioc;
	u32 spi_ioc_orig;

	if (!(spi->mode & SPI_CS_HIGH))
		set_flag = !set_flag;

	spi_ioc = readl_relaxed(dd->base + SPI_IO_CONTROL);
	spi_ioc_orig = spi_ioc;
	if (set_flag)