From: Lothar Rubusch <l.rubusch@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: eraretuya@gmail.com, lars@metafoo.de,
Michael.Hennerich@analog.com, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, corbet@lwn.net,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v11 8/8] docs: iio: describe inactivity and free-fall detection on the ADXL345
Date: Sun, 20 Jul 2025 20:49:48 +0200 [thread overview]
Message-ID: <CAFXKEHa4M-Tp-y4dvNeWgYtUGo_ymyS7kqGbkhf+NJnmrrRxqg@mail.gmail.com> (raw)
In-Reply-To: <20250706171611.7b4ae1a1@jic23-huawei>
Hi
On Sun, Jul 6, 2025 at 6:16 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Wed, 2 Jul 2025 23:03:15 +0000
> Lothar Rubusch <l.rubusch@gmail.com> wrote:
>
> > 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.
>
> This seems a tiny bit backwards. It is recommend that the activity, inactivity or
> free-fall registers are only used when operating with an ODR...
>
Ehm, Doesn't the sensor always have an ODR? The real question is which
ODR should be configured. There are recommendations for specific
features. I may have either misunderstood or misdocumented this part.
> As currently written it seems to be recommending that if you want those sampling
> frequencies you should also enable one of these detectors.
>
Ah, no. The other way around, when someone wants one of events
detected, the recommended frequencies should be used. I'll have a look
at it.
> Reminds me of the classic London underground sign that said "Dogs must be
> carried." which raised the question of how people with out dogs were meant to travel.
>
> Otherwise this new section looks good to me. Thanks,
>
> Jonathan
>...
Best,
Lothar
next prev parent reply other threads:[~2025-07-20 18:50 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 ` [PATCH v11 8/8] docs: iio: describe inactivity and free-fall detection on the ADXL345 Lothar Rubusch
2025-07-06 16:16 ` Jonathan Cameron
2025-07-20 18:49 ` Lothar Rubusch [this message]
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=CAFXKEHa4M-Tp-y4dvNeWgYtUGo_ymyS7kqGbkhf+NJnmrrRxqg@mail.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).