* [PATCH] iio: dac: adi-axi-dac: fix swapped arguments in axi_dac_set_sample_rate()
@ 2026-11-13 14:47 Nuno Sá
2026-11-14 1:12 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Nuno Sá @ 2026-11-13 14:47 UTC (permalink / raw)
To: linux-iio, linux-kernel
Cc: Michael Hennerich, Jonathan Cameron, David Lechner,
Andy Shevchenko, linux
When the interface sample rate changes, the DDS frequencies of both
tones are read back and reprogrammed so they are preserved against the
new rate. However, the tone index and the frequency were passed in the
wrong order to __axi_dac_frequency_set().
Pass the arguments in the order the function expects.
Fixes: 4e3949a192e4 ("iio: dac: add support for AXI DAC IP core")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
AI was used to generate the commit message which I looked at and removed
the extra verbosity.
---
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 f4f3bc67c68e..1e2f7f27292d 100644
--- a/drivers/iio/dac/adi-axi-dac.c
+++ b/drivers/iio/dac/adi-axi-dac.c
@@ -596,7 +596,7 @@ static int axi_dac_set_sample_rate(struct iio_backend *back, unsigned int chan,
if (ret)
return ret;
- ret = __axi_dac_frequency_set(st, chan, sample_rate, tone, freq);
+ ret = __axi_dac_frequency_set(st, chan, sample_rate, freq, tone);
if (ret)
return ret;
}
---
base-commit: b70566610b48ba49dec636019da4d696db64b085
change-id: 20261113-iio-fix-axi-dac-b7b401cb06d4
--
Thanks!
- Nuno Sá
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: dac: adi-axi-dac: fix swapped arguments in axi_dac_set_sample_rate()
2026-11-13 14:47 [PATCH] iio: dac: adi-axi-dac: fix swapped arguments in axi_dac_set_sample_rate() Nuno Sá
@ 2026-11-14 1:12 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2026-11-14 1:12 UTC (permalink / raw)
To: Nuno Sá
Cc: linux-iio, linux-kernel, Michael Hennerich, David Lechner,
Andy Shevchenko, linux
On Fri, 13 Nov 2026 14:47:51 +0000
Nuno Sá <nuno.sa@analog.com> wrote:
> When the interface sample rate changes, the DDS frequencies of both
> tones are read back and reprogrammed so they are preserved against the
> new rate. However, the tone index and the frequency were passed in the
> wrong order to __axi_dac_frequency_set().
>
> Pass the arguments in the order the function expects.
>
> Fixes: 4e3949a192e4 ("iio: dac: add support for AXI DAC IP core")
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
ouch. Applied to the fixes-togreg branch of iio.git and marked for stable.
Thanks,
J
> ---
> AI was used to generate the commit message which I looked at and removed
> the extra verbosity.
> ---
> 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 f4f3bc67c68e..1e2f7f27292d 100644
> --- a/drivers/iio/dac/adi-axi-dac.c
> +++ b/drivers/iio/dac/adi-axi-dac.c
> @@ -596,7 +596,7 @@ static int axi_dac_set_sample_rate(struct iio_backend *back, unsigned int chan,
> if (ret)
> return ret;
>
> - ret = __axi_dac_frequency_set(st, chan, sample_rate, tone, freq);
> + ret = __axi_dac_frequency_set(st, chan, sample_rate, freq, tone);
> if (ret)
> return ret;
> }
>
> ---
> base-commit: b70566610b48ba49dec636019da4d696db64b085
> change-id: 20261113-iio-fix-axi-dac-b7b401cb06d4
> --
>
> Thanks!
> - Nuno Sá
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-14 1:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 14:47 [PATCH] iio: dac: adi-axi-dac: fix swapped arguments in axi_dac_set_sample_rate() Nuno Sá
2026-11-14 1:12 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®