Commit 17ebd5bf authored by Cliff Cai's avatar Cliff Cai Committed by Mike Frysinger

Blackfin: bfin_spi: let boards control idle value

Some SPI devices like to see high idle values rather than low.
Signed-off-by: default avatarCliff Cai <cliff.cai@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent ea693f22
......@@ -314,6 +314,10 @@ void spi_release_bus(struct spi_slave *slave)
SSYNC();
}
#ifndef CONFIG_BFIN_SPI_IDLE_VAL
# define CONFIG_BFIN_SPI_IDLE_VAL 0xff
#endif
int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
void *din, unsigned long flags)
{
......@@ -340,7 +344,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
/* todo: take advantage of hardware fifos and setup RX dma */
while (bytes--) {
u8 value = (tx ? *tx++ : 0);
u8 value = (tx ? *tx++ : CONFIG_BFIN_SPI_IDLE_VAL);
debug("%s: tx:%x ", __func__, value);
write_SPI_TDBR(bss, value);
SSYNC();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment