All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Marcin Malagowski" <mrc@bourne.st>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: pressure: abp060mg: Use msleep() instead of msleep_interruptible()
Date: Fri, 20 Nov 2026 11:54:46 +0200	[thread overview]
Message-ID: <awAY5umCN-RiP2Iy@ashevche-desk.local> (raw)
In-Reply-To: <20261120-b4-abp060mg-fixes-v1-3-2baf026cde47@gmail.com>

On Fri, Nov 20, 2026 at 01:11:39AM -0600, Oscar Alejandro Sánchez Lucero wrote:
> The return value of msleep_interruptible() is ignored. If a signal
> arrives while waiting for the sensor conversion, the thread wakes up
> early and reads the sensor before the 40 ms response time has elapsed,
> resulting in stale data or an -EIO error.
> 
> Use msleep() to ensure the full conversion delay is respected.

It should clarify better why uninterruptible call is better.
Do you have any datasheet reference that states that this time has to
be at least 40 ms?

Also we have tons of the IIO drivers doing the same. Have you studied
the history to understand when it started and what the motivation was?
Perhaps it may shed a light on this.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-11-20  9:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  7:11 [PATCH 0/3] iio: pressure: abp060mg: Fix scale typo and I2C read handling Oscar Alejandro Sánchez Lucero
2026-11-20  7:11 ` [PATCH 1/3] iio: pressure: abp060mg: Fix max pressure value for abp001pg Oscar Alejandro Sánchez Lucero
2026-11-20  9:49   ` Andy Shevchenko
2026-11-20  7:11 ` [PATCH 2/3] iio: pressure: abp060mg: Check for short I2C transfers Oscar Alejandro Sánchez Lucero
2026-11-20  9:49   ` Andy Shevchenko
2026-11-20  7:11 ` [PATCH 3/3] iio: pressure: abp060mg: Use msleep() instead of msleep_interruptible() Oscar Alejandro Sánchez Lucero
2026-11-20  9:54   ` Andy Shevchenko [this message]
2026-11-20 10:11     ` Alejandro Lucero

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=awAY5umCN-RiP2Iy@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=aleszlucero@gmail.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=mrc@bourne.st \
    --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 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.