Re: [PATCH v2] iio: pressure: bm1390: replace short msleeps with fsleep
From: Andy Shevchenko
Date: Tue Jun 09 2026 - 02:20:32 EST
On Tue, Jun 09, 2026 at 12:57:10AM +0000, Hungyu Lin wrote:
> Replace msleep(1) with fsleep(1000) for the driver's short
> delays.
>
> The BM1390 datasheet specifies a 1 ms reset cancel wait time
> (tSC1) during the power-on sequence. Use fsleep() for these
> short delays because it automatically selects the most
> appropriate sleep mechanism and provides standardized timing
> slack.
Same comment as per v1.
...
> - msleep(1);
> + fsleep(1000);
And in case you really still want to do this, use multipliers
fsleep(1 * USEC_PER_MSEC);
(but this might require time.h to be included).
--
With Best Regards,
Andy Shevchenko