summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-orion.c
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2019-09-26 13:51:33 +0300
committerMark Brown <broonie@kernel.org>2019-10-15 13:43:31 +0300
commit21e26062052c60d31640e614b792473fca787f9f (patch)
treea542606b8ec578c0a6551e1160b0976e900d8c96 /drivers/spi/spi-orion.c
parent84593a131c3af21d686d05c4b4432290a415d399 (diff)
downloadlinux-21e26062052c60d31640e614b792473fca787f9f.tar.xz
spi: orion: use new `word_delay` field for SPI transfers
The `word_delay` field had it's type changed to `struct spi_delay`. This allows users to specify nano-second or clock-cycle delays (if needed). Converting to use `word_delay` is straightforward: it just uses the new `spi_delay_exec()` routine, that handles the `unit` part. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20190926105147.7839-6-alexandru.ardelean@analog.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-orion.c')
-rw-r--r--drivers/spi/spi-orion.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index 81c991c4ddbf..c7266ef295fd 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -467,8 +467,7 @@ 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);
+ spi_delay_exec(&xfer->word_delay, xfer);
} while (count);
} else if (word_len == 16) {
const u16 *tx = xfer->tx_buf;
@@ -478,8 +477,7 @@ 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);
+ spi_delay_exec(&xfer->word_delay, xfer);
} while (count);
}