]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: imu: inv_mpu6050: fix frequency setting when chip is off
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Mon, 19 Feb 2024 15:47:41 +0000 (15:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:45 +0000 (15:28 +0200)
commit3df5e345d6b4f2392aa4d69b15801d189651b058
treebeb0f3f58cee60dff5c4322fb605a66b9982d272
parentd017ec50fac9bfa7ed51bbc23a9ff0a5ca53e8c4
iio: imu: inv_mpu6050: fix frequency setting when chip is off

commit daec424cc57b33a28f8621eb7ac85f8bd327bd6b upstream.

Track correctly FIFO state and apply ODR change before starting
the chip. Without the fix, you cannot change ODR more than 1 time
when data buffering is off. This restriction on a single pending ODR
change should only apply when the FIFO is on.

Fixes: 111e1abd0045 ("iio: imu: inv_mpu6050: use the common inv_sensors timestamp module")
Cc: stable@vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20240219154741.90601-1-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c