Re: [PATCH v2] iio: pressure: bm1390: replace short msleeps with fsleep
From: Jonathan Cameron
Date: Wed Jun 10 2026 - 11:44:51 EST
On Tue, 9 Jun 2026 09:14:57 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> 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).
>
We seem to have a consensus that this is really just adding noise
in this particular case, so let us drop this one.
Thanks,
Jonathan