]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:09:30 +0000 (10:09 +0200)
commit77f34bc737c67242f07a2b68b273aafe1c6b813d
treeff5022837505bb9d6ea767168c9b8f7936143dc0
parentcf6ffb120f37977c4d3efa1a90c50f8e8195ed8d
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