4b04266abe
This adds freefall event detection to the supported devices. It adds the in_accel_x&y&z_mag_falling_en iio event attribute, which activates freefall mode. In freefall mode, the current acceleration magnitude (AND combination of all axis values) is compared to the specified threshold. If it falls under the threshold (in_accel_mag_falling_value), the appropriate IIO event code is generated. This is what the sysfs "events" directory for these devices looks like after this change: -rw-r--r-- 4096 Oct 23 08:45 in_accel_mag_falling_period -rw-r--r-- 4096 Oct 23 08:45 in_accel_mag_falling_value -rw-r--r-- 4096 Oct 23 08:45 in_accel_mag_rising_period -rw-r--r-- 4096 Oct 23 08:45 in_accel_mag_rising_value -r--r--r-- 4096 Oct 23 08:45 in_accel_scale -rw-r--r-- 4096 Oct 23 08:45 in_accel_x&y&z_mag_falling_en -rw-r--r-- 4096 Oct 23 08:45 in_accel_x_mag_rising_en -rw-r--r-- 4096 Oct 23 08:45 in_accel_y_mag_rising_en -rw-r--r-- 4096 Oct 23 08:45 in_accel_z_mag_rising_en Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
---|---|---|
.. | ||
accel | ||
adc | ||
amplifiers | ||
buffer | ||
chemical | ||
common | ||
dac | ||
dummy | ||
frequency | ||
gyro | ||
health | ||
humidity | ||
imu | ||
light | ||
magnetometer | ||
orientation | ||
potentiometer | ||
pressure | ||
proximity | ||
temperature | ||
trigger | ||
iio_core_trigger.h | ||
iio_core.h | ||
industrialio-buffer.c | ||
industrialio-configfs.c | ||
industrialio-core.c | ||
industrialio-event.c | ||
industrialio-sw-trigger.c | ||
industrialio-trigger.c | ||
industrialio-triggered-event.c | ||
inkern.c | ||
Kconfig | ||
Makefile |