]> 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)
commit2041a4c9227206d752cbabf2881c496d5e3711f2
treebf2b6b2629fc043833ed126e72b2f15c52acf85e
parenta61a18d1356e17d37f006b3fa42cbec46a634aa4
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