diff options
author | Jan Kundrát <jan.kundrat@cesnet.cz> | 2019-03-07 15:38:35 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-18 13:18:42 +0100 |
commit | 84d8df745b622ada89ef427541ad03e928269f09 (patch) | |
tree | 48e9d0925d3fba6d2affcc3e7794cda28e07d437 /drivers/spi | |
parent | spi: spidev: Enable control of inter-word delays (diff) | |
download | linux-84d8df745b622ada89ef427541ad03e928269f09.tar.xz linux-84d8df745b622ada89ef427541ad03e928269f09.zip |
spi: orion: Support spi_xfer->word_delay_usecs
Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-orion.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 7f280567093e..25ea4a9e0dbc 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -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) goto out; count--; + if (xfer->word_delay_usecs) + udelay(xfer->word_delay_usecs); } while (count); } else if (word_len == 16) { const u16 *tx = xfer->tx_buf; @@ -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) goto out; count -= 2; + if (xfer->word_delay_usecs) + udelay(xfer->word_delay_usecs); } while (count); } |