]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: imu: inv_icm42600: add support of accel low-power mode
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Wed, 5 Jun 2024 19:59:49 +0000 (19:59 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 13 Jun 2024 18:19:26 +0000 (19:19 +0100)
commit07d4d0bb4a8ddcc463ed599b22f510d5926c2495
tree67da7c60ba88270ba72de8a4f22cd8852c6ac76e
parent3d4d033a8d554e533d87ddf315b1e0d137e6ade8
iio: imu: inv_icm42600: add support of accel low-power mode

Add ODRs accessible only in low-power mode. Switch automatically to
low-power or low-noise depending on the ODR set.

Add channel attributes "power_mode" and "power_mode_available" for
setting the power mode to use (low-noise or low-power) for ODRs
supporting both mode. Reading "power_mode" when the sensor is on
will return the actual mode and not the requested one. It will be
different when using ODRs not supported by the requested mode.

Use low-power mode by default.

Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20240605195949.766677-3-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_icm42600/inv_icm42600.h
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c