From: Jonathan Cameron <jic23@kernel.org>
To: Abinash Singh <abinashsinghlalotra@gmail.com>
Cc: gregkh@linuxfoundation.org, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Abinash Singh <abinashlalotra@gmail.com>
Subject: Re: [PATCH] staging: Documentation: dds: replace frequencyY with frequency
Date: Sat, 16 May 2026 12:38:53 +0100 [thread overview]
Message-ID: <20260516123754.16becb25@jic23-huawei> (raw)
In-Reply-To: <CAMV7Lq7NqxO5cpy7zSrawBORWgtEhm2QTTgRtLptV9==yCs+wg@mail.gmail.com>
On Tue, 12 May 2026 22:14:34 +0530
Abinash Singh <abinashsinghlalotra@gmail.com> wrote:
> Hi Jonathan
>
> On Tue, May 12, 2026 at 7:38 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > On Mon, 11 May 2026 22:42:55 +0530
> > Abinash Singh <abinashsinghlalotra@gmail.com> wrote:
> >
> > > From: Abinash Singh <abinashlalotra@gmail.com>
> > >
> > > The documented frequencyY attribute naming is implementation
> > > specific and differs from common IIO sysfs attribute
> > > conventions.
> > >
> > > Replace the non-standard frequencyY attribute documentation with
> > > out_altvoltageX_frequency and document tuning word selection
> > > through out_altvoltageX_frequencysymbol
> > >
> > > This makes the documented ABI naming consistent with standard
> > > IIO sysfs attribute conventions and clarifies how tuning word
> > > registers are selected and programmed.
> > >
> >
> > Hmm. So some history on why it was done like this (long time back
> > but I think I recall the basic argument).
> >
> > Consider the programming you need to set up FSK on a channel and
> > the fact that someone is recieving the result.
> >
> > When you set the symbol to program it that channel will begin
> > outputting the voltage. That means someone at the other end starts
> > decoding it.
> >
> > Hence we normally expect to set a frequency 'before' changing the
> > symbol. Hence the per symbol files.
> >
> > There might be a valid way to set them up using your proposed
> > interface but I'm not currently understanding what it is.
>
> I think I misunderstood the purpose of
> out_altvoltageX_frequencysymbol.
>
> I initially thought it was used to select which tuning word register
> to write into, whereas it actually selects the active output tuning
> word. That explains why my proposed interface was confusing.
>
> The ordering requirement you described for FSK setup makes sense now.
> With separate frequency0/frequency1 files, userspace can configure both
> tuning words before switching the active symbol.
>
> >
> > We went through the same dance with the more complex DDS that
> > Rodrigo is working on. Take a look at the multichannel approach
> > he is using. It may apply here - I'm not sure.
> >
>
> With my approach we can have a new entry /out_altvoltageX_frequencySelect
> which can act as a mux to write into FREQ0 and FREQ1 register
> via /out_altvoltage_frequency.
We could but given that is custom ABI anyway, what is the advantage over
per symbol controls? Generally 'mux' control sysfs attributes are harder
to use than separate files. For starters you'd also need an
out_outvoltageX_symbolcount or something like that to know what values
can be used. One file per symbol and that is explicit without yet
more descriptive ABI needing to be defined.
>
> I will take a look at Rodrigo's multichannel DDS approach before
> proposing any ABI changes further. It would be helpful if you could
> share links to the relevant discussion or patches.
https://lore.kernel.org/all/20260508-ad9910-iio-driver-v4-0-d26bfd20ee3d@analog.com/
and the earlier versions of that series.
>
> >
> > >
> > > Signed-off-by: Abinash Singh <abinashlalotra@gmail.com>
> > > ---
> > >
> > > The out_altvoltageX_frequencysymbol and
> > > out_altvoltageX_frequency_scale attributes can be added
> > > through extended channel attributes (.ext_info in channel_spec struct of IIO)
> > >
> > > Feedback on this approach would be appreciated, and if
> > > there is some other way in your mind. I would like to
> > > work on that.
> > >
> > > I am also interested in working on the sysfs-bus-iio-dds
> > > documentation and the ad9834 driver. I recently bought an
> > > AD9833 IC for experimentation and testing.
> > >
> > Excellent!
> >
> > Thanks,
> >
> > Jonathan
> >
> > > Thanks
>
>
> And do we need to really work on this documentation in order to work on ad9834.c
> What else can be done in ad9834.c apart from this naming.??
The challenge has always been the ABI for these.
We need to work out what it should be (which is kind of what Rodrigo is doing
in his RFCs) before we commit it in stone. Whilst not ideal, we can evolve
an ABI for a driver in staging (for IIO anyway - be careful in other places)
but not once it is out of staging.
Jonathan
>
> Thanks
>
> Abinash Singh
prev parent reply other threads:[~2026-05-16 11:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 17:12 [PATCH] staging: Documentation: dds: replace frequencyY with frequency Abinash Singh
2026-05-12 11:15 ` Andy Shevchenko
2026-05-12 16:31 ` Abinash Singh
2026-05-12 14:08 ` Jonathan Cameron
2026-05-12 16:44 ` Abinash Singh
2026-05-16 11:38 ` Jonathan Cameron [this message]
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=20260516123754.16becb25@jic23-huawei \
--to=jic23@kernel.org \
--cc=abinashlalotra@gmail.com \
--cc=abinashsinghlalotra@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--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