diff mbox

[v2,2/7] spi: spi-fsl-spi: Make sure in spi_fsl_setup that chipselect becomes inactive

Message ID 1360242731-13700-3-git-send-email-andreas@gaisler.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Andreas Larsson Feb. 7, 2013, 1:12 p.m. UTC
This is needed for a device in SPI_CS_HIGH mode that otherwise could start out
active for the first transaction.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
---
 drivers/spi/spi-fsl-spi.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index e9ae1d8..b63ce63 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -387,6 +387,10 @@  static int fsl_spi_setup(struct spi_device *spi)
 		cs->hw_mode = hw_mode; /* Restore settings */
 		return retval;
 	}
+
+	/* Initialize chipselect - might be active for SPI_CS_HIGH mode */
+	fsl_spi_chipselect(spi, BITBANG_CS_INACTIVE);
+
 	return 0;
 }