linux/drivers/iio/imu
Jean-Baptiste Maneyrol c11a067532 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>
History 2024-12-09 10:41:09 +01:00
..
bmi160 iio: imu: bmi160_core: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
bmi323 IIO: 1st set of fixes for the 6.12 cycle. 2024-10-13 17:23:47 +02:00
bno055 iio: imu: bno055: make use of iio_get_masklength() 2024-08-03 10:13:40 +01:00
inv_icm42600 iio: invensense: fix multiple odr switch when FIFO is off 2024-12-09 10:41:09 +01:00
inv_mpu6050 iio: invensense: fix multiple odr switch when FIFO is off 2024-12-09 10:41:09 +01:00
st_lsm6dsx iio: imu: st_lsm6dsx: Remove useless dev_fwnode() calls 2024-09-03 18:49:44 +01:00
st_lsm9ds0 iio: st_sensors: lsm9ds0: Use common style for terminator in ID tables 2024-02-19 19:32:22 +00:00
adis.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
adis16400.c iio: imu: adis16400: drop ifdef around CONFIG_DEBUG_FS 2024-08-10 11:39:57 +01:00
adis16460.c iio: imu: adis16460: drop ifdef around CONFIG_DEBUG_FS 2024-08-10 11:39:57 +01:00
adis16475.c iio: imu: adis16475: drop ifdef around CONFIG_DEBUG_FS 2024-08-10 11:39:57 +01:00
adis16480.c iio: imu: adis16480: drop ifdef around CONFIG_DEBUG_FS 2024-08-10 11:39:57 +01:00
adis_buffer.c iio: imu: adis: move to the cleanup magic 2024-06-25 21:04:49 +01:00
adis_trigger.c iio: imu: adis_trigger: Allow level interrupts for FIFO readings 2024-06-04 19:53:09 +01:00
fxos8700.h iio: imu: Add support for the FXOS8700 IMU 2019-10-22 10:24:50 +01:00
fxos8700_core.c iio: imu: fxos8700: fix MAGN sensor scale and unit 2023-01-21 18:15:19 +00:00
fxos8700_i2c.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
fxos8700_spi.c iio: imu: fxos8700: Drop ACPI_PTR() usage 2024-01-23 22:06:55 +00:00
Kconfig drivers: iio: imu: Add support for ADIS16501 2024-06-04 19:53:09 +01:00
kmx61.c iio: imu: kmx61: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
Makefile iio: imu: Add driver for BMI323 IMU 2023-11-16 19:10:25 +00:00