]> git.baikalelectronics.ru Git - kernel.git/commit
iio: imu: st_lsm6dsx: fix waitime for st_lsm6dsx i2c controller
authorLorenzo Bianconi <lorenzo@kernel.org>
Mon, 16 Sep 2019 22:01:29 +0000 (00:01 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 9 Oct 2019 18:11:28 +0000 (19:11 +0100)
commit7cccd6cf7c8f16fe524ed591a0770ce03928f2f9
tree8a89d7c6ab3e1e79742eea97e27face22ce8b3fd
parent8744aa53574c6c31abccb57f256ca3676c587ab2
iio: imu: st_lsm6dsx: fix waitime for st_lsm6dsx i2c controller

i2c controller available in st_lsm6dsx series performs i2c slave
configuration using accel clock as trigger.
st_lsm6dsx_shub_wait_complete routine is used to wait the controller has
carried out the requested configuration. However if the accel sensor is not
enabled we should not use its configured odr to estimate a proper timeout

Fixes: 06e47a49f6b9 ("iio: imu: st_lsm6dsx: add i2c embedded controller support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c