Currently, hid sensor als are using the relative hysteresis.
This patch series add the relative hysteresis for hid sensors.
---
v2:
- (1/3) fix the formatting issue in hid_sensor_read_raw_hyst_rel_value.
- (3/3) add documentation just for light sensor.
Ye Xiang (3):
iio: Add relative sensitivity support
iio: hid-sensor-als: Add relative hysteresis support
iio: Add relative hysteresis in ABI documentation
Documentation/ABI/testing/sysfs-bus-iio | 9 +++
.../hid-sensors/hid-sensor-attributes.c | 74 ++++++++++++++++++-
drivers/iio/industrialio-core.c | 1 +
drivers/iio/light/hid-sensor-als.c | 14 +++-
include/linux/hid-sensor-hub.h | 5 ++
include/linux/hid-sensor-ids.h | 1 +
include/linux/iio/types.h | 1 +
7 files changed, 99 insertions(+), 6 deletions(-)
--
2.17.1
Add relative hysteresis in ABI documentation for als sensor.
Signed-off-by: Ye Xiang <[email protected]>
---
Documentation/ABI/testing/sysfs-bus-iio | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index d957f5da5c04..0890bd113eea 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -1823,3 +1823,12 @@ Description:
hinge, keyboard, screen. It means the three channels
each correspond respectively to hinge angle, keyboard angle,
and screen angle.
+
+What: /sys/bus/iio/devices/iio:deviceX/in_illuminance_hysteresis_relative
+What: /sys/bus/iio/devices/iio:deviceX/in_intensity_hysteresis_relative
+KernelVersion: 5.12
+Contact: [email protected]
+Description:
+ Specify the percent for light sensor relative to the channel
+ absolute value that a data field should change before an event
+ is generated. Units are a percentage of the prior reading.
--
2.17.1