From: David Lechner <dlechner@baylibre.com>
To: Taha Ed-Dafili <0rayn.dev@gmail.com>, jic23@kernel.org
Cc: me@brighamcampbell.com, skhan@linuxfoundation.org,
linux-kernel-mentees-archive@lists.linuxfoundation.org,
rdunlap@infradead.org, nuno.sa@analog.com, andy@kernel.org,
corbet@lwn.net, lars@metafoo.de, Michael.Hennerich@analog.com,
linux-iio@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] docs: iio: adxl345: update math and examples for scaling
Date: Sun, 1 Feb 2026 13:13:51 -0600 [thread overview]
Message-ID: <8e46ce3c-41b4-4a6c-9b1c-a9ab56814d1a@baylibre.com> (raw)
In-Reply-To: <20260201183320.27023-5-0rayn.dev@gmail.com>
On 2/1/26 12:33 PM, Taha Ed-Dafili wrote:
> Update the documentation to reflect the addition of event scaling
> and correct existing technical errors inscale values.
s/inscale/in scale/
>
> key changes:
> - Fix the 62.5 g/LSB typo to 62.5 mg/LSB and add SI unit conversion.
> - Correct decimal precision of in_accel_scale and
> in_accel_scale_available to match actual SI unit (m/s^2)
> values reported by the driver.
> - Add sysfs example showing how to read and interpret the
> newly implemented event scale factor.
>
> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com>
> ---
> Documentation/iio/adxl345.rst | 41 +++++++++++++++++++++++------------
> 1 file changed, 27 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/iio/adxl345.rst b/Documentation/iio/adxl345.rst
> index 41d209a4dccf..2f51a2a4fbd0 100644
> --- a/Documentation/iio/adxl345.rst
> +++ b/Documentation/iio/adxl345.rst
> @@ -13,7 +13,11 @@ This driver supports Analog Device's ADXL345/375 on SPI/I2C bus.
> * `ADXL375 <https://www.analog.com/ADXL375>`_
>
> The ADXL345 is a general-purpose, low-power, 3-axis accelerometer with selectable
> -measurement ranges. The ADXL345 supports the ±2 g, ±4 g, ±8 g, and ±16 g ranges.
> +measurement ranges. The ADXL345 supports the following ranges:
> +- ±2g (approx. ±19.61 m/s^2)
> +- ±4g (approx. ±39.23 m/s^2)
> +- ±8g (approx. ±78.45 m/s^2)
> +- ±16g (approx. ±156.91 m/s^2)
>
> 2. Device Attributes
> ====================
> @@ -98,23 +102,28 @@ listed.
> +---------------------------------------------+---------------------------------------------+
> | 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_gesture_singletap_value | Single tap threshold value in |
> +| | 0.612915 m/s^2/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_falling_value | Inactivity threshold value in |
> +| | 0.612915 m/s^2/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_falling_value | AC coupled inactivity threshold in |
> +| | 0.612915 m/s^2/LSB |
> +---------------------------------------------+---------------------------------------------+
> -| in_accel_mag_adaptive_rising_value | AC coupled activity threshold in 62.5/LSB |
> +| in_accel_mag_adaptive_rising_value | AC coupled activity threshold in |
> +| | 0.612915 m/s^2/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_mag_rising_value | Activity threshold value in |
> +| | 0.612915 m/s^2/LSB |
> +---------------------------------------------+---------------------------------------------+
> | in_accel_x_gesture_singletap_en | Enable single tap detection on X axis |
> +---------------------------------------------+---------------------------------------------+
Why not also adding the new in_accel_*_scale attributes to the table?
next prev parent reply other threads:[~2026-02-01 19:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-01 18:33 [PATCH v2 0/4] iio: accel: adxl345: Add event scaling and doc fixes Taha Ed-Dafili
2026-02-01 18:33 ` [PATCH v2 1/4] docs: iio: adxl345: fix typos and grammar Taha Ed-Dafili
2026-02-01 19:03 ` Randy Dunlap
2026-02-02 15:30 ` Taha Ed-Dafili
2026-02-01 18:33 ` [PATCH v2 2/4] iio: core: Add IIO_EV_INFO_SCALE to event info Taha Ed-Dafili
2026-02-01 19:06 ` David Lechner
2026-02-02 15:19 ` Taha Ed-Dafili
2026-02-02 15:31 ` David Lechner
2026-02-07 16:18 ` Jonathan Cameron
2026-02-01 18:33 ` [PATCH v2 3/4] iio: accel: adxl345: Implement event scaling for ABI compliance Taha Ed-Dafili
2026-02-01 18:33 ` [PATCH v2 4/4] docs: iio: adxl345: update math and examples for scaling Taha Ed-Dafili
2026-02-01 19:13 ` David Lechner [this message]
2026-02-07 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=8e46ce3c-41b4-4a6c-9b1c-a9ab56814d1a@baylibre.com \
--to=dlechner@baylibre.com \
--cc=0rayn.dev@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=corbet@lwn.net \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel-mentees-archive@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@brighamcampbell.com \
--cc=nuno.sa@analog.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®