From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Shrikant <raskar.shree97@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
skhan@linuxfoundation.org, david.hunter.linux@gmail.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/5] iio: proximity: rfd77402: Use kernel helper for result polling
Date: Mon, 26 Jan 2026 18:11:33 +0200 [thread overview]
Message-ID: <aXeSNSKqgfVwhRvs@smile.fi.intel.com> (raw)
In-Reply-To: <CAHc1_P7vG4=zzTB2RWeNXzaqbXZ7zKokUJkRXnwQOXQBgJJmqg@mail.gmail.com>
On Mon, Jan 26, 2026 at 08:58:07PM +0530, Shrikant wrote:
> On Mon, Jan 26, 2026 at 3:14 PM Andy Shevchenko
> <andriy.shevchenko@intel.com> wrote:
> > On Sat, Jan 24, 2026 at 10:26:04PM +0530, Shrikant wrote:
...
> > > > > + 10 * USEC_PER_MSEC,
> > > > > + 10 * 10 * USEC_PER_MSEC,
> > > >
> > > > This makes sleep shorter by 2. Why?
> > > I have considered the timeout values from the RFD77402 datasheet.
> > > The timeout values mentioned in section 3.1.1 Single Measure are as below:
> > > 1. Every Status Check = 10ms
> > > 2. Whole Flow = 100 ms
> >
> > So, you should do this in a separate change explaining this.
> In that case, I can add a small preparatory patch before the
> “Use kernel helper for result polling” patch to adjust the
> polling interval according to the datasheet.
>
> This would mean changing the existing polling loop, for example:
> diff --git a/drivers/iio/proximity/rfd77402.c b/drivers/iio/proximity/rfd77402.c
> index 69cc1505b964..3e14660a4bb1 100644
> --- a/drivers/iio/proximity/rfd77402.c
> +++ b/drivers/iio/proximity/rfd77402.c
> @@ -132,7 +132,7 @@ static int rfd77402_measure(struct i2c_client *client)
> goto err;
> if (ret & RFD77402_ICSR_RESULT)
> break;
> - msleep(20);
> + msleep(10);
> }
>
> if (tries < 0) {
>
> However, this change would then be removed in the very next patch
> when the polling loop is replaced by read_poll_timeout().I just want
> to confirm that this temporary change–then–removal is acceptable?
Yes. These two will be quite different semantically.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-01-26 16:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 20:35 [PATCH v6 0/5] iio: proximity: Add interrupt support for RFD77402 Shrikant Raskar via B4 Relay
2026-01-20 20:35 ` [PATCH v6 1/5] iio: proximity: rfd77402: Reorder header includes Shrikant Raskar via B4 Relay
2026-01-21 8:54 ` Andy Shevchenko
2026-01-22 20:57 ` Jonathan Cameron
2026-01-23 3:42 ` Shrikant
2026-01-23 9:59 ` Jonathan Cameron
2026-01-20 20:35 ` [PATCH v6 2/5] iio: proximity: rfd77402: Use kernel helper for result polling Shrikant Raskar via B4 Relay
2026-01-21 9:05 ` Andy Shevchenko
2026-01-24 16:56 ` Shrikant
2026-01-26 9:44 ` Andy Shevchenko
2026-01-26 15:28 ` Shrikant
2026-01-26 16:11 ` Andy Shevchenko [this message]
2026-01-20 20:35 ` [PATCH v6 3/5] iio: proximity: rfd77402: Use devm-managed mutex initialization Shrikant Raskar via B4 Relay
2026-01-21 9:16 ` Andy Shevchenko
2026-01-20 20:35 ` [PATCH v6 4/5] iio: proximity: rfd77402: Document device private data structure Shrikant Raskar via B4 Relay
2026-01-21 9:18 ` Andy Shevchenko
2026-01-22 17:42 ` Shrikant
2026-01-20 20:35 ` [PATCH v6 5/5] iio: proximity: rfd77402: Add interrupt handling support Shrikant Raskar via B4 Relay
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=aXeSNSKqgfVwhRvs@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=david.hunter.linux@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 \
--cc=raskar.shree97@gmail.com \
--cc=skhan@linuxfoundation.org \
/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