Commit d0d3edb5 authored by Dumitru Ceclan's avatar Dumitru Ceclan Committed by Greg Kroah-Hartman
Browse files

iio: adc: ad7124: fix chip ID mismatch



commit 96f9ab0d upstream.

The ad7124_soft_reset() function has the assumption that the chip will
assert the "power-on reset" bit in the STATUS register after a software
reset without any delay. The POR bit =0 is used to check if the chip
initialization is done.

A chip ID mismatch probe error appears intermittently when the probe
continues too soon and the ID register does not contain the expected
value.

Fix by adding a 200us delay after the software reset command is issued.

Fixes: b3af341b ("iio: adc: Add ad7124 support")
Signed-off-by: default avatarDumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240731-ad7124-fix-v1-1-46a76aa4b9be@analog.com


Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1719ebc8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment