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: "Pop Ioan Daniel" <pop.ioan-daniel@analog.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Sergiu Cuciurean" <sergiu.cuciurean@analog.com>,
	"Dragos Bogdan" <dragos.bogdan@analog.com>,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	"Olivier Moysan" <olivier.moysan@foss.st.com>,
	"Javier Carrasco" <javier.carrasco.cruz@gmail.com>,
	"Matti Vaittinen" <mazziesaccount@gmail.com>,
	"Tobias Sperling" <tobias.sperling@softing.com>,
	"Alisa-Dariana Roman" <alisadariana@gmail.com>,
	"Marcelo Schmitt" <marcelo.schmitt@analog.com>,
	"Matteo Martelli" <matteomartelli3@gmail.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] iio: adc: ad7405: add ad7405 driver
Date: Sun, 11 May 2025 15:45:55 +0100	[thread overview]
Message-ID: <20250511154555.067143c9@jic23-huawei> (raw)
In-Reply-To: <4fb74419-51bf-4294-82bf-545504ad0c3f@baylibre.com>


> > +
> > +static const struct iio_info ad7405_iio_info = {
> > +	.read_raw = &ad7405_read_raw,
> > +	.write_raw = &ad7405_write_raw,
> > +	.read_avail = &ad7405_read_avail,
> > +};
> > +
> > +#define AD7405_IIO_CHANNEL {							\
> > +	.type = IIO_VOLTAGE,							\
> > +	.info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),		\
> > +	.info_mask_shared_by_all_available = BIT(IIO_CHAN_INFO_SAMP_FREQ),	\  
> 
> Would it make more sense to use IIO_CHAN_INFO_OVERSAMPLING_RATIO for controlling
> the decimation rate and have IIO_CHAN_INFO_SAMP_FREQ be read-only?

My initial reaction to this was that we'd be not providing one of the longest
standing and user friendly(ish) interfaces.  However if it literally only affects
oversampling then indeed I think oversampling is the more informative interface.
Which is to say I started writing no then thought some more and ended up agreeing with
you ;)

As you say, a read only sampling frequency is fine.  We use those when it's controlled
by some outside factor (like a clock frequency) so userspace should in theory at least
cope fine with that being RO.

> Maybe also useful to have a read-only filter_type attribute to say that the
> backend is providing a sinc3 filter?

Nice to have perhaps.


J


  reply	other threads:[~2025-05-11 14:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 12:30 [PATCH v2 0/4] Add support for AD7405/ADUM770x Pop Ioan Daniel
2025-05-08 12:30 ` [PATCH v2 1/4] iio: backend: update iio_backend_oversampling_ratio_set Pop Ioan Daniel
2025-05-08 16:41   ` David Lechner
2025-05-09 10:10   ` kernel test robot
2025-05-09 10:21   ` kernel test robot
2025-05-09 18:03   ` kernel test robot
2025-05-08 12:30 ` [PATCH v2 2/4] iio: adc: adi-axi-adc: add set decimation rate Pop Ioan Daniel
2025-05-08 16:45   ` David Lechner
2025-05-08 12:30 ` [PATCH v2 3/4] dt-bindings: iio: adc: add ad7405 Pop Ioan Daniel
2025-05-08 14:41   ` Conor Dooley
2025-05-09 13:45   ` Rob Herring (Arm)
2025-05-08 12:30 ` [PATCH v2 4/4] iio: adc: ad7405: add ad7405 driver Pop Ioan Daniel
2025-05-08 17:08   ` David Lechner
2025-05-11 14:45     ` Jonathan Cameron [this message]
2025-05-09 11:45   ` kernel test robot
2025-05-11 15:02   ` 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=20250511154555.067143c9@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=alisadariana@gmail.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=dragos.bogdan@analog.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt@analog.com \
    --cc=matteomartelli3@gmail.com \
    --cc=mazziesaccount@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=olivier.moysan@foss.st.com \
    --cc=pop.ioan-daniel@analog.com \
    --cc=robh@kernel.org \
    --cc=sergiu.cuciurean@analog.com \
    --cc=tobias.sperling@softing.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