public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: "Nuno Sá" <noname.nuno@gmail.com>,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	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: Wed, 5 Mar 2025 13:00:20 +0000	[thread overview]
Message-ID: <20250305130020.7e78f3a6@jic23-huawei> (raw)
In-Reply-To: <d1af7490-5d91-4b30-a86f-8df3a8d17af7@baylibre.com>

On Tue, 25 Feb 2025 09:26:56 -0600
David Lechner <dlechner@baylibre.com> wrote:

> On 2/25/25 3:16 AM, Nuno Sá wrote:
> > 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:  
> 
> ...
> 
> >>>> +
> >>>> +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á  
> 
> The other driver is still under review:
> 
> https://lore.kernel.org/linux-iio/2c3ce1701545e435238605342397e45657a0fb2a.1739368121.git.Jonathan.Santos@analog.com/
> 
> It is modifying an existing driver, so in that case, we still have to preserve
> writing to sampling_frequency even if that isn't the ideal way to set it up.

It's pretty rare from what I recall to see a device sophisticated enough to do
over sampling that doesn't also support a sequencer that will allow configuring
the sampling frequency at a given oversampling ratio (by adding space, or more
settling time if a mux is involved which looks the same as space to software).

I guess there is always a first and to me in that case oversampling is the natural
control rather than sampling frequency.

Jonathan
Jonathan



  reply	other threads:[~2025-03-05 13:00 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á
2025-02-25 15:26         ` David Lechner
2025-03-05 13:00           ` Jonathan Cameron [this message]
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=20250305130020.7e78f3a6@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noname.nuno@gmail.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