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>
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index 9878911..1569f7d 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -387,6 +387,10 @@
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;
}