]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
iio: bmg160: reset chip when probing
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Tue, 21 Mar 2017 15:52:14 +0000 (16:52 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:12:02 +0000 (10:12 +0200)
commit829ddbdf98a38c15728e67285a629518327b6503
tree9f9747425e085e9fbe01a2b82cbdb7b05e99d218
parent7c261d187d2ed9a7105a23d3979b43515d7f49a7
iio: bmg160: reset chip when probing

BugLink: http://bugs.launchpad.net/bugs/1682130
commit 4bdc9029685ac03be50b320b29691766d2326c2b upstream.

The gyroscope chip might need to be reset to be used.

Without the chip being reset, the driver stopped at the first
regmap_read (to get the CHIP_ID) and failed to probe.

The datasheet of the gyroscope says that a minimum wait of 30ms after
the reset has to be done.

This patch has been checked on a BMX055 and the datasheet of the BMG160
and the BMI055 give the same reset register and bits.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/iio/gyro/bmg160_core.c