Commit 84d8df74 authored by Jan Kundrát's avatar Jan Kundrát Committed by Mark Brown

spi: orion: Support spi_xfer->word_delay_usecs

Signed-off-by: default avatarJan Kundrát <jan.kundrat@cesnet.cz>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2ed6692e
...@@ -470,6 +470,8 @@ orion_spi_write_read(struct spi_device *spi, struct spi_transfer *xfer) ...@@ -470,6 +470,8 @@ orion_spi_write_read(struct spi_device *spi, struct spi_transfer *xfer)
if (orion_spi_write_read_8bit(spi, &tx, &rx) < 0) if (orion_spi_write_read_8bit(spi, &tx, &rx) < 0)
goto out; goto out;
count--; count--;
if (xfer->word_delay_usecs)
udelay(xfer->word_delay_usecs);
} while (count); } while (count);
} else if (word_len == 16) { } else if (word_len == 16) {
const u16 *tx = xfer->tx_buf; const u16 *tx = xfer->tx_buf;
...@@ -479,6 +481,8 @@ orion_spi_write_read(struct spi_device *spi, struct spi_transfer *xfer) ...@@ -479,6 +481,8 @@ orion_spi_write_read(struct spi_device *spi, struct spi_transfer *xfer)
if (orion_spi_write_read_16bit(spi, &tx, &rx) < 0) if (orion_spi_write_read_16bit(spi, &tx, &rx) < 0)
goto out; goto out;
count -= 2; count -= 2;
if (xfer->word_delay_usecs)
udelay(xfer->word_delay_usecs);
} while (count); } while (count);
} }
......
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