diff options
| author | Julien Stephan <jstephan@baylibre.com> | 2025-01-08 13:49:37 +0100 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-02-03 19:15:37 +0000 |
| commit | 7ad920ce342997e8a790a937f076383993a5178d (patch) | |
| tree | 69a612a3806db5d314f6a6a223d41d56d3746057 /Documentation/iio | |
| parent | 27d1a4dbe1e150692c39a9056af018cb792234fd (diff) | |
| download | linux-7ad920ce342997e8a790a937f076383993a5178d.tar.gz linux-7ad920ce342997e8a790a937f076383993a5178d.tar.bz2 linux-7ad920ce342997e8a790a937f076383993a5178d.zip | |
docs: iio: ad7380: add alert support
Add a section for alert support, explaining how user can use iio events
attributes to enable alert and set thresholds.
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20250108-ad7380-add-alert-support-v4-5-1751802471ba@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'Documentation/iio')
| -rw-r--r-- | Documentation/iio/ad7380.rst | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/Documentation/iio/ad7380.rst b/Documentation/iio/ad7380.rst index c46127700e14..cff688bcc2d9 100644 --- a/Documentation/iio/ad7380.rst +++ b/Documentation/iio/ad7380.rst @@ -92,6 +92,38 @@ must restart iiod using the following command: root:~# systemctl restart iiod +Alert +----- + +2 channels variants of the ad738x family, can use the SDOB line as an alert pin +when configured in 1 SDO line mode. 4 channels variants, can use SDOD as an +alert pin when configured in 1 or 2 SDO line(s) mode, although only 1 SDO line +mode is currently supported by the driver (see `SPI wiring modes`_). + +At the end of a conversion the active-low 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 available, 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 +176,6 @@ Unimplemented features - Rolling average oversampling - Power down mode - CRC indication -- Alert Device buffers |
