From: Md Shofiqul Islam <shofiqtest@gmail.com>
To: jic23@kernel.org, mike.looijmans@topic.nl
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
Md Shofiqul Islam <shofiqtest@gmail.com>
Subject: [PATCH v3 2/3] iio: adc: ti-ads1298: Fix timeout comment and value
Date: Thu, 7 May 2026 22:11:27 +0300 [thread overview]
Message-ID: <20260507191129.25924-2-shofiqtest@gmail.com> (raw)
In-Reply-To: <20260507191129.25924-1-shofiqtest@gmail.com>
At the lowest supported data rate of 250Hz, one conversion period is
4ms, not 40ms. Fix the comment to correctly reflect the timing and
reduce the timeout from 50ms to 5ms, which is still more than enough
margin.
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
---
drivers/iio/adc/ti-ads1298.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ti-ads1298.c b/drivers/iio/adc/ti-ads1298.c
index cf5f954206..8957e873e1 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) */
- ret = wait_for_completion_timeout(&priv->completion, msecs_to_jiffies(50));
+ /* Cannot take longer than 4ms at the lowest rate (250Hz) */
+ ret = wait_for_completion_timeout(&priv->completion, msecs_to_jiffies(5));
if (!ret)
return -ETIMEDOUT;
--
2.54.0.windows.1
next prev parent reply other threads:[~2026-05-07 19:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 19:11 [PATCH v3 1/3] iio: adc: ti-ads1298: Add parentheses around macro parameter Md Shofiqul Islam
2026-05-07 19:11 ` Md Shofiqul Islam [this message]
2026-05-07 19:11 ` [PATCH v3 3/3] iio: adc: ti-ads1298: Remove unnecessary CONFIG2 write during init Md Shofiqul Islam
2026-05-09 14:56 ` [PATCH v3 1/3] iio: adc: ti-ads1298: Add parentheses around macro parameter Andy Shevchenko
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=20260507191129.25924-2-shofiqtest@gmail.com \
--to=shofiqtest@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.looijmans@topic.nl \
--cc=nuno.sa@analog.com \
/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