From: Julien Stephan <jstephan@baylibre.com>
To: "Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org,
Julien Stephan <jstephan@baylibre.com>
Subject: [PATCH v3 5/5] docs: iio: ad7380: add alert support
Date: Tue, 07 Jan 2025 09:48:29 +0100 [thread overview]
Message-ID: <20250107-ad7380-add-alert-support-v3-5-bce10afd656b@baylibre.com> (raw)
In-Reply-To: <20250107-ad7380-add-alert-support-v3-0-bce10afd656b@baylibre.com>
Add a section for alert support, explaining how user can use iio events
attributes to enable alert and set thresholds.
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
Documentation/iio/ad7380.rst | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/Documentation/iio/ad7380.rst b/Documentation/iio/ad7380.rst
index c46127700e14ca9ec3cac0bd5776b6702f2659e2..9b4407eeaf1d4309c06c64071ed08b4ac80944d2 100644
--- a/Documentation/iio/ad7380.rst
+++ b/Documentation/iio/ad7380.rst
@@ -92,6 +92,37 @@ must restart iiod using the following command:
root:~# systemctl restart iiod
+Alert
+-----
+
+When configured in 1 SDO line mode (see `SPI wiring modes`_), the SDOB or the
+SDOD line (respectively for the 2 or 4 channels variants) can act as an alert
+pin.
+
+At the end of a conversion the low-active alert pin gets asserted if the
+conversion result exceeds the alert high limit or falls below the alert low
+limit. It is cleared, on a falling edge of CS. The alert pin is common to all
+channels.
+
+User can enable alert using the regular iio events attribute:
+
+.. code-block:: bash
+
+ events/thresh_either_en
+
+The high and low thresholds are common to all channels and can also be set using
+regular iio events attributes:
+
+.. code-block:: bash
+
+ events/in_thresh_falling_value
+ events/in_thresh_rising_value
+
+If debugfs is enabled anc configured, user can read the ALERT register to
+determine the faulty channel and direction.
+
+In most use cases, user will hardwire the alert pin to trigger a shutdown.
+
Channel selection and sequencer (single-end chips only)
-------------------------------------------------------
@@ -144,7 +175,6 @@ Unimplemented features
- Rolling average oversampling
- Power down mode
- CRC indication
-- Alert
Device buffers
--
2.47.1
next prev parent reply other threads:[~2025-01-07 8:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 8:48 [PATCH v3 0/5] iio: adc: ad7380: add alert support Julien Stephan
2025-01-07 8:48 ` [PATCH v3 1/5] iio: adc: ad7380: do not use iio_device_claim_direct_scoped anymore Julien Stephan
2025-01-07 16:48 ` David Lechner
2025-01-12 11:30 ` Jonathan Cameron
2025-01-07 8:48 ` [PATCH v3 2/5] iio: adc: ad7380: enable regmap cache Julien Stephan
2025-01-07 16:54 ` David Lechner
2025-01-07 8:48 ` [PATCH v3 3/5] iio: adc: ad7380: do not store osr in private data structure Julien Stephan
2025-01-07 17:01 ` David Lechner
2025-01-12 11:34 ` Jonathan Cameron
2025-01-07 8:48 ` [PATCH v3 4/5] iio: adc: ad7380: add alert support Julien Stephan
2025-01-07 17:11 ` David Lechner
2025-01-12 11:41 ` Jonathan Cameron
2025-01-07 8:48 ` Julien Stephan [this message]
2025-01-07 17:27 ` [PATCH v3 5/5] docs: iio: " David Lechner
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=20250107-ad7380-add-alert-support-v3-5-bce10afd656b@baylibre.com \
--to=jstephan@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=corbet@lwn.net \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-doc@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox