linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jorge Marques <jorge.marques@analog.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Uwe Kleine-König" <ukleinek@kernel.org>
Cc: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<linux-pwm@vger.kernel.org>,
	Jorge Marques <jorge.marques@analog.com>
Subject: [PATCH v3 7/8] docs: iio: ad4052: Add event documentation
Date: Tue, 10 Jun 2025 09:34:40 +0200	[thread overview]
Message-ID: <20250610-iio-driver-ad4052-v3-7-cf1e44c516d4@analog.com> (raw)
In-Reply-To: <20250610-iio-driver-ad4052-v3-0-cf1e44c516d4@analog.com>

Explain the AD4052 monitoring support by exposing as an IIO event.

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
---
 Documentation/iio/ad4052.rst | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/Documentation/iio/ad4052.rst b/Documentation/iio/ad4052.rst
index 2ad1c7712766118b03c48929d1f2b7670d5f8d41..da9c0481dfcd3b4eecd91280b7f259aa9118467c 100644
--- a/Documentation/iio/ad4052.rst
+++ b/Documentation/iio/ad4052.rst
@@ -93,3 +93,41 @@ When SPI offload is being used, additional attributes are present:
      - Description
    * - ``in_voltage_sampling_frequency``
      - Set the sampling frequency.
+
+Threshold events
+================
+
+The ADC supports a monitoring mode to raise threshold events. The driver
+supports a single interrupt for both rising and falling readings.
+
+The feature is enabled/disabled by setting ``thresh_either_en``. During monitor
+mode, the device continuously operates in autonomous mode until put back in
+configuration mode, due to this, the device returns busy until the feature is
+disabled.
+
+The following event attributes are available:
+
+.. list-table:: Event attributes
+   :header-rows: 1
+
+   * - Attribute
+     - Description
+   * - ``sampling_frequency``
+     - Frequency used in the monitoring mode, sets the device internal sample
+       rate when the mode is activated.
+   * - ``sampling_frequency_available``
+     - List of available sample rates.
+   * - ``thresh_either_en``
+     - Enable monitoring mode.
+   * - ``thresh_falling_hysteresis``
+     - Set the hysteresis value for the minimum threshold.
+   * - ``thresh_falling_value``
+     - Set the minimum threshold value.
+   * - ``thresh_rising_hysteresis``
+     - Set the hysteresis value for the maximum threshold.
+   * - ``thresh_rising_value``
+     - Set the maximum threshold value.
+
+If the interrupt ``gp0`` is not provided, the IIO events attributes are still
+present, but no IIO Event will ever be triggered. This allows to use ``gp0``
+output to trigger other resource.

-- 
2.49.0


  parent reply	other threads:[~2025-06-10  7:35 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10  7:34 [PATCH v3 0/8] Add support for AD4052 device family Jorge Marques
2025-06-10  7:34 ` [PATCH v3 1/8] Documentation: ABI: add oversampling frequency in sysfs-bus-iio Jorge Marques
2025-06-11 17:02   ` Jonathan Cameron
2025-06-12 10:10     ` Jorge Marques
2025-06-10  7:34 ` [PATCH v3 2/8] dt-bindings: iio: adc: Add adi,ad4052 Jorge Marques
2025-06-11 17:18   ` Jonathan Cameron
2025-06-12 10:11     ` Jorge Marques
2025-06-12 15:03       ` David Lechner
2025-06-12 19:42         ` Jorge Marques
2025-06-12 20:20           ` David Lechner
2025-06-13 11:17             ` Jorge Marques
2025-06-14 10:14               ` Jonathan Cameron
2025-06-10  7:34 ` [PATCH v3 3/8] docs: iio: New docs for ad4052 driver Jorge Marques
2025-06-10  7:34 ` [PATCH v3 4/8] iio: adc: Add support for ad4052 Jorge Marques
2025-06-14 10:08   ` Jonathan Cameron
2025-06-16 14:54     ` David Lechner
2025-06-21 16:08       ` Jonathan Cameron
2025-06-21 16:13         ` David Lechner
2025-06-22 14:28           ` Jonathan Cameron
2025-06-17 14:59   ` Uwe Kleine-König
2025-06-17 15:34     ` Jorge Marques
2025-06-18 17:55       ` Uwe Kleine-König
2025-06-10  7:34 ` [PATCH v3 5/8] docs: iio: ad4052: Add offload support documentation Jorge Marques
2025-06-10  7:34 ` [PATCH v3 6/8] iio: adc: Add offload support for ad4052 Jorge Marques
2025-06-14 10:20   ` Jonathan Cameron
2025-06-20 18:52     ` Jorge Marques
2025-06-21 16:16       ` Jonathan Cameron
2025-06-10  7:34 ` Jorge Marques [this message]
2025-06-10  7:34 ` [PATCH v3 8/8] iio: adc: Add events support to ad4052 Jorge Marques
2025-06-12 19:38   ` David Lechner
2025-06-13 10:02     ` Jorge Marques
2025-06-13 16:03       ` David Lechner
2025-06-14 10:25         ` Jonathan Cameron
2025-06-14 10:40           ` Jonathan Cameron
2025-06-14 10:36   ` Jonathan Cameron
2025-06-16 13:54     ` Jorge Marques
2025-06-21 16:20       ` Jonathan Cameron

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=20250610-iio-driver-ad4052-v3-7-cf1e44c516d4@analog.com \
    --to=jorge.marques@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@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=linux-pwm@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=ukleinek@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;
as well as URLs for NNTP newsgroup(s).