Re: [PATCH 2/4] iio: magnetometer: ak8975: replace usleep_range() with fsleep()

Andy Shevchenko
2026-04-20T17:20:24Z

On Mon, Apr 20, 2026 at 11:08:02AM +0000, Joshua Crofts wrote:
> Replace usleep_range() calls with fsleep(), passing the minimum value
> required by the sensor for hardware delays.
>
> fsleep() automatically selects the optimal sleep mechanism, simplifying
> driver code and time management.

...

> - usleep_range(500, 1000);
> + fsleep(500);

Seems code is inconsistent in usage of blank lines before return statements.
I would add one while at it.

> return 0;

...

> /* After mode change wait at least 100us */
> - usleep_range(100, 500);
> + fsleep(100);
>
> return 0;

(Left for the context for the above.)

--
With Best Regards,
Andy Shevchenko