From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rob Herring <robh@kernel.org>
Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org, linux-clk <linux-clk@vger.kernel.org>,
"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
"Linux Crypto Mailing List" <linux-crypto@vger.kernel.org>,
"DRI Development" <dri-devel@lists.freedesktop.org>,
dmaengine <dmaengine@vger.kernel.org>,
"Linux I2C" <linux-i2c@vger.kernel.org>,
linux-iio@vger.kernel.org,
"ALSA Development Mailing List" <alsa-devel@alsa-project.org>,
"Linux IOMMU" <iommu@lists.linux-foundation.org>,
"Linux Media Mailing List" <linux-media@vger.kernel.org>,
"Linux MMC List" <linux-mmc@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
linux-can@vger.kernel.org, linux-pci <linux-pci@vger.kernel.org>,
linux-phy@lists.infradead.org,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"Linux PWM List" <linux-pwm@vger.kernel.org>,
"open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM"
<linux-remoteproc@vger.kernel.org>,
linux-riscv <linux-riscv@lists.infradead.org>,
linux-rtc@vger.kernel.org,
"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
linux-spi <linux-spi@vger.kernel.org>,
"Linux PM list" <linux-pm@vger.kernel.org>,
"USB list" <linux-usb@vger.kernel.org>,
"Linux Watchdog Mailing List" <linux-watchdog@vger.kernel.org>,
"Jens Axboe" <axboe@kernel.dk>, "Stephen Boyd" <sboyd@kernel.org>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Vinod Koul" <vkoul@kernel.org>,
"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
"Kamal Dasu" <kdasu.kdev@gmail.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Marc Zyngier" <maz@kernel.org>, "Joerg Roedel" <joro@8bytes.org>,
"Jassi Brar" <jassisinghbrar@gmail.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@canonical.com>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Wolfgang Grandegger" <wg@grandegger.com>,
"Marc Kleine-Budde" <mkl@pengutronix.de>,
"Andrew Lunn" <andrew@lunn.ch>,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Kishon Vijay Abraham I" <kishon@ti.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Lee Jones" <lee.jones@linaro.org>,
"Ohad Ben-Cohen" <ohad@wizery.com>,
"Mathieu Poirier" <mathieu.poirier@linaro.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alessandro Zummo" <a.zummo@towertech.it>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Mark Brown" <broonie@kernel.org>,
"Zhang Rui" <rui.zhang@intel.com>,
"Daniel Lezcano" <daniel.lezcano@linaro.org>,
"Wim Van Sebroeck" <wim@linux-watchdog.org>,
"Guenter Roeck" <linux@roeck-us.net>
Subject: Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems
Date: Tue, 22 Jun 2021 10:17:28 +0200 [thread overview]
Message-ID: <CAMuHMdUGXu8yj3JWKwM8mt7axkrzGMiowC1t0PHrbpxRCBME3w@mail.gmail.com> (raw)
In-Reply-To: <20210615191543.1043414-1-robh@kernel.org>
Hi Rob,
On Tue, Jun 15, 2021 at 9:16 PM Rob Herring <robh@kernel.org> wrote:
> If a property has an 'items' list, then a 'minItems' or 'maxItems' with the
> same size as the list is redundant and can be dropped. Note that is DT
> schema specific behavior and not standard json-schema behavior. The tooling
> will fixup the final schema adding any unspecified minItems/maxItems.
>
> This condition is partially checked with the meta-schema already, but
> only if both 'minItems' and 'maxItems' are equal to the 'items' length.
> An improved meta-schema is pending.
> Signed-off-by: Rob Herring <robh@kernel.org>
> --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> @@ -46,7 +46,6 @@ properties:
>
> clocks:
> minItems: 3
> - maxItems: 5
> items:
> - description: GMAC main clock
> - description: MAC TX clock
While resolving the conflict with commit fea99822914039c6
("dt-bindings: net: document ptp_ref clk in dwmac") in soc/for-next,
I noticed the following construct for clock-names:
clock-names:
minItems: 3
maxItems: 6
contains:
enum:
- stmmaceth
- mac-clk-tx
- mac-clk-rx
- ethstp
- eth-ck
- ptp_ref
Should this use items instead of enum, and drop maxItems, or is this
a valid construct to support specifying the clocks in random order?
If the latter, it does mean that the order of clock-names may not
match the order of the clock descriptions.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2021-06-22 8:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 19:15 [PATCH] dt-bindings: Drop redundant minItems/maxItems Rob Herring
2021-06-16 6:05 ` Greg Kroah-Hartman
2021-06-16 10:34 ` Vinod Koul
2021-06-16 10:41 ` Marc Kleine-Budde
2021-06-16 11:04 ` Philipp Zabel
2021-06-16 11:23 ` Mark Brown
2021-06-16 12:29 ` Jonathan Cameron
2021-06-16 18:41 ` Wolfram Sang
2021-06-17 9:14 ` Ulf Hansson
2021-06-17 13:39 ` Jassi Brar
2021-06-17 16:05 ` Suman Anna
2021-06-17 22:16 ` Rob Herring
2021-06-18 8:32 ` Arnaud POULIQUEN
2021-06-22 8:17 ` Geert Uytterhoeven [this message]
2021-06-22 13:43 ` Rob Herring
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=CAMuHMdUGXu8yj3JWKwM8mt7axkrzGMiowC1t0PHrbpxRCBME3w@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=a.zummo@towertech.it \
--cc=airlied@linux.ie \
--cc=alexandre.belloni@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=andrew@lunn.ch \
--cc=aou@eecs.berkeley.edu \
--cc=axboe@kernel.dk \
--cc=bgolaszewski@baylibre.com \
--cc=bhelgaas@google.com \
--cc=broonie@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=daniel@ffwll.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=iommu@lists.linux-foundation.org \
--cc=jassisinghbrar@gmail.com \
--cc=jic23@kernel.org \
--cc=joro@8bytes.org \
--cc=kdasu.kdev@gmail.com \
--cc=kishon@ti.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=kuba@kernel.org \
--cc=lars@metafoo.de \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mathieu.poirier@linaro.org \
--cc=maz@kernel.org \
--cc=mchehab@kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=ohad@wizery.com \
--cc=olteanv@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
--cc=ulf.hansson@linaro.org \
--cc=vivien.didelot@gmail.com \
--cc=vkoul@kernel.org \
--cc=wg@grandegger.com \
--cc=wim@linux-watchdog.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).