From: Jonathan Cameron <jic23@kernel.org>
To: Lothar Rubusch <l.rubusch@gmail.com>
Cc: 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,
eraretuya@gmail.com
Subject: Re: [PATCH v9 11/11] docs: iio: add documentation for adxl345 driver
Date: Sat, 14 Jun 2025 15:17:03 +0100 [thread overview]
Message-ID: <20250614151703.047e83fe@jic23-huawei> (raw)
In-Reply-To: <20250610215933.84795-12-l.rubusch@gmail.com>
On Tue, 10 Jun 2025 21:59:33 +0000
Lothar Rubusch <l.rubusch@gmail.com> wrote:
> The documentation describes the ADXL345 driver, IIO interface,
> interface usage and configuration.
Trivial but wrap commit descriptions at 75 chars.
The main comment on this is that, when talking about datasheet terms / settings
etc it would be good to reflect them back to the IIO controls that actually allow
us to change them.
Otherwise seems reasonable to me.
>
> Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
> +
> +Sensor Events
> +-------------
> +
> +Particular IIO events will be triggered by the corresponding interrupts. The
> +sensor driver supports no or one active INT line, where the sensor has two
> +possible INT IOs. Configure the used INT line in the devicetree. If no INT line
> +is configured, the sensor falls back to FIFO bypass mode and no events are
> +possible, only X, Y and Z axis measurements are possible.
> +
> +The following table shows the ADXL345 related device files, found in the
> +specific device folder path ``/sys/bus/iio/devices/iio:deviceX/events``.
> +Note, the default activity/inactivity is DC coupled. Thus only AC coupled
> +activity and inactivity are mentioned explicitly.
This paragraph probably wants to talk about the mapping of AC coupled to 'adaptive'
I couldn't relate it directly to the table without that.
> +
> ++---------------------------------------------+---------------------------------------------+
> +| Event handle | Description |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_gesture_doubletap_en | Enable double tap detection on all axis |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_gesture_doubletap_reset_timeout | Double tap window in [us] |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_gesture_doubletap_tap2_min_delay | Double tap latent in [us] |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_gesture_singletap_timeout | Single tap duration in [us] |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_gesture_singletap_value | Single tap threshold value in 62.5/LSB |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_mag_falling_period | Inactivity time in seconds |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_mag_falling_value | Inactivity threshold value in 62.5/LSB |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_mag_adaptive_rising_en | Enable AC coupled activity on X axis |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_mag_adaptive_falling_period | AC coupled inactivity time in seconds |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_mag_adaptive_falling_value | AC coupled inactivity threshold in 62.5/LSB |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_mag_adaptive_rising_value | AC coupled activity threshold in 62.5/LSB |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_mag_rising_en | Enable activity detection on X axis |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_mag_rising_value | Activity threshold value in 62.5/LSB |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_x_gesture_singletap_en | Enable single tap detection on X axis |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_x&y&z_mag_falling_en | Enable inactivity detection on all axis |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_x&y&z_mag_adaptive_falling_en | Enable AC coupled inactivity on all axis |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_y_gesture_singletap_en | Enable single tap detection on Y axis |
> ++---------------------------------------------+---------------------------------------------+
> +| in_accel_z_gesture_singletap_en | Enable single tap detection on Z axis |
> ++---------------------------------------------+---------------------------------------------+
> +
> +Find a detailed description of a particular functionality in the sensor
> +datasheet.
> +
> +Setting the **ODR** explicitly will result in estimated adjusted default values
Say how to set ODR etc in IIO terms as well perhaps?
> +for the inactivity time detection, where higher frequencies shall default to
> +longer wait periods, and vice versa. It is also possible to explicitly
> +configure inactivity wait times, if the defaulting approach does not match
> +application requirements. Setting 0 here, will fall back to default setting.
I'm not particularly keen on that 0 aspect as it's unintuitive. Why do we need
a means to go back to the default?
> +
> +The **g range** configuration also tries to estimate activity and inactivity
> +thresholds when switching to another g range. The default range will be
> +factorized by the relation of old range divided by new range. The value never
> +becomes 0 and will be at least 1 and at most 255 i.e. 62.5g/LSB according to
> +the datasheet. Nevertheless activity and inactivity thresholds can be
> +overwritten by explicit values.
prev parent reply other threads:[~2025-06-14 14:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 21:59 [PATCH v9 00/11] iio: accel: adxl345: add interrupt based sensor events Lothar Rubusch
2025-06-10 21:59 ` [PATCH v9 01/11] iio: accel: adxl345: apply scale factor to tap threshold Lothar Rubusch
2025-06-14 13:42 ` Jonathan Cameron
2025-06-15 22:20 ` Lothar Rubusch
2025-06-21 16:55 ` Jonathan Cameron
2025-06-21 18:14 ` Lothar Rubusch
2025-06-10 21:59 ` [PATCH v9 02/11] iio: accel: adxl345: make data struct variable irq function local Lothar Rubusch
2025-06-14 13:43 ` Jonathan Cameron
2025-06-10 21:59 ` [PATCH v9 03/11] iio: accel: adxl345: simplify measure enable Lothar Rubusch
2025-06-14 13:45 ` Jonathan Cameron
2025-06-10 21:59 ` [PATCH v9 04/11] iio: accel: adxl345: simplify interrupt mapping Lothar Rubusch
2025-06-11 15:20 ` Andy Shevchenko
2025-06-10 21:59 ` [PATCH v9 05/11] iio: accel: adxl345: simplify reading the FIFO Lothar Rubusch
2025-06-14 13:47 ` Jonathan Cameron
2025-06-15 22:14 ` Lothar Rubusch
2025-06-21 16:58 ` Jonathan Cameron
2025-06-10 21:59 ` [PATCH v9 06/11] iio: accel: adxl345: replace magic numbers by unit expressions Lothar Rubusch
2025-06-14 13:49 ` Jonathan Cameron
2025-06-10 21:59 ` [PATCH v9 07/11] iio: accel: adxl345: add activity event feature Lothar Rubusch
2025-06-12 11:51 ` Andy Shevchenko
2025-06-21 18:06 ` Lothar Rubusch
2025-06-21 19:55 ` Andy Shevchenko
2025-06-10 21:59 ` [PATCH v9 08/11] iio: accel: adxl345: add inactivity feature Lothar Rubusch
2025-06-12 12:15 ` Andy Shevchenko
2025-06-14 13:55 ` Jonathan Cameron
2025-06-14 19:02 ` Andy Shevchenko
2025-06-21 18:53 ` Lothar Rubusch
2025-06-21 19:24 ` Andy Shevchenko
2025-06-21 19:28 ` Andy Shevchenko
2025-06-14 14:00 ` Jonathan Cameron
2025-06-10 21:59 ` [PATCH v9 09/11] iio: accel: adxl345: add coupling detection for activity/inactivity Lothar Rubusch
2025-06-14 14:04 ` Jonathan Cameron
2025-06-10 21:59 ` [PATCH v9 10/11] iio: accel: adxl345: extend inactivity time for less than 1s Lothar Rubusch
2025-06-14 14:10 ` Jonathan Cameron
2025-06-10 21:59 ` [PATCH v9 11/11] docs: iio: add documentation for adxl345 driver Lothar Rubusch
2025-06-14 14:17 ` Jonathan Cameron [this message]
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=20250614151703.047e83fe@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=corbet@lwn.net \
--cc=dlechner@baylibre.com \
--cc=eraretuya@gmail.com \
--cc=l.rubusch@gmail.com \
--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