From: Jonathan Cameron <jic23@kernel.org>
To: ILYAS NHASSE via B4 Relay <devnull+ilyas.nhasse.skf.com@kernel.org>
Cc: ilyas.nhasse@skf.com, "Nuno Sá" <nuno.sa@analog.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Marcelo Schmitt" <marcelo.schmitt@analog.com>,
linux@analog.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ad_sigma_delta: support devices without RDY interrupt
Date: Sat, 21 Nov 2026 02:14:23 +0000 [thread overview]
Message-ID: <20261121021423.6d432a98@jic23-hlaptop> (raw)
In-Reply-To: <20261120-ad7124-no-irq-v1-2-7826c5c3fd25@skf.com>
On Fri, 20 Nov 2026 12:26:48 +0100
ILYAS NHASSE via B4 Relay <devnull+ilyas.nhasse.skf.com@kernel.org> wrote:
> From: ILYAS NHASSE <ilyas.nhasse@skf.com>
>
> The end of a conversion or of a calibration is detected with the DOUT/RDY
> interrupt, so a device whose DOUT/RDY pin is only wired to the SPI MISO
> line can't be used, although its status register reports the same event
> in its RDY bit.
>
> For devices with registers but without interrupt, wait for RDY in
without the interrupt wired
> ad_sigma_delta_single_conversion() and ad_sd_calibrate() by polling the
> status register, with the same timeouts as the interrupt-driven waits.
> As with the interrupt, the bus stays locked and CS asserted during the
> wait, and ad_sigma_delta_clear_pending_event() has drained any older
> result beforehand, so the RDY bit seen by the poll belongs to the
> operation just started. A timeout is reported as -ETIMEDOUT.
>
> The RDY interrupt is the only trigger source of the triggered buffer, so
> devm_ad_sd_setup_buffer_and_trigger() sets nothing up for these devices
> and they only support direct mode. Registerless devices still require
> the interrupt.
>
> Each poll is a SPI transfer, so poll every 20 ms: this delays the
> detection of the end of a conversion by at most one period, a fifth of
> a conversion at the AD7124 default output data rate of 10 SPS, while
> keeping the bus traffic, and the CPU time of PIO SPI transfers, low.
>
> Nothing changes for devices with an interrupt.
This is rather wordy. Perhaps try rewriting to cut that down
to text more likely to be read.
>
> Signed-off-by: ILYAS NHASSE <ilyas.nhasse@skf.com>
In general seems fine to me.
Jonathan
prev parent reply other threads:[~2026-11-21 2:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 11:26 [PATCH 0/2] iio: adc: ad7124: support boards " ILYAS NHASSE via B4 Relay
2026-11-20 11:26 ` [PATCH 1/2] dt-bindings: iio: adc: adi,ad7124: make interrupts optional ILYAS NHASSE via B4 Relay
2026-11-20 17:46 ` Conor Dooley
2026-11-21 2:08 ` Jonathan Cameron
2026-11-20 11:26 ` [PATCH 2/2] iio: adc: ad_sigma_delta: support devices without RDY interrupt ILYAS NHASSE via B4 Relay
2026-11-20 12:24 ` Andy Shevchenko
2026-11-21 2:14 ` Jonathan Cameron [this message]
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=20261121021423.6d432a98@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+ilyas.nhasse.skf.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=ilyas.nhasse@skf.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=marcelo.schmitt@analog.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/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
all inboxes | Powered by JetHome®