[PATCH v2 3/3] Documentation: ABI: iio: Add event when offset/scale changes

Gwendal Grignou
2020-09-01T03:00:36Z

Some sensors/sensorhubs can calculate drift or hard iron offsets to
apply to raw data to get the true measure data.
These offsets are applied by the user space application.
When these offsets change, events are raised to tell the application
to update the cached offset values.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
Changes since v1:
- Define metadata_en instead of offset/scale_en to limit race
conditions.
Documentation/ABI/testing/sysfs-bus-iio | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index f77aee8886c66..45f456de1621a 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -1735,3 +1735,16 @@ Contact: linux-iio@vger.kernel.org
Description:
Hard Iron bias calculated by the sensor or sensorhub. To be applied by
user space application to the raw data to obtain the geomagnetic field.
+
+What: /sys/.../iio:deviceX/events/in_accel_metadata_change_en
+What: /sys/.../iio:deviceX/events/in_magn_metadata_change_en
+What: /sys/.../iio:deviceX/events/in_anglvel_metadata_change_en
+KernelVersion: x.y
+Contact: linux-iio@vger.kernel.org
+Description:
+ Some sensors internally calculate offset to apply to remove bias (for
+ instance, hard/soft-iron bias for magnetometer, online calibration bias for
+ gyroscope or accelerometer).
+ When the sensor computes a new set of offset values, it generates an
+ event for the userspace application to refresh the offsets to apply to raw
+ data.
--
2.28.0.402.g5ffc5be6b7-goog