From: Andy Shevchenko <andy@kernel.org>
To: Angelo Dureghello <adureghello@baylibre.com>
Cc: Nuno Sa <nuno.sa@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>,
David Lechner <dlechner@baylibre.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v2 2/2] iio: dac: adi-axi-dac: use unique bus free check
Date: Wed, 9 Apr 2025 19:51:48 +0300 [thread overview]
Message-ID: <Z_alpFoaQQUlWdfo@smile.fi.intel.com> (raw)
In-Reply-To: <20250409-ad3552r-fix-bus-read-v2-2-34d3b21e8ca0@baylibre.com>
On Wed, Apr 09, 2025 at 11:16:55AM +0200, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@baylibre.com>
>
> Use a unique function for the bus free check by polling, to reduce
> duplicated code. An error is always thrown in case of timeout.
...
> +static int axi_dac_wait_bus_free(struct axi_dac_state *st)
> +{
> + u32 val;
> + int ret;
> +
> + ret = regmap_read_poll_timeout(st->regmap, AXI_DAC_UI_STATUS_REG, val,
> + FIELD_GET(AXI_DAC_UI_STATUS_IF_BUSY, val) == -1, 10,
> + 100 * KILO);
Same comment as in the previous patch. Okay, it seems more than in the single
case. Perhaps to change that as well here?
> + if (ret == -ETIMEDOUT)
> + dev_err(st->dev, "AXI bus timeout\n");
Why do you need this? The error code will go to the user space at the end? If
yes, it will be enough to have it printed there, no?
> + return ret;
> +}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-04-09 16:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 9:16 [PATCH v2 0/2] iio: dac: adi-axi-dac: fix for wrong bus read Angelo Dureghello
2025-04-09 9:16 ` [PATCH v2 1/2] iio: dac: adi-axi-dac: fix " Angelo Dureghello
2025-04-09 16:49 ` Andy Shevchenko
2025-04-12 13:00 ` Jonathan Cameron
2025-04-12 18:03 ` Andy Shevchenko
2025-04-09 9:16 ` [PATCH v2 2/2] iio: dac: adi-axi-dac: use unique bus free check Angelo Dureghello
2025-04-09 16:51 ` Andy Shevchenko [this message]
2025-04-29 14:32 ` Angelo Dureghello
2025-04-29 22:05 ` Andy Shevchenko
2025-04-30 14:15 ` Angelo Dureghello
2025-04-09 13:57 ` [PATCH v2 0/2] iio: dac: adi-axi-dac: fix for wrong bus read Nuno Sá
2025-04-22 8:41 ` Angelo Dureghello
2025-05-05 11:33 ` Angelo Dureghello
2025-05-05 12:38 ` Jonathan Cameron
2025-05-19 19:03 ` Angelo Dureghello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_alpFoaQQUlWdfo@smile.fi.intel.com \
--to=andy@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=Michael.Hennerich@analog.com \
--cc=adureghello@baylibre.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome