Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Julien Stephan and committed by
Jonathan Cameron
7ad920ce 27d1a4db

+32 -1
+32 -1
Documentation/iio/ad7380.rst
··· 92 92 93 93 root:~# systemctl restart iiod 94 94 95 + Alert 96 + ----- 97 + 98 + 2 channels variants of the ad738x family, can use the SDOB line as an alert pin 99 + when configured in 1 SDO line mode. 4 channels variants, can use SDOD as an 100 + alert pin when configured in 1 or 2 SDO line(s) mode, although only 1 SDO line 101 + mode is currently supported by the driver (see `SPI wiring modes`_). 102 + 103 + At the end of a conversion the active-low alert pin gets asserted if the 104 + conversion result exceeds the alert high limit or falls below the alert low 105 + limit. It is cleared, on a falling edge of CS. The alert pin is common to all 106 + channels. 107 + 108 + User can enable alert using the regular iio events attribute: 109 + 110 + .. code-block:: bash 111 + 112 + events/thresh_either_en 113 + 114 + The high and low thresholds are common to all channels and can also be set using 115 + regular iio events attributes: 116 + 117 + .. code-block:: bash 118 + 119 + events/in_thresh_falling_value 120 + events/in_thresh_rising_value 121 + 122 + If debugfs is available, user can read the ALERT register to determine the 123 + faulty channel and direction. 124 + 125 + In most use cases, user will hardwire the alert pin to trigger a shutdown. 126 + 95 127 Channel selection and sequencer (single-end chips only) 96 128 ------------------------------------------------------- 97 129 ··· 176 144 - Rolling average oversampling 177 145 - Power down mode 178 146 - CRC indication 179 - - Alert 180 147 181 148 182 149 Device buffers