Re: [PATCH] Replace udelay() with usleep_range() in PLL initialization code. According to Documentation/timers/timers-howto.rst, usleep_range() is preferred for delays "10us - 20ms"
From: Andy Shevchenko
Date: Mon Dec 29 2025 - 02:41:43 EST
On Mon, Dec 29, 2025 at 3:09 AM Alexandru Costin <spxxky.dev@xxxxxxxxx> wrote:
>
> Resolves checkpatch warnings:
> WARNING: usleep_range is preferred over udelay
First of all, fix checkpatch to point to a newer API, i.e. fsleep().
...
> @@ -210,7 +210,8 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
> - udelay(100);
> + usleep_range(100, 120);
> @@ -231,7 +232,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
> - udelay(100);
> + usleep_range(100, 120);
This is an IO function for the hardware in question. Have you tested
it? How do you know that this is a non-atomic context?
--
With Best Regards,
Andy Shevchenko