iio: imu: st_lsm6dsx: wait for settling time in st_lsm6dsx_read_oneshot
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 5 Feb 2022 21:57:42 +0000 (22:57 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 7 Feb 2022 20:45:49 +0000 (20:45 +0000)
commitea85bf906466191b58532bb19f4fbb4591f0a77e
treeea6de5863a45d3716465aee78cc38140eb90c320
parent632fe0bb8c5b9c06ec961f575ee42a6fff5eceeb
iio: imu: st_lsm6dsx: wait for settling time in st_lsm6dsx_read_oneshot

We need to wait for sensor settling time (~ 3/ODR) before reading data
in st_lsm6dsx_read_oneshot routine in order to avoid corrupted samples.

Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver")
Reported-by: Mario Tesi <mario.tesi@st.com>
Tested-by: Mario Tesi <mario.tesi@st.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/b41ebda5535895298716c76d939f9f165fcd2d13.1644098120.git.lorenzo@kernel.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c