]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
spi/spi-fsl-spi: Make sure in spi_fsl_setup that chipselect becomes inactive
authorAndreas Larsson <andreas@gaisler.com>
Fri, 15 Feb 2013 15:52:22 +0000 (16:52 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Sun, 7 Apr 2013 09:07:54 +0000 (10:07 +0100)
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>
drivers/spi/spi-fsl-spi.c

index 9878911ee6af272d931ae3162cab343375fb23d7..1569f7defc7354b7a5b96cd3b26f2b018307287e 100644 (file)
@@ -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;
 }