]> git.baikalelectronics.ru Git - kernel.git/commit
iio: accel: bmc150: reset chip at init time
authorOlof Johansson <olof@lixom.net>
Thu, 25 Aug 2016 16:45:33 +0000 (09:45 -0700)
committerJonathan Cameron <jic23@kernel.org>
Sat, 3 Sep 2016 16:26:14 +0000 (17:26 +0100)
commit0a872cf66e85410b44e17ffbd19a4cfae09da88b
treee1c16632a11450a0c10ea2c7198c68cf1d0ad157
parentdb18ade78abae06b81d67e1a07967a89e4d23701
iio: accel: bmc150: reset chip at init time

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>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/bmc150-accel-core.c