From: "Nuno Sá" <noname.nuno@gmail.com>
To: David Lechner <dlechner@baylibre.com>,
Tomas Melin <tomas.melin@vaisala.com>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Nuno Sa <nuno.sa@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Jonathan Cameron <jic23@kernel.org>,
Andy Shevchenko <andy@kernel.org>,
Olivier Moysan <olivier.moysan@foss.st.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 1/4] iio: industrialio-backend: support backend capabilities
Date: Mon, 02 Feb 2026 10:28:57 +0000 [thread overview]
Message-ID: <812a8c408c2e3a87ebe1ddc983acdc2cebe3b36b.camel@gmail.com> (raw)
In-Reply-To: <688cbfb1-0944-492a-929d-91ebb9ab22fb@baylibre.com>
On Sat, 2026-01-31 at 14:30 -0600, David Lechner wrote:
> On 1/30/26 3:16 AM, Tomas Melin wrote:
> > Not all backends support the full set of capabilities provided by the
> > industrialio-backend framework. Capability bits can be used in frontends
> > and backends for checking for a certain feature set, or if using
> > related functions can be expected to fail.
> >
> > Capability bits should be set by a compatible backend and provided when
> > registering the backend.
> >
>
> ...
>
> > +/**
> > + * enum iio_backend_capabilities - Backend capabilities
> > + * Backend capabilities can be used by frontends to check if a given
> > + * functionality is supported by the backend. This is useful for frontend
> > + * devices which are expected to work with alternative backend
> > + * implementations. Capabilities are loosely coupled with operations,
> > + * meaning that a capability requires certain operations to be implemented
> > + * by the backend. A capability might be mapped to a single operation or
> > + * multiple operations.
>
> It would be helpful to list these operations explicitly for each
> enum member.
>
> > + *
> > + * @IIO_BACKEND_CAP_CALIBRATION: Backend supports digital interface
> > + * calibration. Calibration procedure is device specific.
> > + * @IIO_BACKEND_CAP_BUFFERING: Backend supports buffering.
>
> I assume this means it supports devm_iio_backend_request_buffer()?
>
> In IIO, we usually say "buffer" and rarely "buffering" so this name and
> description is a bit confusing to me.
>
> > + * @IIO_BACKEND_CAP_ALWAYS_ON: Backend does not need to be explicitly
> > + * enabled/disabled. It is always on.
>
> Do we actually need this one? Alternative could be, for example:
>
> int iio_backend_enable(struct iio_backend *back)
> {
> int ret;
>
> ret = iio_backend_op_call(back, enable);
>
> return ret == -EOPNOTSUPP ? 0 : ret;
> }
I would prefer not to assume we can ignore the backend not supporting
the call. It opens up the question for other operations.
My preferred way for this kind of fundamental operation (enabling/disabling)
would be to check with DT maintainers if we could have some kind of fixed-backend
(fixed in the sense the HW is present but not controlled by Linux) dummy device that
with implement a no-OP enable/disable().
- Nuno Sá
next prev parent reply other threads:[~2026-02-02 10:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 9:16 [PATCH v5 0/4] iio: adc: ad9467: Support alternative backends Tomas Melin
2026-01-30 9:16 ` [PATCH v5 1/4] iio: industrialio-backend: support backend capabilities Tomas Melin
2026-01-31 20:30 ` David Lechner
2026-02-02 10:28 ` Nuno Sá [this message]
2026-02-02 11:08 ` Tomas Melin
2026-02-02 12:40 ` Nuno Sá
2026-02-02 13:04 ` Tomas Melin
2026-02-02 15:50 ` David Lechner
2026-02-03 9:50 ` Tomas Melin
2026-02-04 1:07 ` David Lechner
2026-02-04 11:15 ` Tomas Melin
2026-02-03 10:01 ` Nuno Sá
2026-02-03 10:45 ` Tomas Melin
2026-02-02 10:58 ` Tomas Melin
2026-02-02 15:17 ` David Lechner
2026-01-30 9:17 ` [PATCH v5 2/4] iio: adc: adi-axi-adc: define supported iio-backend capabilities Tomas Melin
2026-02-02 10:33 ` Nuno Sá
2026-01-30 9:17 ` [PATCH v5 3/4] iio: dac: adi-axi-dac: " Tomas Melin
2026-02-02 10:33 ` Nuno Sá
2026-01-30 9:17 ` [PATCH v5 4/4] iio: adc: ad9467: check for backend capabilities Tomas Melin
2026-01-31 20:40 ` David Lechner
2026-02-02 11:18 ` Tomas Melin
2026-02-02 10:42 ` Nuno Sá
2026-02-02 12:03 ` Tomas Melin
2026-02-03 9:51 ` Nuno Sá
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=812a8c408c2e3a87ebe1ddc983acdc2cebe3b36b.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=olivier.moysan@foss.st.com \
--cc=tomas.melin@vaisala.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
all inboxes | Powered by JetHome®