[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHc1_P7vG4=zzTB2RWeNXzaqbXZ7zKokUJkRXnwQOXQBgJJmqg@mail.gmail.com>
Date: Mon, 26 Jan 2026 20:58:07 +0530
From: Shrikant <raskar.shree97@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, skhan@...uxfoundation.org, david.hunter.linux@...il.com,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 2/5] iio: proximity: rfd77402: Use kernel helper for
result polling
On Mon, Jan 26, 2026 at 3:14 PM Andy Shevchenko
<andriy.shevchenko@...el.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?
Regards,
Shrikant
Powered by blists - more mailing lists