From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>,
Jonathan Cameron <jic23@kernel.org>
Cc: "Hungyu Lin" <dennylin0707@gmail.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: pressure: bm1390: replace short msleeps with usleep_range
Date: Tue, 9 Jun 2026 12:59:29 +0300 [thread overview]
Message-ID: <29343d3a-38db-4f28-aed2-59e36d4354f8@gmail.com> (raw)
In-Reply-To: <aieu-h2a1qqAzHnX@ashevche-desk.local>
On 09/06/2026 09:13, Andy Shevchenko wrote:
> On Mon, Jun 08, 2026 at 06:41:54PM +0100, Jonathan Cameron wrote:
>> On Sun, 7 Jun 2026 14:00:18 +0000
>> Hungyu Lin <dennylin0707@gmail.com> wrote:
>>
>>> Replace msleep(1) with usleep_range(1000, 2000) for the
>>> driver's short delays.
>>>
>>> The BM1390 datasheet specifies a 1 ms reset cancel wait time
>>> (tSC1) during the power-on sequence. Use usleep_range() for
>>> these short delays, as it is more appropriate than msleep()
>>> and avoids unnecessarily long sleeps.
>>
>> Use fsleep() which has the added advantage of standardizing the
>> 'slack' so we don't have to thing about the values chosen
>
> While true, msleep(1) is kinda idiomatic, we don't need to hunt subtle timing
> issues in case of switching to stricter fsleep(), which will most likely choose
> usleep_range() beneath. TL;DR: I do not see a value in this change.
>
I don't see the value either, unless there is a real problem the patch
author has encountered. If there is a real world problem this is solving
- please state it. My stance on fsleep() Vs. msleep() in ASYNC probes
can be read from discussion (bikeshedding) between me and Nuno ;)
https://lore.kernel.org/all/14a23df0e1828b72b8b03c358980fe08a12bb216.camel@gmail.com/
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
next prev parent reply other threads:[~2026-06-09 9:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-07 14:00 Hungyu Lin
2026-06-08 17:41 ` Jonathan Cameron
2026-06-09 6:13 ` Andy Shevchenko
2026-06-09 9:59 ` Matti Vaittinen [this message]
2026-06-15 20:51 ` Hungyu Lin
2026-06-16 7:37 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29343d3a-38db-4f28-aed2-59e36d4354f8@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dennylin0707@gmail.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®