Re: [PATCH 2/3] iio: adc: ti-ads1298: Fix incorrect timeout comment
From: mike.looijmans
Date: Thu May 07 2026 - 01:20:18 EST
On 5/6/26 20:15, Md Shofiqul Islam wrote:
At the lowest supported data rate of 250Hz, one conversion period is
4ms, not 40ms. Fix the comment to correctly reflect the timing.
The 50ms timeout value itself is correct as a conservative margin.
The 50ms value is also wrong then, change it to 5. That's already more than enough margin.
Signed-off-by: Md Shofiqul Islam <shofiqtest@xxxxxxxxx>
---
drivers/iio/adc/ti-ads1298.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ti-ads1298.c b/drivers/iio/adc/ti-ads1298.c
index cf5f954206..186bda3087 100644
--- a/drivers/iio/adc/ti-ads1298.c
+++ b/drivers/iio/adc/ti-ads1298.c
@@ -210,7 +210,7 @@ static int ads1298_read_one(struct ads1298_private *priv, int chan_index)
return ret;
}
- /* Cannot take longer than 40ms (250Hz) */
+ /* Cannot take longer than 4ms at the lowest rate (250Hz) */
ret = wait_for_completion_timeout(&priv->completion, msecs_to_jiffies(50));
if (!ret)
return -ETIMEDOUT;
--
Mike Looijmans
System Expert
TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands
T: +31 (0) 499 33 69 69
E: mike.looijmans@xxxxxxxx
W: www.topic.nl