]> Git Repo - linux.git/commitdiff
spi: dw: Explicitly de-assert CS on SPI transfer completion
authorSerge Semin <[email protected]>
Wed, 7 Oct 2020 23:55:03 +0000 (02:55 +0300)
committerMark Brown <[email protected]>
Thu, 8 Oct 2020 22:00:17 +0000 (23:00 +0100)
By design of the currently available native set_cs callback, the CS
de-assertion will be done only if it's required by the corresponding
controller capability. But in order to pre-fill the Tx FIFO buffer with
data during the SPI memory ops execution the SER register needs to be left
cleared before that. We'll also need a way to explicitly set and clear the
corresponding CS bit at a certain moment of the operation. Let's alter
the set_cs function then to also de-activate the CS, when it's required.

Signed-off-by: Serge Semin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
drivers/spi/spi-dw-core.c

index ac87ff6d8be4eaa337a95443cb96f2897a1b6100..76e323db170f32ba6f19caeea76c69d8d09ca74c 100644 (file)
@@ -100,7 +100,7 @@ void dw_spi_set_cs(struct spi_device *spi, bool enable)
         */
        if (cs_high == enable)
                dw_writel(dws, DW_SPI_SER, BIT(spi->chip_select));
-       else if (dws->caps & DW_SPI_CAP_CS_OVERRIDE)
+       else
                dw_writel(dws, DW_SPI_SER, 0);
 }
 EXPORT_SYMBOL_GPL(dw_spi_set_cs);
This page took 0.05886 seconds and 4 git commands to generate.