]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
spi: Ensure that CS line is in non-active state after spi_setup()
authorIvan T. Ivanov <iivanov@mm-sol.com>
Fri, 13 Mar 2015 16:43:49 +0000 (18:43 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 16 Mar 2015 14:06:48 +0000 (14:06 +0000)
Some devices samples state of the chip select signal during power up
and act differently based on this state, so SPI core should ensure
that CS line is driven in non-active state after spi_setup().

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c

index c64a3e59fce30a7f9658afcca246a6d6872627da..4023cc98d808ecd7192e0a60b41cfaed0934227c 100644 (file)
@@ -1893,6 +1893,8 @@ int spi_setup(struct spi_device *spi)
        if (!spi->max_speed_hz)
                spi->max_speed_hz = spi->master->max_speed_hz;
 
+       spi_set_cs(spi, false);
+
        if (spi->master->setup)
                status = spi->master->setup(spi);