diff options
author | Cosmin Tanislav <demonsingur@gmail.com> | 2022-02-14 08:38:06 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-02-21 20:33:05 +0100 |
commit | a1a5cfe70cd29a59a9a85290dfe95ed1c8df1193 (patch) | |
tree | a30d310aca35538ebd062844006851c7cf48dc3c /tools | |
parent | dt-bindings: iio: adc: microchip,mcp3201: fix interface type (I2C -> SPI) (diff) | |
download | linux-a1a5cfe70cd29a59a9a85290dfe95ed1c8df1193.tar.xz linux-a1a5cfe70cd29a59a9a85290dfe95ed1c8df1193.zip |
iio: introduce mag_referenced
Some accelerometers that support activity and inactivity
events also support a referenced mode, in which the
gravitational acceleration is taken as a point of
reference before comparing the acceleration to the
specified activity and inactivity magnitude.
For example, in the case of the ADXL367, for activity
detection, the formula is:
abs(acceleration - reference) > magnitude
Add a new event type that makes this behavior clear.
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20220214073810.781016-2-cosmin.tanislav@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/iio/iio_event_monitor.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index b94a16ba5c6c..2f4581658859 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -68,6 +68,7 @@ static const char * const iio_ev_type_text[] = { [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive", [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive", [IIO_EV_TYPE_CHANGE] = "change", + [IIO_EV_TYPE_MAG_REFERENCED] = "mag_referenced", }; static const char * const iio_ev_dir_text[] = { |