Commit f482cd0ff506cd74c75edceec4b737c46c60cb12

Authored by Andreas Larsson
Committed by Grant Likely
1 parent e8beacbb85

spi/spi-fsl-spi: Make sure in spi_fsl_setup that chipselect becomes inactive

This is needed for a device in SPI_CS_HIGH mode that otherwise could start out
active for the first transaction.

Acked-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

drivers/spi/spi-fsl-spi.c
... ... @@ -387,6 +387,10 @@
387 387 cs->hw_mode = hw_mode; /* Restore settings */
388 388 return retval;
389 389 }
  390 +
  391 + /* Initialize chipselect - might be active for SPI_CS_HIGH mode */
  392 + fsl_spi_chipselect(spi, BITBANG_CS_INACTIVE);
  393 +
390 394 return 0;
391 395 }
392 396