* [PATCH] iio: dac: adi-axi-dac: fix bus free check
@ 2025-05-22 16:47 Angelo Dureghello
2025-05-22 16:54 ` Jonathan Cameron
2025-05-23 16:37 ` Andy Shevchenko
0 siblings, 2 replies; 3+ messages in thread
From: Angelo Dureghello @ 2025-05-22 16:47 UTC (permalink / raw)
To: Nuno Sa, Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Andy Shevchenko
Cc: linux-iio, linux-kernel, Angelo Dureghello
From: Angelo Dureghello <adureghello@baylibre.com>
This patch is intended to fix [1] that looks not yet accepted in any
upstream branch.
Poll function must check for a value equal to 0 (bus free condition).
[1] https://lore.kernel.org/linux-iio/l6vu54ltxd7pydkzl6xbbq55gedumzbsllfxnljyngwcg4c6zd@w6qxgn2vby75/
Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
---
drivers/iio/dac/adi-axi-dac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
index b6cfe07701d47440df478f7b9b4c579434b99a25..a0e546dba3680371e00dc4c8973d4f450c18cf2d 100644
--- a/drivers/iio/dac/adi-axi-dac.c
+++ b/drivers/iio/dac/adi-axi-dac.c
@@ -641,7 +641,7 @@ static int axi_dac_wait_bus_free(struct axi_dac_state *st)
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,
+ FIELD_GET(AXI_DAC_UI_STATUS_IF_BUSY, val) == 0, 10,
100 * KILO);
if (ret == -ETIMEDOUT)
dev_err(st->dev, "AXI bus timeout\n");
---
base-commit: 50b8b618e598468e35551003d7e5cc5db14ee113
change-id: 20250522-iio-dac-adi-axi-dac-fix-bus-read-244fbc07313c
Best regards,
--
Angelo Dureghello <adureghello@baylibre.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: dac: adi-axi-dac: fix bus free check
2025-05-22 16:47 [PATCH] iio: dac: adi-axi-dac: fix bus free check Angelo Dureghello
@ 2025-05-22 16:54 ` Jonathan Cameron
2025-05-23 16:37 ` Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2025-05-22 16:54 UTC (permalink / raw)
To: Angelo Dureghello
Cc: Nuno Sa, Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Andy Shevchenko, linux-iio, linux-kernel
On Thu, 22 May 2025 18:47:31 +0200
Angelo Dureghello <adureghello@baylibre.com> wrote:
> From: Angelo Dureghello <adureghello@baylibre.com>
>
> This patch is intended to fix [1] that looks not yet accepted in any
> upstream branch.
>
> Poll function must check for a value equal to 0 (bus free condition).
>
> [1] https://lore.kernel.org/linux-iio/l6vu54ltxd7pydkzl6xbbq55gedumzbsllfxnljyngwcg4c6zd@w6qxgn2vby75/
>
> Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
Hi Angelo.
That was stalled due to tree shuffling. Given as you
observed it hasn't made it on to any tree yet, would you mind
squashing this in and posting a new version of that patch?
That will probably end up cleaner than me trying to remember to squash the two.
Thanks!
Jonathan
> ---
> drivers/iio/dac/adi-axi-dac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
> index b6cfe07701d47440df478f7b9b4c579434b99a25..a0e546dba3680371e00dc4c8973d4f450c18cf2d 100644
> --- a/drivers/iio/dac/adi-axi-dac.c
> +++ b/drivers/iio/dac/adi-axi-dac.c
> @@ -641,7 +641,7 @@ static int axi_dac_wait_bus_free(struct axi_dac_state *st)
> 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,
> + FIELD_GET(AXI_DAC_UI_STATUS_IF_BUSY, val) == 0, 10,
> 100 * KILO);
> if (ret == -ETIMEDOUT)
> dev_err(st->dev, "AXI bus timeout\n");
>
> ---
> base-commit: 50b8b618e598468e35551003d7e5cc5db14ee113
> change-id: 20250522-iio-dac-adi-axi-dac-fix-bus-read-244fbc07313c
>
> Best regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: dac: adi-axi-dac: fix bus free check
2025-05-22 16:47 [PATCH] iio: dac: adi-axi-dac: fix bus free check Angelo Dureghello
2025-05-22 16:54 ` Jonathan Cameron
@ 2025-05-23 16:37 ` Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2025-05-23 16:37 UTC (permalink / raw)
To: Angelo Dureghello
Cc: Nuno Sa, Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, linux-iio, linux-kernel
On Thu, May 22, 2025 at 06:47:31PM +0200, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@baylibre.com>
>
> This patch is intended to fix [1] that looks not yet accepted in any
> upstream branch.
>
> Poll function must check for a value equal to 0 (bus free condition).
> [1] https://lore.kernel.org/linux-iio/l6vu54ltxd7pydkzl6xbbq55gedumzbsllfxnljyngwcg4c6zd@w6qxgn2vby75/
>
Make these two lines to be a Link tag
Link: https://... [1]
> Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-23 16:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 16:47 [PATCH] iio: dac: adi-axi-dac: fix bus free check Angelo Dureghello
2025-05-22 16:54 ` Jonathan Cameron
2025-05-23 16:37 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox