Commit 9aee7a8c authored by Jean-Baptiste Maneyrol's avatar Jean-Baptiste Maneyrol Committed by openeuler-sync-bot
Browse files

iio: imu: inv_icm42600: fix timestamp reset

stable inclusion
from stable-v5.10.183
commit ff864a92d90340742d4f26d63b36bccf72d7238e
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IRR2

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ff864a92d90340742d4f26d63b36bccf72d7238e



--------------------------------

commit bbaae0c7 upstream.

Timestamp reset is not done in the correct place. It must be done
before enabling buffer. The reason is that interrupt timestamping
is always happening when the chip is on, even if the
corresponding sensor is off. When the sensor restarts, timestamp
is wrong if you don't do a reset first.

Fixes: ec74ae9f ("iio: imu: inv_icm42600: add accurate timestamping")
Signed-off-by: default avatarJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230509152202.245444-1-inv.git-commit@tdk.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
(cherry picked from commit e2671a6d)
parent 3de7dab6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment