Re: [PATCH v2 5/6] docs: iio: add documentation for adf41513 driver

Jonathan Cameron
2025-12-27T17:06:16Z

> > > +2.3 Reference Input Control
> > > +---------------------------
> > > +
> > > +The ``refin_frequency`` attribute allows control of the reference input
> > > +frequency when using a programmable reference clock. The supported range is
> > > +10 MHz to 800 MHz.
> >
> > I'm not really sure why need this as opposed to having a standard clock
> > provide it.  What's the use case?
>
> I was thinking about, and for the application I am currently evaluating the part
> the reference signal comes from a DDS, and that signal is not a clock it is a
> series of chirp patterns. The important thing about this property is to set
> a center frequency for the DDS to work on. In that scenario the PLL will not
> really work as a frequency sythentizer, but as a frequency tracker of the
> varying reference. Problem is that I've realized that recently after putting
> together a device driver for the DDS. Therefore this property is still important,
> and I need to make the reference clock input as an optional property.
> I thought of making the DDS as a clock provider, but that center frequency
> would have a "virtual" meaning, not attached to the hardware configs.

Interesting use case! I'm not really sure how we support it. I can think of a
a few approaches that might work. In some way it's a bit similar to an amplifier
in front of an ADC or other analog front end, just working in the frequency domain.
I've never been entirely happy with how we support those either though!

>

> > > +2.5 Phase adjustment
> > > +--------------------
> > > +
> > > +The ``phase`` attribute allows adjustment of the output phase in degrees.
> >
> > As per driver feedback, I don't think this is compliant with existing ABI.
>
> ABI is not in degrees? the attribute is named out_altvoltage0_phase

All angle things (including phase) in IIO are in Radians (we try to stick to SI
units). Check these in
Documentation/ABI/testing/sysfs-bus-iio*

Note that is not always as complete as it should be so if anything is missing
and in use we should add it. We don't blanket add stuff the ABI construction
code allows as some cases will never occur in reality.

Jonathan