From: "Nuno Sá" <noname.nuno@gmail.com>
To: David Lechner <dlechner@baylibre.com>,
Antoniu Miclaus <antoniu.miclaus@analog.com>,
jic23@kernel.org, robh@kernel.org, conor+dt@kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 14/14] Documentation: ABI: testing: ad4080 docs
Date: Tue, 25 Feb 2025 09:16:16 +0000 [thread overview]
Message-ID: <3f4bb345c1d76e7521d8bdbf4b4552e727c7dc1c.camel@gmail.com> (raw)
In-Reply-To: <fd3ba169-c5e0-4405-961f-d7c11c68dffb@baylibre.com>
On Thu, 2025-02-20 at 12:27 -0600, David Lechner wrote:
> On 2/20/25 8:53 AM, Nuno Sá wrote:
> > On Thu, 2025-02-20 at 15:54 +0200, Antoniu Miclaus wrote:
> > > Add documentation for the ad4080 attributes.
> > >
> > > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> > > ---
> > > .../ABI/testing/sysfs-bus-iio-adc-ad4080 | 55 +++++++++++++++++++
> > > 1 file changed, 55 insertions(+)
> > > create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-ad4080
> > >
> > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-ad4080
> > > b/Documentation/ABI/testing/sysfs-bus-iio-adc-ad4080
> > > new file mode 100644
> > > index 000000000000..e37bfba0e989
> > > --- /dev/null
> > > +++ b/Documentation/ABI/testing/sysfs-bus-iio-adc-ad4080
> > > @@ -0,0 +1,55 @@
> > > +What: /sys/bus/iio/devices/iio:deviceX/lvds_sync
> > > +Date: February 2025
> > > +KernelVersion:
> > > +Contact: linux-iio@vger.kernel.org
> > > +Description:
> > > + This attribute handles the data synchronization
> > > process.Because the CNV
> > > + signal is not taken into account by the FPGA when
> > > capturing
> > > the data, we
> > > + need a process that configures the ADC to output pattern
> > > data, writes the
> > > + SYNC bit in the axi_adc register map, waits until the
> > > custom
> > > HDL syncs the
> > > + data correctly, and then changes the output mode to
> > > analog
> > > data instead of
> > > + the fixed pattern.
> >
> > I'll comment this one in the driver. I have some questions on how this
> > works...
> >
> > > +
> > > +What: /sys/bus/iio/devices/iio:deviceX/lvds_lvds
> > > +Date: February 2025
> > > +KernelVersion:
> > > +Contact: linux-iio@vger.kernel.org
> > > +Description:
> > > + Configures the signal type of the CNV signal. The value
> > > can
> > > be either CMOS
> > > + (lvds_cnv=0) or LVDS (lvds_cnv=1).
> >
> > The name seems to be wrong with what you have implemented. From this
> > description, I would think of this as a DT property? Can the signal type
> > really
> > change at runtime?
> >
> > > +
> > > +What: /sys/bus/iio/devices/iio:deviceX/filter_sel
> > > +Date: February 2025
> > > +KernelVersion:
> > > +Contact: linux-iio@vger.kernel.org
> > > +Description:
> > > + This attribute enables the digital filter functionality
> > > of
> > > the AD4080.In
> > > + order to capture data correctly, the function must
> > > configure
> > > the ADC
> > > + through SPI to select the filter type and enable data
> > > capture
> > > in filter
> > > + mode through axi_adc(In this mode, data is gated by a
> > > signal
> > > generated by
> > > + the AD4080 (GPIO1 and is not continuous as it is when the
> > > filter is
> > > + disabled).
> > > +
> > > +What: /sys/bus/iio/devices/iio:deviceX/filter_sel_available
> > > +Date: February 2025
> > > +KernelVersion:
> > > +Contact: linux-iio@vger.kernel.org
> > > +Description:
> > > + Return the available filter modes that can be set.
> >
> > There's a standard attr for this. I think we settled
>
> Yup. filter_type and filter_type_available.
>
> > > +
> > > +What: /sys/bus/iio/devices/iio:deviceX/sinc_dec_rate
> > > +Date: February 2025
> > > +KernelVersion:
> > > +Contact: linux-iio@vger.kernel.org
> > > +Description:
> > > + Set the filter’s decimation rate.
> > > +
> > > +What: /sys/bus/iio/devices/iio:deviceX/sinc_dec_rate_available
> > > +Date: February 2025
> > > +KernelVersion:
> > > +Contact: linux-iio@vger.kernel.org
> > > +Description:
> > > + Return the available filter's decimation rates.
> > > +
> > > +
> >
> > I'm not yet convinced we need the dec_rate custom attr. I'll add more
> > comments
> > in the driver.
>
> If we do need it, in another driver recently we concluded that
> decimation rate is the same as oversampling ratio and there is
> already a standard attribute for oversampling ratio, so we used
> that.
>
Yeah, in theory decimation is about averaging samples. Makes sense to me even
though I never thought about using the oversampling ratio attr. I was biased by
the IMUs drivers where we configure the dec_rate as part of the sampling
frequency attr since these filters directly affect the chip ODR.
Out of curiosity, how did you handled this in the other driver? I would be
tempted to only allow reading the sampling frequency attribute which means that
the oversampling ratio attr is the one we can write (which then directly affects
sampling frequency).
- Nuno Sá
next prev parent reply other threads:[~2025-02-25 9:16 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 13:54 [PATCH 00/14] Add support for AD4080 ADC Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 01/14] iio: backend: add support for filter config Antoniu Miclaus
2025-02-22 16:47 ` Jonathan Cameron
2025-02-20 13:54 ` [PATCH 02/14] iio: backend: add support for sync process Antoniu Miclaus
2025-02-22 16:49 ` Jonathan Cameron
2025-02-20 13:54 ` [PATCH 03/14] iio: backend: add support for self sync Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 04/14] iio: backend: add support for sync status Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 05/14] iio: backend: add support for number of lanes Antoniu Miclaus
2025-02-20 20:20 ` David Lechner
2025-02-21 15:59 ` Nuno Sá
2025-02-20 13:54 ` [PATCH 06/14] dt-bindings: iio: adc: add ad408x axi variant Antoniu Miclaus
2025-02-21 17:49 ` Conor Dooley
2025-02-20 13:54 ` [PATCH 07/14] iio: adc: adi-axi-adc: add filter enable/disable Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 08/14] iio: adc: adi-axi-adc: add bitslip enable/disable Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 09/14] iio: adc: adi-axi-adc: add self sync support Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 10/14] iio: adc: adi-axi-adc: add sync status Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 11/14] iio: adc: adi-axi-adc: add num lanes support Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 12/14] dt-bindings: iio: adc: add ad4080 Antoniu Miclaus
2025-02-20 19:30 ` David Lechner
2025-02-21 17:51 ` Conor Dooley
2025-02-20 13:54 ` [PATCH 13/14] iio: adc: ad4080: add driver support Antoniu Miclaus
2025-02-20 15:21 ` Nuno Sá
2025-02-22 17:12 ` Jonathan Cameron
2025-02-20 13:54 ` [PATCH 14/14] Documentation: ABI: testing: ad4080 docs Antoniu Miclaus
2025-02-20 14:53 ` Nuno Sá
2025-02-20 18:27 ` David Lechner
2025-02-25 9:16 ` Nuno Sá [this message]
2025-02-25 15:26 ` David Lechner
2025-03-05 13:00 ` Jonathan Cameron
2025-02-20 20:12 ` [PATCH 00/14] Add support for AD4080 ADC David Lechner
2025-02-22 16:56 ` 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=3f4bb345c1d76e7521d8bdbf4b4552e727c7dc1c.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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