OSDN Git Service

iio: accel: bmc150: reset chip at init time
authorOlof Johansson <olof@lixom.net>
Thu, 25 Aug 2016 16:45:33 +0000 (09:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:07:38 +0000 (10:07 +0200)
commit58ddc4433365fa49eaf716fc811fde864d496ab3
tree1c8e8b27f52a9b44253cbf6d60fa5b9e1b17a8a6
parent8f1f9b0ffd8ae8310c5ec80e6e9d6f508946da10
iio: accel: bmc150: reset chip at init time

commit 1c500840934a138bd6b13556c210516e9301fbee upstream.

In at least one known setup, the chip comes up in a state where reading
the chip ID returns garbage unless it's been reset, due to noise on the
wires during system boot.

All supported chips have the same reset method, and based on the
datasheets they all need 1.3 or 1.8ms to recover after reset. So, do
the conservative thing here and always reset the chip.

Signed-off-by: Olof Johansson <olof@lixom.net>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/accel/bmc150-accel-core.c