From: Rickard Andersson <rickard.andersson@axis.com>
To: <hvilleneuve@dimonoff.com>, <jic23@kernel.org>,
<dlechner@baylibre.com>, <nuno.sa@analog.com>, <andy@kernel.org>,
<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <rickard.andersson@axis.com>, <kernel@axis.com>
Subject: [PATCH v2 2/3] iio: adc: ti-ads7924: Use msleep() for reset pulse
Date: Fri, 4 Dec 2026 13:14:57 +0100 [thread overview]
Message-ID: <20261204121458.744588-3-rickard.andersson@axis.com> (raw)
In-Reply-To: <20261204121458.744588-1-rickard.andersson@axis.com>
From: Rickard x Andersson <rickard.andersson@axis.com>
The reset pulse in ads7924_reset() is generated with mdelay(), which
busy-waits for 100 ms. ads7924_reset() is only called from
ads7924_probe(), which runs in process context, so sleeping is
allowed.
Replace mdelay() with msleep().
Signed-off-by: Rickard x Andersson <rickard.andersson@axis.com>
---
drivers/iio/adc/ti-ads7924.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ti-ads7924.c b/drivers/iio/adc/ti-ads7924.c
index 7b3fcfb98ae2..c19441586b02 100644
--- a/drivers/iio/adc/ti-ads7924.c
+++ b/drivers/iio/adc/ti-ads7924.c
@@ -325,7 +325,7 @@ static int ads7924_reset(struct iio_dev *indio_dev)
if (data->reset_gpio) {
gpiod_set_value(data->reset_gpio, 1); /* Assert. */
/* Educated guess: assert time not specified in datasheet... */
- mdelay(100);
+ msleep(100);
gpiod_set_value(data->reset_gpio, 0); /* Deassert. */
/*
* Startup time after reset is not specified in the datasheet.
--
2.43.0
next prev parent reply other threads:[~2026-12-04 12:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 12:14 [PATCH v2 0/3] [PATCH v2 0/3] iio: adc: ti-ads7924: Fix hardware reset Rickard Andersson
2026-12-04 12:14 ` [PATCH v2 1/3] iio: adc: ti-ads7924: Wait after " Rickard Andersson
2026-12-04 17:00 ` Andy Shevchenko
2026-12-04 12:14 ` Rickard Andersson [this message]
2026-12-04 12:14 ` [PATCH v2 3/3] iio: adc: ti-ads7924: Use reset controller for " Rickard Andersson
2026-12-04 17:02 ` 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=20261204121458.744588-3-rickard.andersson@axis.com \
--to=rickard.andersson@axis.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=hvilleneuve@dimonoff.com \
--cc=jic23@kernel.org \
--cc=kernel@axis.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.