From: Jonathan Cameron <jic23@kernel.org>
To: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Cc: sashiko-reviews@lists.linux.dev,
Marcelo Schmitt <marcelo.schmitt@analog.com>,
robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org,
linux-iio@vger.kernel.org
Subject: Re: [PATCH v5 1/4] dt-bindings: iio: adc: Add ltc2378
Date: Sun, 5 Jul 2026 00:11:13 +0100 [thread overview]
Message-ID: <20260705001056.65e18318@jic23-huawei> (raw)
In-Reply-To: <akfrs7OtamEIoVxE@debian-BULLSEYE-live-builder-AMD64>
On Fri, 3 Jul 2026 14:04:51 -0300
Marcelo Schmitt <marcelo.schmitt1@gmail.com> wrote:
> On 07/02, sashiko-bot@kernel.org wrote:
> > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > - [Low] Compatible strings with required fallbacks are incorrectly allowed as standalone strings.
> > --
> >
> > commit fff47614872c95c6a481f63da8b14dfcedd0bb53
> > Author: Marcelo Schmitt <marcelo.schmitt@analog.com>
> >
> > dt-bindings: iio: adc: Add ltc2378
> >
> > Document how to describe LTC2378-20 and similar ADCs in device tree.
> >
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ltc2378.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ltc2378.yaml
> > > new file mode 100644
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ltc2378.yaml
> > [ ... ]
> > > +properties:
> > > + compatible:
> > > + oneOf:
> > > + # Single compatible string match.
> > > + - enum:
> > > + - adi,ltc2338-18
> > > + - adi,ltc2364-16
> > > + - adi,ltc2364-18
> > > + - adi,ltc2367-16
> > > + - adi,ltc2367-18
> > > + - adi,ltc2368-16
> > > + - adi,ltc2368-18
> > > + - adi,ltc2369-18
> > > + - adi,ltc2370-16
> >
> > [Severity: Low]
> > Does this standalone enum allow devices that should require a fallback
> > to pass schema validation with only a single compatible string?
> >
> > Because parts like "adi,ltc2370-16" and "adi,ltc2367-16" are listed here in
> > the single enum match, a device tree node specifying only
> > compatible = "adi,ltc2370-16" will satisfy this block and successfully pass
> > schema validation.
> >
> > This seems to bypass the fallback requirements defined below in the items
> > blocks:
> >
> > [ ... ]
> > > + # Low sample rate fallback for 16-bit unipolar sensors.
> > > + - items:
> > > + - enum:
> > > + - adi,ltc2370-16 # 2 MSPS
> > > + - adi,ltc2368-16 # 1 MSPS
> > > + - adi,ltc2367-16 # 500 kSPS
> > > + - const: adi,ltc2364-16 # fallback (250 kSPS)
> >
> > Should the parts that require a fallback be removed from the single
> > compatible string enum so the schema correctly enforces the fallback?
>
> Why? Should users be prevented to specify a single specific compatible string?
Yes we should. They should always use the double string to provide a fallback.
In practice the driver will work just fine with only a single entry irrespective
of what the binding doc says - that doesn't change that we insist on it in the binding
doc.
Jonathan
next prev parent reply other threads:[~2026-07-04 23:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 21:44 [PATCH v5 0/4] iio: adc: Add support for LTC2378 and similar ADCs Marcelo Schmitt
2026-07-02 21:45 ` [PATCH v5 1/4] dt-bindings: iio: adc: Add ltc2378 Marcelo Schmitt
2026-07-02 21:52 ` sashiko-bot
2026-07-03 17:04 ` Marcelo Schmitt
2026-07-04 23:11 ` Jonathan Cameron [this message]
2026-07-02 21:45 ` [PATCH v5 2/4] iio: adc: ltc2378: Add support for LTC2378-20 and similar ADCs Marcelo Schmitt
2026-07-02 22:02 ` sashiko-bot
2026-07-03 17:14 ` Marcelo Schmitt
2026-07-04 23:22 ` Jonathan Cameron
2026-07-04 23:43 ` Jonathan Cameron
2026-07-02 21:45 ` [PATCH v5 3/4] iio: adc: ltc2378: Enable high-speed data capture Marcelo Schmitt
2026-07-02 22:07 ` sashiko-bot
2026-07-03 17:19 ` Marcelo Schmitt
2026-07-04 23:48 ` Jonathan Cameron
2026-07-02 21:46 ` [PATCH v5 4/4] iio: adc: ltc2378: Enable triggered buffer " Marcelo Schmitt
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=20260705001056.65e18318@jic23-huawei \
--to=jic23@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=marcelo.schmitt1@gmail.com \
--cc=marcelo.schmitt@analog.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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