[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df548836ef42d38fc8f89a23572c24d0501c619e.camel@gmail.com>
Date: Mon, 09 Feb 2026 14:19:51 +0000
From: Nuno Sá <noname.nuno@...il.com>
To: Jonathan Cameron <jic23@...nel.org>, Tomas Melin
<tomas.melin@...sala.com>
Cc: Michael Hennerich <Michael.Hennerich@...log.com>, Nuno Sa
<nuno.sa@...log.com>, Lars-Peter Clausen <lars@...afoo.de>, David Lechner
<dlechner@...libre.com>, Andy Shevchenko <andy@...nel.org>, Olivier Moysan
<olivier.moysan@...s.st.com>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, Chris Mason <clm@...a.com>
Subject: Re: [PATCH v6 5/5] iio: adc: ad9467: check for backend capabilities
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@...sala.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@...sala.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á
Powered by blists - more mailing lists