linux-yocto/drivers/iio/common
Jean-Baptiste Maneyrol d11f14a791 iio: invensense: fix multiple odr switch when FIFO is off
commit ef5f5e7b6f upstream.

When multiple ODR switch happens during FIFO off, the change could
not be taken into account if you get back to previous FIFO on value.
For example, if you run sensor buffer at 50Hz, stop, change to
200Hz, then back to 50Hz and restart buffer, data will be timestamped
at 200Hz. This due to testing against mult and not new_mult.

To prevent this, let's just run apply_odr automatically when FIFO is
off. It will also simplify driver code.

Update inv_mpu6050 and inv_icm42600 to delete now useless apply_odr.

Fixes: 95444b9eeb ("iio: invensense: fix odr switching to same value")
Cc: stable@vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://patch.msgid.link/20241021-invn-inv-sensors-timestamp-fix-switch-fifo-off-v2-1-39ffd43edcc4@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-14 20:00:21 +01:00
..
cros_ec_sensors
hid-sensors iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() 2024-10-22 15:46:29 +02:00
inv_sensors iio: invensense: fix multiple odr switch when FIFO is off 2024-12-14 20:00:21 +01:00
ms_sensors
scmi_sensors
ssp_sensors
st_sensors
Kconfig
Makefile