From: "Nuno Sá" <noname.nuno@gmail.com>
To: 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>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] iio: adc: ad9467: make iio backend optional
Date: Thu, 18 Dec 2025 13:41:02 +0000 [thread overview]
Message-ID: <055f9c79ab40a8a72e69b7c9cfa2a64292377f5e.camel@gmail.com> (raw)
In-Reply-To: <5fa44e46-2d94-47dd-8429-9748aa28f908@vaisala.com>
On Wed, 2025-12-17 at 13:44 +0200, Tomas Melin wrote:
> [resend, I think there was some problem with my first reply]
>
> Hi,
>
> On 17/12/2025 11:26, Nuno Sá wrote:
> > On Tue, 2025-12-16 at 15:39 +0000, Tomas Melin wrote:
> > > Hi,
> > >
> > > On 16/12/2025 14:56, Nuno Sá wrote:
> > > > On Tue, 2025-12-16 at 11:40 +0000, Tomas Melin wrote:
> > > > > Not all users can or want to use the device with an iio-backend.
> > > > > For these users, let the driver work in standalone mode, not coupled
> > > > > to the backend or the services it provides.
> > > > >
> > > > > Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
> > > > > ---
> > > >
> > > > Which users? The only usecases (for all the supported devices) we have require
> > > > the FPGA backend. So do you have a specific usecase for a specific device? If so, I would
> > > > prefer an explicit boolean in the chip_info struture for the device(s) we know this
> > > > can happen (unless you have a usecase for all :)).
> > >
> > > This is generically for all the devices supported by the ad9467, not
> > > only a specific device. So it's about how this is used as part of the
> > > design.
> > >
> > > This is aimed at users that do not use the ADI HDL reference backend
> > > with these devices, but instead have custom backends suited for their
> > > own needs.
> >
> > Hmm, ideally I would then like to see the backend driver upstreamed...
>
> First of all, as I responded in another thread, there is certainly real
> use case behind this, I would not be suggesting it otherwise.
>
> Driver for custom backend would not be of any interest for mainline
> kernel as the IP would not be publicly available. So nobody could really
> use such a driver, nor would it be accepted. The default ADI backend is
> a different story, as it is available and documented.
I see.
>
> >
> > > In that case, we need to be able to skip the backend registration and
> > > register device as a standalone iio device.
> > >
> > > Hopefully this made the use case clearer?
> > >
> >
> > I mean, I don't love this and I'm not really sure I'm ok with it. These are fairly
> > high speed devices which often do require an FPGA IP to handle the data flow. Now
> > we can ignore the backend device (which is an essential piece) being it
> > expected or not.
> >
> > Or maybe we can just do something like regulators and get a dummy backend or just add
> > some fixed kind of backend. Bottom line is, it still seems the backend device is a core
> > piece in your design and we're just hacking around the driver in way that conceptually
> > doesn't make sense to me.
>
> I considered the idea of dummy backend, but in the end it doesn't make
> much sense to me.
> These ADCs can work perfectly fine with a minimalistic custom backend
> that does exactly what the design needs, without the need for basically
> any configuration. So the ADCs rely on some sort of backend, ofcourse,
> but they are in the end standalone devices that can be integrated in
> many ways, the adi backend being only one such option.
There we have it. It relies on some external HW so conceptually the dummy would
make sense me. In the same way a device cannot work without power supply and hence
we get the dummy regulator. But...
>
> Another problem with a dummy backend is that for example calibration
> cannot really work. It expects certain features from the backend to be
> available, etc. Similarly would a custom backend connected need to
> implemented exactly same test features as the backend now assumes.
>
The above is indeed cumbersome. I guess dummy is not what we would need but something
like a fixed-backend that would implement all the ops in a dummy way. But that does not
make much sense and doesn't really scale.
I think my main complain is also that then we should add a devm_backend_get_optional() to make
the intent clear but unfortunately this driver is not the best candidate for that.
Anyways, I still don't love the idea of just ignoring it (given that some HW is indeed present)
but yeah. Not going to nack it either.
- Nuno Sá
next prev parent reply other threads:[~2025-12-18 13:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 11:40 [PATCH 0/2] iio: adc: ad9467: Enable operation without iio-backend Tomas Melin
2025-12-16 11:40 ` [PATCH 1/2] iio: adc: ad9467: include two's complement in default mode Tomas Melin
2025-12-18 13:43 ` Nuno Sá
2025-12-20 3:28 ` kernel test robot
2025-12-20 5:13 ` kernel test robot
2025-12-21 19:54 ` Jonathan Cameron
2025-12-16 11:40 ` [PATCH 2/2] iio: adc: ad9467: make iio backend optional Tomas Melin
2025-12-16 12:56 ` Nuno Sá
2025-12-16 15:39 ` Tomas Melin
2025-12-16 21:27 ` David Lechner
2025-12-17 5:38 ` Tomas Melin
2025-12-17 9:26 ` Nuno Sá
2025-12-17 10:39 ` Tomas Melin
2025-12-17 11:44 ` Tomas Melin
2025-12-18 13:41 ` Nuno Sá [this message]
2025-12-19 11:25 ` Tomas Melin
2025-12-18 13:49 ` Nuno Sá
2025-12-19 11:16 ` Tomas Melin
2025-12-19 14:46 ` Nuno Sá
2025-12-21 20:00 ` Jonathan Cameron
2026-01-05 11:06 ` Tomas Melin
2026-01-05 14:57 ` Nuno Sá
2026-01-11 11:41 ` Jonathan Cameron
2026-01-12 13:21 ` Nuno Sá
2026-01-13 7:47 ` Tomas Melin
2026-01-13 10:00 ` Jonathan Cameron
2026-01-13 10:52 ` Nuno Sá
2026-01-13 11:49 ` Tomas Melin
2026-01-13 12:44 ` 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=055f9c79ab40a8a72e69b7c9cfa2a64292377f5e.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=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