From: Maxime Ripard <maxime@cerno.tech>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Jonathan Cameron <jic23@kernel.org>,
linux-iio <linux-iio@vger.kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>, Rob Herring <robh@kernel.org>
Subject: Re: [PATCH] iio: st-sensors: Update ST Sensor bindings
Date: Thu, 15 Jul 2021 14:21:57 +0200 [thread overview]
Message-ID: <20210715122157.ws7rg67ebypzup4f@gilmour> (raw)
In-Reply-To: <CACRpkdZqth9kYEaCr=C88=EbhEy+r5V1vPXOPKNky5HeP7QxPg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
On Wed, Jul 14, 2021 at 10:26:39AM +0200, Linus Walleij wrote:
> On Mon, Jul 12, 2021 at 4:16 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> > > maxItems is set, but not minItems.
> >
> > Yeah, and if one is missing the other is added with the value of the
> > other.
> >
> > What the schema enforces currently is that (for the common part) the
> > interrupt list can be between 1 and 2 and then for a specific set of
> > compatibles (including the LIS3MDL) it has to be exactly 2.
>
> maxItems is not an intuitive naming to what it does so it creates
> bugs like this :/
I mean, it's complicated. Both minItems and maxItems are required for
all the items in the schema spec. In order to reduce the boilerplate,
the tooling will add the other if one is missing, which can lead to
things like this indeed.
But the alternative is not really to just optionally use minItems, it's
to have to always specify it, in all the schemas.
> Can you fix so it works with your PinePhone DTS and send a patch?
> Perhaps also add as an example so it doesn't happen again?
Yeah, I can definitely do that, I'm not really sure what makes sense for
the driver at this point though.
> > Even the common part looks weird though, it says that it can handle up
> > to three interrupts but has maxItems: 2?
>
> Maybe just drop maxItems for now?
Dropping minItems and maxItems on interrupts will enforce that there's
only one interrupt, which isn't want we want either
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2021-07-15 12:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 12:23 [PATCH] iio: st-sensors: Update ST Sensor bindings Linus Walleij
2021-04-18 10:09 ` Jonathan Cameron
2021-07-12 13:04 ` Maxime Ripard
2021-07-12 13:56 ` Jonathan Cameron
2021-07-12 14:16 ` Maxime Ripard
2021-07-12 14:28 ` Jonathan Cameron
2021-07-15 12:29 ` Maxime Ripard
2021-07-14 8:26 ` Linus Walleij
2021-07-15 12:21 ` Maxime Ripard [this message]
2022-01-26 14:59 ` Geert Uytterhoeven
2022-01-28 15:51 ` Linus Walleij
2022-01-28 15:57 ` Linus Walleij
2022-01-28 16:14 ` Geert Uytterhoeven
-- strict thread matches above, loose matches on Subject: below --
2021-01-04 9:33 Linus Walleij
2021-01-09 21:49 ` Jonathan Cameron
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=20210715122157.ws7rg67ebypzup4f@gilmour \
--to=maxime@cerno.tech \
--cc=Jonathan.Cameron@huawei.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=robh@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).