From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: Nuno Sa <nuno.sa@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
Dragos Bogdan <dragos.bogdan@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Olivier Moysan <olivier.moysan@foss.st.com>
Subject: Re: [PATCH v2 11/11] iio: dac: support the ad9739a RF DAC
Date: Sat, 13 Apr 2024 12:00:07 +0100 [thread overview]
Message-ID: <20240413120007.1f430cb4@jic23-huawei> (raw)
In-Reply-To: <d99653ec9a40a16b088c425d5552de85892564fe.camel@gmail.com>
On Mon, 08 Apr 2024 10:51:43 +0200
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Sat, 2024-04-06 at 17:41 +0100, Jonathan Cameron wrote:
> > On Fri, 5 Apr 2024 17:00:09 +0200
> > Nuno Sa <nuno.sa@analog.com> wrote:
> >
> > > The AD9739A is a 14-bit, 2.5 GSPS high performance RF DACs that are capable
> > > of synthesizing wideband signals from DC up to 3 GHz.
> > >
> > > A dual-port, source synchronous, LVDS interface simplifies the digital
> > > interface with existing FGPA/ASIC technology. On-chip controllers are used
> > > to manage external and internal clock domain variations over temperature to
> > > ensure reliable data transfer from the host to the DAC core.
> > >
> > > Co-developed-by: Dragos Bogdan <dragos.bogdan@analog.com>
> > > Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
> > > Signed-off-by: Nuno Sa <nuno.sa@analog.com>
> >
> > The only thing I really have remaining questions on is the choice
> > of chan_spec with altvoltage and voltage channels. Why does that
> > split make sense? It's odd enough that some comments in the code would
> > be a good thing to add.
> >
> > Jonathan
> >
> > > new file mode 100644
> > > index 000000000000..9b91d66f826c
> > > --- /dev/null
> > > +++ b/drivers/iio/dac/ad9739a.c
> > > @@ -0,0 +1,454 @@
> >
> > > +
> > > +static struct iio_chan_spec ad9739a_channels[] = {
> > > + {
> > > + .type = IIO_ALTVOLTAGE,
> >
> > So this looks a little unusual. Perhaps some comments on why it
> > is appropriate to have this channel.
> >
> > In reality there is only one channel I think?
>
> Yeah, I had this same discussion internally and was also thinking in having one
> channel (just ALTVOLTAGE). I ended up doing it as we have done it internally so
> far. The reasoning is that we have two sources of data:
>
> ALTVOLTAGE: It's the internally continuous wave the backend can generate. That
> is in fact alternate voltage.
>
> VOLTAGE: Is kind of what I call external source where we assume is just typical
> DAC data and that typically is VOLTAGE (but for a dac like this, I think it may
> very well be, if not most of the time, also alternate - the thing is, we can't
> know for sure as we should be able to have both)
>
Ok. That makes some sense. These are sort of different channels even if they
come out of the same physical pin and the phase etc definitions only make sense
for the DDS case.
The operating mode being tied to only the VOLTAGE channel is a little odd but
I suppose it works if we think of it as
DDS altvotage ----inputto----\
MUX --> voltage channel. --> pin.
DAC data ----input to---/
I we really wanted to make this complex, we'd use an actual IIO Mux for that
but that is going to lead to a more complex driver for what is a bit of a special
case so I don't think we need to do so.
Jonathan
> - Nuno Sá
>
next prev parent reply other threads:[~2024-04-13 11:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 14:59 [PATCH v2 00/11] iio: dac: support IIO backends on the output direction Nuno Sa
2024-04-05 14:59 ` [PATCH v2 01/11] iio: buffer-dma: add iio_dmaengine_buffer_setup() Nuno Sa
2024-04-05 15:00 ` [PATCH v2 02/11] iio: buffer-dma: Rename iio_dma_buffer_data_available() Nuno Sa
2024-04-05 15:00 ` [PATCH v2 03/11] iio: buffer-dma: Enable buffer write support Nuno Sa
2024-04-06 16:23 ` Jonathan Cameron
2024-04-08 8:42 ` Nuno Sá
2024-04-05 15:00 ` [PATCH v2 04/11] iio: buffer-dmaengine: Support specifying buffer direction Nuno Sa
2024-04-05 15:00 ` [PATCH v2 05/11] iio: buffer-dmaengine: Enable write support Nuno Sa
2024-04-05 15:00 ` [PATCH v2 06/11] dt-bindings: iio: dac: add docs for AXI DAC IP Nuno Sa
2024-04-10 17:33 ` Rob Herring
2024-04-05 15:00 ` [PATCH v2 07/11] dt-bindings: iio: dac: add docs for AD9739A Nuno Sa
2024-04-10 17:33 ` Rob Herring
2024-04-05 15:00 ` [PATCH v2 08/11] iio: core: add get_iio_backend() callback Nuno Sa
2024-04-05 15:00 ` [PATCH v2 09/11] iio: backend: add new functionality Nuno Sa
2024-04-06 16:32 ` Jonathan Cameron
2024-04-08 8:41 ` Nuno Sá
2024-04-05 15:00 ` [PATCH v2 10/11] iio: dac: add support for AXI DAC IP core Nuno Sa
2024-04-05 15:00 ` [PATCH v2 11/11] iio: dac: support the ad9739a RF DAC Nuno Sa
2024-04-06 16:41 ` Jonathan Cameron
2024-04-08 8:51 ` Nuno Sá
2024-04-13 11:00 ` Jonathan Cameron [this message]
2024-04-15 12:28 ` Nuno Sá
2024-04-06 16:19 ` [PATCH v2 00/11] iio: dac: support IIO backends on the output direction Jonathan Cameron
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=20240413120007.1f430cb4@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dragos.bogdan@analog.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=noname.nuno@gmail.com \
--cc=nuno.sa@analog.com \
--cc=olivier.moysan@foss.st.com \
--cc=robh@kernel.org \
/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