iio: imu: inv_mpu6050: add WoM suspend wakeup with low-power mode
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Mon, 11 Mar 2024 16:05:57 +0000 (16:05 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Mar 2024 20:10:13 +0000 (20:10 +0000)
commit305914d018077a125b0541b196ed080804f72106
tree36de72c87d9e11d835b64ff46452cff8c113b7fb
parent5537f653d9be09a591063395c0d9ae97c6a4b23f
iio: imu: inv_mpu6050: add WoM suspend wakeup with low-power mode

Add wakeup from suspend for WoM when enabled and put accel in low-power
mode when suspended. Requires rewriting pwr_mgmt_1 register handling and
factorize out accel LPF settings. Use a low-power rate similar to the chip
sampling rate but always lower for a best match of the sampling rate while
saving power and adjust threshold to follow the required roc value.

Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20240311160557.437337-5-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