]> git.karo-electronics.de Git - linux-beck.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)
commit01d1f7a99e457952aa51849ed7c1cc4ced7bca4b
treebf2b6b2629fc043833ed126e72b2f15c52acf85e
parente91c3dfcd3ff88218c972cb24f932c4d434bbb09
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