diff options
| author | Stepan Ionichev <sozdayvek@gmail.com> | 2026-05-11 09:40:20 +0300 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-05-16 13:48:38 +0300 |
| commit | 088fcb9b567f8723074ad9eb1bf5cb46f8a0096b (patch) | |
| tree | 09998dbb295cd2e55fe759c286cb87b04a930a51 /scripts/Makefile.thinlto | |
| parent | 8320c77e67382d5d55d77043a5f60a867d408a2b (diff) | |
| download | linux-088fcb9b567f8723074ad9eb1bf5cb46f8a0096b.tar.xz | |
iio: gyro: bmg160: wait full startup time after mode change at probe
bmg160_chip_init() calls bmg160_set_mode(BMG160_MODE_NORMAL) and
then waits only 500-1000 us. Per the BMG160 datasheet
(BST-BMG160-DS000-07 Rev. 1.0, May 2013), the start-up and wake-up
times (tsu, twusm) are 30 ms.
The same file already waits BMG160_MAX_STARTUP_TIME_MS (80 ms)
in bmg160_runtime_resume() after the same set_mode(NORMAL)
operation. The 500 us value at probe was likely a unit mix-up;
the old comment said "500 ms" while the code used microseconds.
Reuse the same constant via msleep() and add a code comment
explaining the datasheet basis for the wait. Without this,
register writes that follow the mode change can hit the chip
before it is ready.
Fixes: 22b46c45fb9b ("iio:gyro:bmg160 Gyro Sensor driver")
Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
