iio: imu: inv_mpu6050: add WoM (Wake-on-Motion) sensor
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Mon, 11 Mar 2024 16:05:54 +0000 (16:05 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Mar 2024 20:10:13 +0000 (20:10 +0000)
commit0b70c0844955a7d0fd24048e53fdd62e94f4e0e9
tree2e7f8f768004268a33cda1277e0c5473d6808ef0
parente264b086f40a3d74a405227db8b624b4b15906e0
iio: imu: inv_mpu6050: add WoM (Wake-on-Motion) sensor

WoM is a threshold test on accel value comparing actual sample with
previous one. It maps best to roc rising event.

Add support of a new WOM sensor and functions for handling the associated
roc_rising event. The event value is in SI units. Ensure WOM is stopped and
restarted at suspend-resume, handle usage with buffer data ready interrupt,
and handle change in sampling rate impacting already set roc value.

Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20240311160557.437337-2-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c