Skip to content

Commit

Permalink
spi: Ensure that CS line is in non-active state after spi_setup()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Ivan T. Ivanov authored and broonie committed Mar 16, 2015
1 parent c517d83 commit 1a7b7ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1a7b7ee

Please sign in to comment.