Skip to content

Commit 36bff18

Browse files
embedded-essentialsjic23
authored andcommitted
iio: proximity: rfd77402: Align polling timeout with datasheet
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> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 0077e9b commit 36bff18

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/iio/proximity/rfd77402.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ static int rfd77402_measure(struct i2c_client *client)
132132
goto err;
133133
if (ret & RFD77402_ICSR_RESULT)
134134
break;
135-
msleep(20);
135+
/*
136+
* As per RFD77402 datasheet section '3.1.1 Single Measure',
137+
* the suggested timeout value for single measure is 100ms.
138+
*/
139+
msleep(10);
136140
}
137141

138142
if (tries < 0) {

0 commit comments

Comments
 (0)