2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 07:11:32 +00:00

Ensure clock line is in the idle state before asserting chip select.

This commit is contained in:
Michael Brown 2007-07-28 16:05:41 +01:00
parent 47a86bca2d
commit ca41159f57

View File

@ -153,6 +153,10 @@ static int spi_bit_rw ( struct spi_bus *bus, struct spi_device *device,
= container_of ( bus, struct spi_bit_basher, bus );
uint32_t tmp;
/* Set clock line to idle state */
write_bit ( &spibit->basher, SPI_BIT_SCLK,
( bus->mode & SPI_MODE_CPOL ) );
/* Assert chip select on specified slave */
spi_bit_set_slave_select ( spibit, device->slave, SELECT_SLAVE );