]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
iio: imu: st_lsm6dsx: set 10ms as min shub slave timeout
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 1 Nov 2020 16:21:18 +0000 (17:21 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 1 Nov 2020 20:54:15 +0000 (20:54 +0000)
commitfe0b980ffd1dd8b10c09f82385514819ba2a661d
tree5bddc25cce084827292b2c694cc225ef3f317df8
parent271b339236e1c0e6448bc1cafeaedcb529324bf0
iio: imu: st_lsm6dsx: set 10ms as min shub slave timeout

Set 10ms as minimum i2c slave configuration timeout since st_lsm6dsx
relies on accel ODR for i2c master clock and at high sample rates
(e.g. 833Hz or 416Hz) the slave sensor occasionally may need more cycles
than i2c master timeout (2s/833Hz + 1 ~ 3ms) to apply the configuration
resulting in an uncomplete slave configuration and a constant reading
from the i2c slave connected to st_lsm6dsx i2c master.

Fixes: 8f9a5249e3d9 ("iio: imu: st_lsm6dsx: enable 833Hz sample frequency for tagged sensors")
Fixes: c91c1c844ebd ("iio: imu: st_lsm6dsx: add i2c embedded controller support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/a69c8236bf16a1569966815ed71710af2722ed7d.1604247274.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c