* [PATCH] spi: qup: Change usleep_range to udelay
@ 2021-03-02 7:10 Md Sadre Alam
0 siblings, 0 replies; only message in thread
From: Md Sadre Alam @ 2021-03-02 7:10 UTC (permalink / raw)
To: agross, bjorn.andersson, broonie, linux-arm-msm, linux-spi, linux-kernel
Cc: Md Sadre Alam
Change usleep_range() to udelay(). Since delay request
for 1 to 2 usec so we have to use udelay() instead of
usleep_range() as per kernel documentation.
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
---
drivers/spi/spi-qup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
index 8dcb2e7..37b013f 100644
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -189,7 +189,7 @@ static int spi_qup_set_state(struct spi_qup *controller, u32 state)
loop = 0;
while (!spi_qup_is_valid_state(controller)) {
- usleep_range(SPI_DELAY_THRESHOLD, SPI_DELAY_THRESHOLD * 2);
+ udelay(SPI_DELAY_THRESHOLD);
if (++loop > SPI_DELAY_RETRY)
return -EIO;
@@ -217,7 +217,7 @@ static int spi_qup_set_state(struct spi_qup *controller, u32 state)
loop = 0;
while (!spi_qup_is_valid_state(controller)) {
- usleep_range(SPI_DELAY_THRESHOLD, SPI_DELAY_THRESHOLD * 2);
+ udelay(SPI_DELAY_THRESHOLD);
if (++loop > SPI_DELAY_RETRY)
return -EIO;
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-02 8:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 7:10 [PATCH] spi: qup: Change usleep_range to udelay Md Sadre Alam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).