From: "Nuno Sá" <noname.nuno@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>,
Tomas Melin <tomas.melin@vaisala.com>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>,
Nuno Sa <nuno.sa@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>,
Olivier Moysan <olivier.moysan@foss.st.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Chris Mason <clm@meta.com>
Subject: Re: [PATCH v6 5/5] iio: adc: ad9467: check for backend capabilities
Date: Mon, 09 Feb 2026 14:19:51 +0000 [thread overview]
Message-ID: <df548836ef42d38fc8f89a23572c24d0501c619e.camel@gmail.com> (raw)
In-Reply-To: <20260208193034.7c780426@jic23-huawei>
On Sun, 2026-02-08 at 19:30 +0000, Jonathan Cameron wrote:
> On Thu, 05 Feb 2026 12:24:11 +0000
> Tomas Melin <tomas.melin@vaisala.com> wrote:
>
> > Add capability checks for operation with backends that do not necessarily
> > support full set of features, but are otherwise compatible with the device.
> > This ensures a fully functional device, but with limited capabilities.
> >
> > Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
> I've mentioned before that I've started messing around with Chris Mason's
> set of Claude Code prompts and today I was trying out the new stuff mentioned in:
> https://lore.kernel.org/all/b187e0c1-1df8-4529-bfe4-0a1d65221adc@meta.com/
>
Yeps, we're doing the same and adding the above to our CI. I guess an IIO skill will
be helpful long term.
>
> Given this patch set is pretty much ready to merge I asked it to take a look
> and it came up with something that certainly merited me taking a look.
>
> Issue: In ad9467_chan_test_mode_write(), the testmode_on path is guarded
> by IIO_BACKEND_CAP_CALIBRATION but the matching testmode_off path is not.
> On backends without that capability, entering PN test mode succeeds but
> exiting fails with -EOPNOTSUPP, leaving the ADC stuck in test mode.
>
> I may be missing some protection path, but I think it is right and if you
> were to set up the test modes with a backend that doesn't support the
> relevant functionality you would indeed be able to turn them on but never
> off again.
>
> So this might be the first bug in IIO that the LLM found and human's, including
> me, missed!
Yes, that seems to be the case.
- Nuno Sá
next prev parent reply other threads:[~2026-02-09 14:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 12:24 [PATCH v6 0/5] iio: adc: ad9467: Support alternative backends Tomas Melin
2026-02-05 12:24 ` [PATCH v6 1/5] iio: industrialio-backend: support backend capabilities Tomas Melin
2026-02-05 12:24 ` [PATCH v6 2/5] iio: adc: adi-axi-adc: define supported iio-backend capabilities Tomas Melin
2026-02-05 12:24 ` [PATCH v6 3/5] iio: dac: adi-axi-dac: " Tomas Melin
2026-02-05 12:24 ` [PATCH v6 4/5] iio: adc: sd_adc_modulator: " Tomas Melin
2026-02-05 12:24 ` [PATCH v6 5/5] iio: adc: ad9467: check for backend capabilities Tomas Melin
2026-02-05 16:34 ` Andy Shevchenko
2026-02-09 7:24 ` Tomas Melin
2026-02-09 8:41 ` Andy Shevchenko
2026-02-09 10:01 ` Tomas Melin
2026-02-09 10:35 ` Andy Shevchenko
2026-02-07 18:43 ` David Lechner
2026-02-08 19:30 ` Jonathan Cameron
2026-02-09 7:17 ` Tomas Melin
2026-02-09 14:19 ` Nuno Sá [this message]
2026-02-09 14:37 ` Chris Mason
2026-02-07 18:43 ` [PATCH v6 0/5] iio: adc: ad9467: Support alternative backends David Lechner
2026-02-08 9:05 ` 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=df548836ef42d38fc8f89a23572c24d0501c619e.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=clm@meta.com \
--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