Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Jorge Marques <jorge.marques@analog.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>, <dlechner@baylibre.com>,
	<Michael.Hennerich@analog.com>, <linux-iio@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] Documentation: ABI: add oversampling frequency in sysfs-bus-iio
Date: Sun, 30 Mar 2025 18:13:20 +0100	[thread overview]
Message-ID: <20250330181320.0ec4351c@jic23-huawei> (raw)
In-Reply-To: <20250321-abi-oversampling-events-frequency-v1-2-794c1ab2f079@analog.com>

On Fri, 21 Mar 2025 15:50:02 +0100
Jorge Marques <jorge.marques@analog.com> wrote:

> Some devices have an internal clock used to space out the conversion
> trigger for the oversampling filter,
> Consider an ADC with conversion and data ready pins topology:
> 
>   Sampling trigger |       |       |       |       |
>   ADC conversion   ++++    ++++    ++++    ++++    ++++
>   ADC data ready      *       *       *       *       *
> 
> With the oversampling frequency, conversions can be evenly space between
> the sampling edge:

I'm not sure what this second example is providing.  Are you suggesting
that if we don't provide oversampling frequency we should assume this
pattern?  i.e. it is the default?

> 
>   Sampling trigger |       |       |       |       |
>   ADC conversion   + + + + + + + + + + + + + + + + + + + +
>   ADC data ready         *       *       *       *       *
> 
In general this patch needs to go in with the first driver using it.
I don't think we have any such driver yet?

> Signed-off-by: Jorge Marques <jorge.marques@analog.com>
> ---
>  Documentation/ABI/testing/sysfs-bus-iio | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 33c09c4ac60a4feec82308461643134f5ba84b66..2317bacf6a2884691a08725d6f01d18555a96227 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -139,6 +139,23 @@ Contact:	linux-iio@vger.kernel.org
>  Description:
>  		Hardware dependent values supported by the oversampling filter.
>  
> +What:		/sys/bus/iio/devices/iio:deviceX/oversampling_frequency
> +KernelVersion:	6.15
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Some devices have internal clocks for the ADC oversampling.
I wonder if we can hint at your diagram above?
Maybe
		Some devices have internal clocks for the ADC oversampling allowing
		the over samples to be bunched up, rather than evenly spread over the
		period set by the sampling frequency.

> +		Sets the resulting sampling frequency to trigger a conversion
> +		used by the oversampling filter.
> +		Can be used to evenly space conversion between the sampling edge
> +		on some devices.
I'd skip this last line, or maybe say something like:

		If not provided, the default assumption is that the oversamples
		are evenly spread over the period of the sample.

> +
> +What:		/sys/bus/iio/devices/iio:deviceX/oversampling_frequency_available
> +KernelVersion:	6.15
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Hardware dependent values supported by the oversampling
> +		frequency.
> +
>  What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_raw
>  What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_raw
>  What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_i_raw
> 


  reply	other threads:[~2025-03-30 17:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 14:50 [PATCH 0/2] Add sys-bus-iio ABI frequency options to events and oversampling Jorge Marques
2025-03-21 14:50 ` [PATCH 1/2] Documentation: ABI: add events sampling frequency in sysfs-bus-iio Jorge Marques
2025-03-30 17:08   ` Jonathan Cameron
2025-03-21 14:50 ` [PATCH 2/2] Documentation: ABI: add oversampling " Jorge Marques
2025-03-30 17:13   ` Jonathan Cameron [this message]
2025-03-30 17:34     ` David Lechner
2025-03-30 17:53       ` Jonathan Cameron
2025-04-02 13:47         ` Jorge Marques
2025-04-02 20:27           ` David Lechner
2025-04-03  8:35             ` Jorge Marques
2025-04-06 10:25               ` Jonathan Cameron
2025-04-07 16:28                 ` Jorge Marques
2025-04-07 18:40                   ` 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=20250330181320.0ec4351c@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=jorge.marques@analog.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.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