[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251020-staging-fbtft-ra8875-usleep-v1-1-9592dd390c13@lukowski.dev>
Date: Mon, 20 Oct 2025 22:15:36 +0300
From: Olle Lukowski <olle@...owski.dev>
To: Andy Shevchenko <andy@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Olle Lukowski <olle@...owski.dev>
Subject: [PATCH] staging: fbtft: fb_ra8875: replace udelay with
usleep_range
Replace udelay(100) calls with usleep_range(100, 200) to allow the
scheduler to yield instead of busy-waiting. This is the preferred API for
sleep durations above 10 microseconds.
Signed-off-by: Olle Lukowski <olle@...owski.dev>
---
This patch replaces udelay() with usleep_range() in fb_ra8875.
---
drivers/staging/fbtft/fb_ra8875.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c
index 0ab1de664..d2400bb44 100644
--- a/drivers/staging/fbtft/fb_ra8875.c
+++ b/drivers/staging/fbtft/fb_ra8875.c
@@ -210,7 +210,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
}
len--;
- udelay(100);
+ usleep_range(100, 200);
if (len) {
buf = (u8 *)par->buf;
@@ -231,7 +231,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
/* restore user spi-speed */
par->fbtftops.write = fbtft_write_spi;
- udelay(100);
+ usleep_range(100, 200);
}
static int write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
---
base-commit: 211ddde0823f1442e4ad052a2f30f050145ccada
change-id: 20251020-staging-fbtft-ra8875-usleep-77306ea543c7
Best regards,
--
Olle Lukowski <olle@...owski.dev>
Powered by blists - more mailing lists