]> git.baikalelectronics.ru Git - kernel.git/commit
iio: bmi160: Fix time needed to sleep after command execution
authorMarcin Niestroj <m.niestroj@grinn-global.com>
Thu, 8 Dec 2016 14:22:58 +0000 (15:22 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 30 Dec 2016 10:52:00 +0000 (10:52 +0000)
commit7d65f3e2ededa768499b2f1dc584bab52e3ad3df
treebf2b6b2629fc043833ed126e72b2f15c52acf85e
parent261facd009c079225170b07bd7160afd07391972
iio: bmi160: Fix time needed to sleep after command execution

Datasheet specifies typical and maximum execution times for which CMD
register is occupied after previous command execution. We took these
values as minimum and maximum time for usleep_range() call before making
a new command execution.

To be sure, that the CMD register is no longer occupied we need to wait
*at least* the maximum time specified by datasheet.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/bmi160/bmi160_core.c