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 v11 8/8] docs: iio: describe inactivity and free-fall detection on the ADXL345
Date: Wed, 2 Jul 2025 23:03:15 +0000 [thread overview]
Message-ID: <20250702230315.19297-9-l.rubusch@gmail.com> (raw)
In-Reply-To: <20250702230315.19297-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 | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/Documentation/iio/adxl345.rst b/Documentation/iio/adxl345.rst
index 8ee01b8b87f4..c5525267ea12 100644
--- a/Documentation/iio/adxl345.rst
+++ b/Documentation/iio/adxl345.rst
@@ -150,6 +150,31 @@ 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: It is recommended to use the activity, inactivity, or free-fall registers
+when operating with an ODR between 12.5 Hz and 400 Hz. According to the
+datasheet, the recommended free-fall threshold is between 300 mg and 600 mg
+(register values 0x05 to 0x09), and the suggested free-fall time ranges from
+100 ms to 350 ms (register values 0x14 to 0x46).
+
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-02 23:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 23:03 [PATCH v11 0/8] iio: accel: adxl345: add interrupt based sensor events Lothar Rubusch
2025-07-02 23:03 ` [PATCH v11 1/8] iio: accel: adxl345: simplify interrupt mapping Lothar Rubusch
2025-07-06 16:10 ` Jonathan Cameron
2025-07-02 23:03 ` [PATCH v11 2/8] iio: accel: adxl345: simplify reading the FIFO Lothar Rubusch
2025-07-06 16:11 ` Jonathan Cameron
2025-07-02 23:03 ` [PATCH v11 3/8] iio: accel: adxl345: add activity event feature Lothar Rubusch
2025-07-03 14:24 ` Andy Shevchenko
2025-07-06 16:09 ` Jonathan Cameron
2025-07-20 18:36 ` Lothar Rubusch
2025-07-24 13:43 ` Jonathan Cameron
2025-07-02 23:03 ` [PATCH v11 4/8] iio: accel: adxl345: add inactivity feature Lothar Rubusch
2025-07-03 14:26 ` Andy Shevchenko
2025-07-03 14:59 ` Lothar Rubusch
2025-07-03 15:45 ` Andy Shevchenko
2025-07-06 12:08 ` Jonathan Cameron
2025-07-02 23:03 ` [PATCH v11 5/8] iio: accel: adxl345: add coupling detection for activity/inactivity Lothar Rubusch
2025-07-02 23:03 ` [PATCH v11 6/8] iio: accel: adxl345: extend inactivity time for less than 1s Lothar Rubusch
2025-07-02 23:03 ` [PATCH v11 7/8] docs: iio: add documentation for adxl345 driver Lothar Rubusch
2025-07-02 23:03 ` Lothar Rubusch [this message]
2025-07-06 16:16 ` [PATCH v11 8/8] docs: iio: describe inactivity and free-fall detection on the ADXL345 Jonathan Cameron
2025-07-20 18:49 ` Lothar Rubusch
2025-07-24 13:47 ` 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=20250702230315.19297-9-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).