Documentation/iio/adxl345.rst | 104 +++++++++++++++++----------------- 1 file changed, 52 insertions(+), 52 deletions(-)
Clean up the ADXL345 documentation to improve technical accuracy
and readability:
- Fix "latent" to "latency" in double tap descriptions.
- Correct the threshold unit from "g/LSB" to "mg/LSB"
to match the datasheet.
- Standardize "axis" to "axes" for plural references.
- Change "generic purpose" to "general purpose".
- Fix minor subject-verb agreement and punctuation errors.
Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com>
---
Documentation/iio/adxl345.rst | 104 +++++++++++++++++-----------------
1 file changed, 52 insertions(+), 52 deletions(-)
diff --git a/Documentation/iio/adxl345.rst b/Documentation/iio/adxl345.rst
index bb19d64f67c3..020b512cdb74 100644
--- a/Documentation/iio/adxl345.rst
+++ b/Documentation/iio/adxl345.rst
@@ -12,16 +12,16 @@ This driver supports Analog Device's ADXL345/375 on SPI/I2C bus.
* `ADXL345 <https://www.analog.com/ADXL345>`_
* `ADXL375 <https://www.analog.com/ADXL375>`_
-The ADXL345 is a generic purpose low power, 3-axis accelerometer with selectable
+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.
2. Device Attributes
====================
-Each IIO device, has a device folder under ``/sys/bus/iio/devices/iio:deviceX``,
+Each IIO device has a device folder under ``/sys/bus/iio/devices/iio:deviceX``,
where X is the IIO index of the device. Under these folders reside a set of
device files, depending on the characteristics and features of the hardware
-device in questions. These files are consistently generalized and documented in
+device in question. These files are consistently generalized and documented in
the IIO ABI documentation.
The following table shows the ADXL345 related device files, found in the
@@ -42,7 +42,7 @@ specific device folder path ``/sys/bus/iio/devices/iio:deviceX``.
+-------------------------------------------+----------------------------------------------------------+
| in_accel_x_raw | Raw X-axis accelerometer channel value. |
+-------------------------------------------+----------------------------------------------------------+
-| in_accel_y_calibbias | y-axis acceleration offset correction |
+| in_accel_y_calibbias | Y-axis acceleration offset correction |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_y_raw | Raw Y-axis accelerometer channel value. |
+-------------------------------------------+----------------------------------------------------------+
@@ -68,7 +68,7 @@ present, simply assume its value is 0.
+-------------------------------------+---------------------------+
| Channel type | Measurement unit |
+-------------------------------------+---------------------------+
-| Acceleration on X, Y, and Z axis | Meters per second squared |
+| Acceleration on X, Y, and Z axes | Meters per second squared |
+-------------------------------------+---------------------------+
Sensor Events
@@ -78,8 +78,8 @@ Specific IIO events are triggered by their corresponding interrupts. The sensor
driver supports either none or a single active interrupt (INT) line, selectable
from the two available options: INT1 or INT2. The active INT line should be
specified in the device tree. If no INT line is configured, the sensor defaults
-to FIFO bypass mode, where event detection is disabled and only X, Y, and Z axis
-measurements are available.
+to FIFO bypass mode, where event detection is disabled and only individual
+X, Y, and Z axes measurements are available.
The table below lists the ADXL345-related device files located in the
device-specific path: ``/sys/bus/iio/devices/iio:deviceX/events``.
@@ -87,45 +87,45 @@ Note that activity and inactivity detection are DC-coupled by default;
therefore, only the AC-coupled activity and inactivity events are explicitly
listed.
-+---------------------------------------------+---------------------------------------------+
-| 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 |
-+---------------------------------------------+---------------------------------------------+
++---------------------------------------------+------------------------------------------------+
+| Event handle | Description |
++---------------------------------------------+------------------------------------------------+
+| in_accel_gesture_doubletap_en | Enable double tap detection on all axes |
++---------------------------------------------+------------------------------------------------+
+| in_accel_gesture_doubletap_reset_timeout | Double tap window in [us] |
++---------------------------------------------+------------------------------------------------+
+| in_accel_gesture_doubletap_tap2_min_delay | Double tap latency in [us] |
++---------------------------------------------+------------------------------------------------+
+| in_accel_gesture_singletap_timeout | Single tap duration in [us] |
++---------------------------------------------+------------------------------------------------+
+| in_accel_gesture_singletap_value | Single tap threshold value in 62.5 mg/LSB |
++---------------------------------------------+------------------------------------------------+
+| in_accel_mag_falling_period | Inactivity time in seconds |
++---------------------------------------------+------------------------------------------------+
+| in_accel_mag_falling_value | Inactivity threshold value in 62.5 mg/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 mg/LSB |
++---------------------------------------------+------------------------------------------------+
+| in_accel_mag_adaptive_rising_value | AC coupled activity threshold in 62.5 mg/LSB |
++---------------------------------------------+------------------------------------------------+
+| in_accel_mag_rising_en | Enable activity detection on X axis |
++---------------------------------------------+------------------------------------------------+
+| in_accel_mag_rising_value | Activity threshold value in 62.5 mg/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 axes |
++---------------------------------------------+------------------------------------------------+
+| in_accel_x&y&z_mag_adaptive_falling_en | Enable AC coupled inactivity on all axes |
++---------------------------------------------+------------------------------------------------+
+| 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 |
++---------------------------------------------+------------------------------------------------+
Please refer to the sensor's datasheet for a detailed description of this
functionality.
@@ -133,14 +133,14 @@ functionality.
Manually setting the **ODR** will cause the driver to estimate default values
for inactivity detection timing, where higher ODR values correspond to longer
default wait times, and lower ODR values to shorter ones. If these defaults do
-not meet your application’s needs, you can explicitly configure the inactivity
+not meet your application's needs, you can explicitly configure the inactivity
wait time. Setting this value to 0 will revert to the default behavior.
When changing the **g range** configuration, the driver attempts to estimate
appropriate activity and inactivity thresholds by scaling the default values
based on the ratio of the previous range to the new one. The resulting threshold
will never be zero and will always fall between 1 and 255, corresponding to up
-to 62.5 g/LSB as specified in the datasheet. However, you can override these
+to 62.5 mg/LSB as specified in the datasheet. However, you can override these
estimated thresholds by setting explicit values.
When **activity** and **inactivity** events are enabled, the driver
@@ -148,7 +148,7 @@ automatically manages hysteresis behavior by setting the **link** and
**auto-sleep** bits. The link bit connects the activity and inactivity
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.
+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
@@ -312,10 +312,10 @@ Configure one or several events:
root:/sys/bus/iio/devices/iio:device0> echo 24 > ./buffer0/length
- ## AC coupled activity, threshold [62.5/LSB]
+ ## AC coupled activity, threshold [62.5 mg/LSB]
root:/sys/bus/iio/devices/iio:device0> echo 6 > ./events/in_accel_mag_adaptive_rising_value
- ## AC coupled inactivity, threshold, [62.5/LSB]
+ ## AC coupled inactivity, threshold, [62.5 mg/LSB]
root:/sys/bus/iio/devices/iio:device0> echo 4 > ./events/in_accel_mag_adaptive_falling_value
## AC coupled inactivity, time [s]
@@ -330,7 +330,7 @@ Configure one or several events:
## doubletap, window [us]
root:/sys/bus/iio/devices/iio:device0> echo 0.025 > ./events/in_accel_gesture_doubletap_reset_timeout
- ## doubletap, latent [us]
+ ## doubletap, latency [us]
root:/sys/bus/iio/devices/iio:device0> echo 0.025 > ./events/in_accel_gesture_doubletap_tap2_min_delay
## AC coupled activity, enable
--
2.47.3
On Tue, 27 Jan 2026 12:34:51 -0500 Taha Ed-Dafili <0rayn.dev@gmail.com> wrote: > Clean up the ADXL345 documentation to improve technical accuracy > and readability: > - Fix "latent" to "latency" in double tap descriptions. > - Correct the threshold unit from "g/LSB" to "mg/LSB" > to match the datasheet. > - Standardize "axis" to "axes" for plural references. > - Change "generic purpose" to "general purpose". > - Fix minor subject-verb agreement and punctuation errors. > > Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com> Hi Taha, Thanks for looking at this. Unfortunately you are the victim of making people read it again and spot other issues :( Not sure we can easily answer them but I have some concerns having looked at this doc again. Seems at minimum the scaling presented by the driver is wrong. Also the listing in this file for in_accel_scale_available is incorrect as well. > ++---------------------------------------------+------------------------------------------------+ > +| Event handle | Description | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_doubletap_en | Enable double tap detection on all axes | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_doubletap_reset_timeout | Double tap window in [us] | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_doubletap_tap2_min_delay | Double tap latency in [us] | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_singletap_timeout | Single tap duration in [us] | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_singletap_value | Single tap threshold value in 62.5 mg/LSB | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_falling_period | Inactivity time in seconds | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_falling_value | Inactivity threshold value in 62.5 mg/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 mg/LSB | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_adaptive_rising_value | AC coupled activity threshold in 62.5 mg/LSB | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_rising_en | Enable activity detection on X axis | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_rising_value | Activity threshold value in 62.5 mg/LSB | To be compliant with the ABI these should be in whatever is provided by in_accel_scale which according to elsewhere in this doc is any of 0.478899 0.957798 1.915595 3.831190 which are in m/s^2 / LSB None of those look like they are 62.5 mg Given there is no other way of establishing scale, if the thresholds really don't change their scaling with the sensor scale (which would be unusual) then we'd need to compensate the values in these attributes so that they are still value * _scale ends up in m/s^2. Those numbers for in_accel_scale are also wrong. They should be as per the comment in the driver 0.004789, 0.009578, 0.019156 and 0.038312 (so please fix that whilst you are here - probably in a separate patch as it's a fix rather than tidying up. As to what to do about the units. Firstly, express them all in m/s^2 / LSB so we can more easily spot the miss match. Secondly looks like the driver needs a fix to have the right scaling for these and that runs the risk of causing problems for anyone using it. We do have a fairly rarely used ABI option of adding ../events/in_accel_scale (see Documentation/ABI/testing/sysfs-bus-iio) which allows us to indicate a different scale factor from the main channel scaling. That is probably the best approach here. That would then reflect the scale in m/s^2 for each LSB which correpsonds to this 62.5 mg/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 axes | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_x&y&z_mag_adaptive_falling_en | Enable AC coupled inactivity on all axes | > ++---------------------------------------------+------------------------------------------------+ > +| 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 | > ++---------------------------------------------+------------------------------------------------+
Hi Jonathan,
An audit of adxl345_core.c confirms the documentation scale factor of 0.478899
is incorrect. The driver's { 0, 4789 } correctly represents 0.004789 m/s^2
per LSB for the 2g range.
I'll prepare a v2 series to reconcile the driver and documentation
with the IIO ABI. This will include implementing in_accel_scale for events
to resolve the threshold unit inconsistencies.
I will send the update once I have implemented
and compile-tested the changes.
Best regards, Taha
On 1/27/26 9:34 AM, Taha Ed-Dafili wrote: > Clean up the ADXL345 documentation to improve technical accuracy > and readability: > - Fix "latent" to "latency" in double tap descriptions. > - Correct the threshold unit from "g/LSB" to "mg/LSB" > to match the datasheet. > - Standardize "axis" to "axes" for plural references. > - Change "generic purpose" to "general purpose". > - Fix minor subject-verb agreement and punctuation errors. > > Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Thanks. > --- > Documentation/iio/adxl345.rst | 104 +++++++++++++++++----------------- > 1 file changed, 52 insertions(+), 52 deletions(-) > > diff --git a/Documentation/iio/adxl345.rst b/Documentation/iio/adxl345.rst > index bb19d64f67c3..020b512cdb74 100644 > --- a/Documentation/iio/adxl345.rst > +++ b/Documentation/iio/adxl345.rst > @@ -12,16 +12,16 @@ This driver supports Analog Device's ADXL345/375 on SPI/I2C bus. > * `ADXL345 <https://www.analog.com/ADXL345>`_ > * `ADXL375 <https://www.analog.com/ADXL375>`_ > > -The ADXL345 is a generic purpose low power, 3-axis accelerometer with selectable > +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. > > 2. Device Attributes > ==================== > > -Each IIO device, has a device folder under ``/sys/bus/iio/devices/iio:deviceX``, > +Each IIO device has a device folder under ``/sys/bus/iio/devices/iio:deviceX``, > where X is the IIO index of the device. Under these folders reside a set of > device files, depending on the characteristics and features of the hardware > -device in questions. These files are consistently generalized and documented in > +device in question. These files are consistently generalized and documented in > the IIO ABI documentation. > > The following table shows the ADXL345 related device files, found in the > @@ -42,7 +42,7 @@ specific device folder path ``/sys/bus/iio/devices/iio:deviceX``. > +-------------------------------------------+----------------------------------------------------------+ > | in_accel_x_raw | Raw X-axis accelerometer channel value. | > +-------------------------------------------+----------------------------------------------------------+ > -| in_accel_y_calibbias | y-axis acceleration offset correction | > +| in_accel_y_calibbias | Y-axis acceleration offset correction | > +-------------------------------------------+----------------------------------------------------------+ > | in_accel_y_raw | Raw Y-axis accelerometer channel value. | > +-------------------------------------------+----------------------------------------------------------+ > @@ -68,7 +68,7 @@ present, simply assume its value is 0. > +-------------------------------------+---------------------------+ > | Channel type | Measurement unit | > +-------------------------------------+---------------------------+ > -| Acceleration on X, Y, and Z axis | Meters per second squared | > +| Acceleration on X, Y, and Z axes | Meters per second squared | > +-------------------------------------+---------------------------+ > > Sensor Events > @@ -78,8 +78,8 @@ Specific IIO events are triggered by their corresponding interrupts. The sensor > driver supports either none or a single active interrupt (INT) line, selectable > from the two available options: INT1 or INT2. The active INT line should be > specified in the device tree. If no INT line is configured, the sensor defaults > -to FIFO bypass mode, where event detection is disabled and only X, Y, and Z axis > -measurements are available. > +to FIFO bypass mode, where event detection is disabled and only individual > +X, Y, and Z axes measurements are available. > > The table below lists the ADXL345-related device files located in the > device-specific path: ``/sys/bus/iio/devices/iio:deviceX/events``. > @@ -87,45 +87,45 @@ Note that activity and inactivity detection are DC-coupled by default; > therefore, only the AC-coupled activity and inactivity events are explicitly > listed. > > -+---------------------------------------------+---------------------------------------------+ > -| 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 | > -+---------------------------------------------+---------------------------------------------+ > ++---------------------------------------------+------------------------------------------------+ > +| Event handle | Description | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_doubletap_en | Enable double tap detection on all axes | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_doubletap_reset_timeout | Double tap window in [us] | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_doubletap_tap2_min_delay | Double tap latency in [us] | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_singletap_timeout | Single tap duration in [us] | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_gesture_singletap_value | Single tap threshold value in 62.5 mg/LSB | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_falling_period | Inactivity time in seconds | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_falling_value | Inactivity threshold value in 62.5 mg/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 mg/LSB | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_adaptive_rising_value | AC coupled activity threshold in 62.5 mg/LSB | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_rising_en | Enable activity detection on X axis | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_mag_rising_value | Activity threshold value in 62.5 mg/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 axes | > ++---------------------------------------------+------------------------------------------------+ > +| in_accel_x&y&z_mag_adaptive_falling_en | Enable AC coupled inactivity on all axes | > ++---------------------------------------------+------------------------------------------------+ > +| 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 | > ++---------------------------------------------+------------------------------------------------+ > > Please refer to the sensor's datasheet for a detailed description of this > functionality. > @@ -133,14 +133,14 @@ functionality. > Manually setting the **ODR** will cause the driver to estimate default values > for inactivity detection timing, where higher ODR values correspond to longer > default wait times, and lower ODR values to shorter ones. If these defaults do > -not meet your application’s needs, you can explicitly configure the inactivity > +not meet your application's needs, you can explicitly configure the inactivity > wait time. Setting this value to 0 will revert to the default behavior. > > When changing the **g range** configuration, the driver attempts to estimate > appropriate activity and inactivity thresholds by scaling the default values > based on the ratio of the previous range to the new one. The resulting threshold > will never be zero and will always fall between 1 and 255, corresponding to up > -to 62.5 g/LSB as specified in the datasheet. However, you can override these > +to 62.5 mg/LSB as specified in the datasheet. However, you can override these > estimated thresholds by setting explicit values. > > When **activity** and **inactivity** events are enabled, the driver > @@ -148,7 +148,7 @@ automatically manages hysteresis behavior by setting the **link** and > **auto-sleep** bits. The link bit connects the activity and inactivity > 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. > +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 > @@ -312,10 +312,10 @@ Configure one or several events: > > root:/sys/bus/iio/devices/iio:device0> echo 24 > ./buffer0/length > > - ## AC coupled activity, threshold [62.5/LSB] > + ## AC coupled activity, threshold [62.5 mg/LSB] > root:/sys/bus/iio/devices/iio:device0> echo 6 > ./events/in_accel_mag_adaptive_rising_value > > - ## AC coupled inactivity, threshold, [62.5/LSB] > + ## AC coupled inactivity, threshold, [62.5 mg/LSB] > root:/sys/bus/iio/devices/iio:device0> echo 4 > ./events/in_accel_mag_adaptive_falling_value > > ## AC coupled inactivity, time [s] > @@ -330,7 +330,7 @@ Configure one or several events: > ## doubletap, window [us] > root:/sys/bus/iio/devices/iio:device0> echo 0.025 > ./events/in_accel_gesture_doubletap_reset_timeout > > - ## doubletap, latent [us] > + ## doubletap, latency [us] > root:/sys/bus/iio/devices/iio:device0> echo 0.025 > ./events/in_accel_gesture_doubletap_tap2_min_delay > > ## AC coupled activity, enable -- ~Randy
© 2016 - 2026 Red Hat, Inc.