[PATCH v7 2/6] iio: proximity: rfd77402: Align polling timeout with datasheet

Shrikant Raskar via B4 Relay posted 6 patches 1 week, 6 days ago
There is a newer version of this series
[PATCH v7 2/6] iio: proximity: rfd77402: Align polling timeout with datasheet
Posted by Shrikant Raskar via B4 Relay 1 week, 6 days ago
From: Shrikant Raskar <raskar.shree97@gmail.com>

Update the polling delay to use a 100 ms timeout, as specified
in the RFD77402 datasheet.

Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
---
 drivers/iio/proximity/rfd77402.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {

-- 
2.43.0
Re: [PATCH v7 2/6] iio: proximity: rfd77402: Align polling timeout with datasheet
Posted by Andy Shevchenko 1 week, 5 days ago
On Tue, Jan 27, 2026 at 01:02:16AM +0530, Shrikant Raskar via B4 Relay wrote:

> Update the polling delay to use a 100 ms timeout, as specified
> in the RFD77402 datasheet.

Please, refer at least in the code what is the section and/or table specifies
that...

...

>  		if (ret & RFD77402_ICSR_RESULT)
>  			break;

...here.

Note, it's a requirement to comment all long sleeps (~1ms is considered long),
and some other short sleeps depending on the context.

> -		msleep(20);
> +		msleep(10);
>  	}

-- 
With Best Regards,
Andy Shevchenko