From: Joshua Crofts <crofts@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Rupesh Majhi" <zoone.rupert@gmail.com>,
"Andy Shevchenko" <andy@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Eddie James" <eajames@linux.ibm.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/7] iio: pressure: dps310: use time unit macros for sleeps and timeouts
Date: Thu, 26 Nov 2026 15:19:06 +0100 [thread overview]
Message-ID: <7951c11e-b7f3-4a1a-ac07-87e231e7eb68@kernel.org> (raw)
In-Reply-To: <awg42TwLsgf_Xp3U@ashevche-desk.local>
On 26-Nov-26 14:49, Andy Shevchenko wrote:
> On Thu, Nov 26, 2026 at 02:17:34PM +0100, Joshua Crofts wrote:
>> On 26-Nov-26 13:13, Rupesh Majhi wrote:
>
> ...
>
>> > - usleep_range(15000, 55000);
>> > + msleep(20);
>> I think it's safe to use 15 as specified in the datasheet, as msleep()
>> guarantees sleep for the specified time + a max of 12.5% slack.
>
> Wouldn't be better to have some margin still? You know that time goes
> differently on different CPUs and in general time can go backwards (in
> computers), so the long sleeps can (I haven't checked though) go both ways,
> and a minimum sleeping time can be less. Also on the other side firmware
> might have issues in some circumstances and require slightly bigger sleep
> than specified. That's why I proposed margin.
Sure, it's just that some patches add a margin and some patches ignore this
and just add the default datasheet value. A lot of times slack is an adequate
enough margin. I was always for just the default value.
--
Kind regards,
Joshua Crofts
next prev parent reply other threads:[~2026-11-26 14:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 12:13 [PATCH v2 0/7] iio: pressure: dps310: cleanups Rupesh Majhi
2026-11-26 12:13 ` [PATCH v2 1/7] iio: pressure: dps310: sort register field defines high to low Rupesh Majhi
2026-11-26 13:20 ` Joshua Crofts
2026-11-26 13:44 ` Andy Shevchenko
2026-11-26 12:13 ` [PATCH v2 2/7] iio: pressure: dps310: read the coefficients with get_unaligned_be*() Rupesh Majhi
2026-11-26 12:13 ` [PATCH v2 3/7] iio: pressure: dps310: use min() instead of min_t() Rupesh Majhi
2026-11-26 13:18 ` Joshua Crofts
2026-11-26 13:44 ` Andy Shevchenko
2026-11-26 12:13 ` [PATCH v2 4/7] iio: pressure: dps310: use KILO for the Pa to kPa conversion Rupesh Majhi
2026-11-26 12:13 ` [PATCH v2 5/7] iio: pressure: dps310: use time unit macros for sleeps and timeouts Rupesh Majhi
2026-11-26 13:17 ` Joshua Crofts
2026-11-26 13:49 ` Andy Shevchenko
2026-11-26 14:19 ` Joshua Crofts [this message]
2026-11-26 14:37 ` Andy Shevchenko
2026-11-26 13:49 ` Andy Shevchenko
2026-11-26 12:13 ` [PATCH v2 6/7] iio: pressure: dps310: drop the unused i2c_set_clientdata() Rupesh Majhi
2026-11-26 12:13 ` [PATCH v2 7/7] iio: pressure: dps310: include what the driver uses Rupesh Majhi
2026-11-26 13:12 ` Joshua Crofts
2026-11-28 3:56 ` [PATCH v2 0/7] iio: pressure: dps310: cleanups Jonathan Cameron
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=7951c11e-b7f3-4a1a-ac07-87e231e7eb68@kernel.org \
--to=crofts@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=eajames@linux.ibm.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=zoone.rupert@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.