This series addresses ADXL345 driver non-compliance with the IIO ABI
for event thresholds.
Currently, the driver exposes raw values for thresholds (e.g., tap,
activity) without providing the necessary scale factor to convert them
to SI units (m/s^2), as mandated by the ABI.
This series implements `IIO_EV_INFO_SCALE` in the IIO core and applies
it to the ADXL345 driver, ensuring that userspace can correctly
interpret threshold values. It also cleans up existing documentation
errors and typos.
Changes in v3:
- Patch 1: Reverted "axis" -> "axes" change in documentation as it is
used as an adjective (Randy Dunlap).
- Patch 2: Reworded commit message to "Implement support for..." instead
of "missing from..." (David Lechner).
- Patch 4: Simplified documentation table by removing repetitive scale
values from every row. Added explicit table entries for the new
`in_accel_gesture_scale` and `in_accel_mag_scale` attributes instead
(Jonathan Cameron).
- Patch 4: Fixed "inscale" typo in commit message.
Changes in v2:
- Added core infrastructure for IIO_EV_INFO_SCALE.
- Implemented event scaling (0.612915 m/s^2) for ADXL345.
- Fixed technical math/decimal errors in existing documentation.
- Cleaned up grammar and pluralization issues in .rst file.
Taha Ed-Dafili (4):
docs: iio: adxl345: fix typos and grammar
iio: core: Add IIO_EV_INFO_SCALE to event info
iio: accel: adxl345: Implement event scaling for ABI compliance
docs: iio: adxl345: update math and examples for scaling
Documentation/iio/adxl345.rst | 65 +++++++++++++++++++-------------
drivers/iio/accel/adxl345_core.c | 28 +++++++++++---
drivers/iio/industrialio-event.c | 1 +
include/linux/iio/types.h | 1 +
4 files changed, 63 insertions(+), 32 deletions(-)
--
2.47.3