[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240803160350.28b7a25d@jic23-huawei>
Date: Sat, 3 Aug 2024 16:03:50 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Dumitru Ceclan <mitrutzceclan@...il.com>
Cc: Stefan Popa <stefan.popa@...log.com>, Alexandru Tachici
<alexandru.tachici@...log.com>, Jonathan Cameron
<Jonathan.Cameron@...wei.com>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, Dumitru Ceclan <dumitru.ceclan@...log.com>
Subject: Re: [PATCH 1/4] iio: adc: ad7124: fix chip ID mismatch
On Wed, 31 Jul 2024 15:37:22 +0300
Dumitru Ceclan <mitrutzceclan@...il.com> wrote:
> 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: b3af341bbd96 ("iio: adc: Add ad7124 support")
> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@...log.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.
Thanks,
J
> ---
> drivers/iio/adc/ad7124.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
> index e7b1d517d3de..54d4c5597696 100644
> --- a/drivers/iio/adc/ad7124.c
> +++ b/drivers/iio/adc/ad7124.c
> @@ -762,6 +762,7 @@ static int ad7124_soft_reset(struct ad7124_state *st)
> if (ret < 0)
> return ret;
>
> + fsleep(200);
> timeout = 100;
> do {
> ret = ad_sd_read_reg(&st->sd, AD7124_STATUS, 1, &readval);
>
Powered by blists - more mailing lists