Skip to content

Commit

Permalink
spi/spi-fsl-spi: Make sure in spi_fsl_setup that chipselect becomes i…
Browse files Browse the repository at this point in the history
…nactive

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>
  • Loading branch information
Andreas Larsson authored and Grant Likely committed Apr 7, 2013
1 parent e8beacb commit f482cd0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/spi/spi-fsl-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f482cd0

Please sign in to comment.