From: Lothar Rubusch <l.rubusch@gmail.com>
To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
corbet@lwn.net
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, eraretuya@gmail.com,
l.rubusch@gmail.com
Subject: [PATCH v12 7/7] docs: iio: describe inactivity and free-fall detection on the ADXL345
Date: Sun, 27 Jul 2025 21:00:14 +0000 [thread overview]
Message-ID: <20250727210014.27766-8-l.rubusch@gmail.com> (raw)
In-Reply-To: <20250727210014.27766-1-l.rubusch@gmail.com>
Describe the inactivity detection additionally using the free-fall
register. Due to the controversial discussions on the mailing list, this
section of the documentation will be committed separately to allow for a
more focused and detailed elaboration of the topic.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
---
Documentation/iio/adxl345.rst | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/Documentation/iio/adxl345.rst b/Documentation/iio/adxl345.rst
index 8ee01b8b87f4..4bd038cb4a37 100644
--- a/Documentation/iio/adxl345.rst
+++ b/Documentation/iio/adxl345.rst
@@ -150,6 +150,30 @@ functions, so that one follows the other. The auto-sleep function puts the
sensor into sleep mode when inactivity is detected, reducing power consumption
to the sub-12.5 Hz rate.
+The inactivity time is configurable between 1 and 255 seconds. In addition to
+inactivity detection, the sensor also supports free-fall detection, which, from
+the IIO perspective, is treated as a fall in magnitude across all axes. In
+sensor terms, free-fall is defined using an inactivity period ranging from 0.000
+to 1.000 seconds.
+
+The driver behaves as follows:
+* If the configured inactivity period is 1 second or more, the driver uses the
+ sensor's inactivity register. This allows the event to be linked with
+ activity detection, use auto-sleep, and be either AC- or DC-coupled.
+
+* If the inactivity period is less than 1 second, the event is treated as plain
+ inactivity or free-fall detection. In this case, auto-sleep and coupling
+ (AC/DC) are not applied.
+
+* If an inactivity time of 0 seconds is configured, the driver selects a
+ heuristically determined default period (greater than 1 second) to optimize
+ power consumption. This also uses the inactivity register.
+
+Note: According to the datasheet, the optimal ODR for detecting activity,
+or inactivity (or when operating with the free-fall register) should fall within
+the range of 12.5 Hz to 400 Hz. The recommended free-fall threshold is between
+300 mg and 600 mg (register values 0x05 to 0x09).
+
In DC-coupled mode, the current acceleration magnitude is directly compared to
the values in the THRESH_ACT and THRESH_INACT registers to determine activity or
inactivity. In contrast, AC-coupled activity detection uses the acceleration
--
2.39.5
next prev parent reply other threads:[~2025-07-27 21:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-27 21:00 [PATCH v12 0/7] iio: accel: adxl345: add interrupt based sensor events Lothar Rubusch
2025-07-27 21:00 ` [PATCH v12 1/7] iio: accel: adxl345: simplify tap suppress bit Lothar Rubusch
2025-07-27 21:00 ` [PATCH v12 2/7] iio: accel: adxl345: add activity event feature Lothar Rubusch
2025-07-27 21:00 ` [PATCH v12 3/7] iio: accel: adxl345: add inactivity feature Lothar Rubusch
2025-07-27 21:00 ` [PATCH v12 4/7] iio: accel: adxl345: add coupling detection for activity/inactivity Lothar Rubusch
2025-07-27 21:00 ` [PATCH v12 5/7] iio: accel: adxl345: extend inactivity time for less than 1s Lothar Rubusch
2025-07-27 21:00 ` [PATCH v12 6/7] docs: iio: add documentation for adxl345 driver Lothar Rubusch
2025-07-27 21:00 ` Lothar Rubusch [this message]
2025-08-02 11:47 ` [PATCH v12 0/7] iio: accel: adxl345: add interrupt based sensor events 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=20250727210014.27766-8-l.rubusch@gmail.com \
--to=l.rubusch@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=corbet@lwn.net \
--cc=dlechner@baylibre.com \
--cc=eraretuya@gmail.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;
as well as URLs for NNTP newsgroup(s).