[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_alFXGBhFxk-h0e@smile.fi.intel.com>
Date: Wed, 9 Apr 2025 19:49:25 +0300
From: Andy Shevchenko <andy@...nel.org>
To: Angelo Dureghello <adureghello@...libre.com>
Cc: Nuno Sa <nuno.sa@...log.com>, Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v2 1/2] iio: dac: adi-axi-dac: fix bus read
On Wed, Apr 09, 2025 at 11:16:54AM +0200, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@...libre.com>
>
> Fix bus read function.
>
> Testing the driver, on a random basis, wrong reads was detected, mainly
> by a wrong DAC chip ID read at first boot.
> Before reading the expected value from the AXI regmap, need always to
> wait for busy flag to be cleared.
...
> + ret = regmap_read_poll_timeout(st->regmap,
> + AXI_DAC_UI_STATUS_REG, ival,
> + FIELD_GET(AXI_DAC_UI_STATUS_IF_BUSY, ival) == 0,
> + 10, 100 * KILO);
It's timeout, we have special constants for that, I believe you wanted to have
USEC_PER_MSEC here.
> + if (ret)
> + return ret;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists