From: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Drew Fustini <dfustini@baylibre.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Nishanth Menon <nm@ti.com>,
Santosh Shilimkar <ssantosh@kernel.org>,
Dave Gerlach <d-gerlach@ti.com>, Tony Lindgren <tony@atomide.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: wkup-m3-ipc: Add vtt toggle bindings
Date: Tue, 12 Apr 2022 11:09:14 -0500 [thread overview]
Message-ID: <YlWkKo2pKbH+F7NX@robh.at.kernel.org> (raw)
In-Reply-To: <c4536b89-4843-c669-e499-f82fa3fec7f8@linaro.org>
On Sat, Apr 09, 2022 at 06:25:24PM +0200, Krzysztof Kozlowski wrote:
> On 09/04/2022 06:51, Drew Fustini wrote:
> > Document the Wakeup M3 IPC properties that can be used to toggle the VTT
> > regulator during low power mode transitions.
> >
>
> (...)
>
> > @@ -51,6 +61,15 @@ properties:
> > mbox_wkupm3 child node.
> > maxItems: 1
> >
> > + ti,needs-vtt-toggle:
> > + type: boolean
> > + description: boards requires VTT toggling during suspend/resume
> > +
> > + ti,vtt-gpio-pin:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: pin on the GPIO0 module used for VTT toggle
> > + maxItems: 1
>
> No need for maxItems, it's a single uint32. You could add "maximum" if
> you know the constraints for the value.
Whenever I see the same problem repeated, I ask if we can catch with
meta-schema. Often we can, but we have to fix all the existing ones:
media/mediatek,vcodec-encoder.yaml: properties:mediatek,scp:maxItems: False schema does not allow 1
media/mediatek,vcodec-encoder.yaml: properties:mediatek,vpu:maxItems: False schema does not allow 1
remoteproc/qcom,sc7280-wpss-pil.yaml: properties:glink-edge:properties:qcom,remote-pid:maxItems: False schema does not allow 1
media/mediatek,vcodec-subdev-decoder.yaml: properties:mediatek,scp:maxItems: False schema does not allow 1
media/mediatek,vcodec-decoder.yaml: properties:mediatek,vpu:maxItems: False schema does not allow 1
media/mediatek,vcodec-decoder.yaml: properties:mediatek,scp:maxItems: False schema does not allow 1
media/coda.yaml: properties:iram:maxItems: False schema does not allow 1
display/panel/panel-timing.yaml: properties:vsync-len:oneOf:0:maxItems: False schema does not allow 1
display/panel/panel-timing.yaml: properties:vsync-len:oneOf:0:items: False schema does not allow {'description': 'typical number of lines'}
display/panel/panel-timing.yaml: properties:hfront-porch:oneOf:0:maxItems: False schema does not allow 1
display/panel/panel-timing.yaml: properties:hfront-porch:oneOf:0:items: False schema does not allow {'description': 'typical number of pixels'}
display/panel/panel-timing.yaml: properties:hback-porch:oneOf:0:maxItems: False schema does not allow 1
display/panel/panel-timing.yaml: properties:hback-porch:oneOf:0:items: False schema does not allow {'description': 'typical number of pixels'}
display/panel/panel-timing.yaml: properties:hsync-len:oneOf:0:maxItems: False schema does not allow 1
display/panel/panel-timing.yaml: properties:hsync-len:oneOf:0:items: False schema does not allow {'description': 'typical number of pixels'}
display/panel/panel-timing.yaml: properties:vfront-porch:oneOf:0:maxItems: False schema does not allow 1
display/panel/panel-timing.yaml: properties:vfront-porch:oneOf:0:items: False schema does not allow {'description': 'typical number of lines'}
display/panel/panel-timing.yaml: properties:vback-porch:oneOf:0:maxItems: False schema does not allow 1
display/panel/panel-timing.yaml: properties:vback-porch:oneOf:0:items: False schema does not allow {'description': 'typical number of lines'}
iio/adc/st,stm32-dfsdm-adc.yaml: patternProperties:^filter@[0-9]+$:properties:st,filter-order:items: False schema does not allow {'minimum': 0, 'maximum': 5}
spi/renesas,sh-msiof.yaml: properties:renesas,rx-fifo-size:maxItems: False schema does not allow 1
spi/renesas,sh-msiof.yaml: properties:renesas,tx-fifo-size:maxItems: False schema does not allow 1
hwmon/ti,tmp421.yaml: patternProperties:^channel@([0-3])$:properties:ti,n-factor:items: False schema does not allow {'minimum': 0, 'maximum': 255}
hwmon/ti,tmp464.yaml: patternProperties:^channel@([0-8])$:properties:ti,n-factor:items: False schema does not allow {'minimum': -128, 'maximum': 127}
I already have fixes for these.
FYI, the meta-schema change looks like this:
diff --git a/dtschema/meta-schemas/keywords.yaml b/dtschema/meta-schemas/keywords.yaml
index 6d6fdfd08d3b..73ed113aed3a 100644
--- a/dtschema/meta-schemas/keywords.yaml
+++ b/dtschema/meta-schemas/keywords.yaml
@@ -155,3 +155,17 @@ properties:
- type: boolean
uniqueItems:
type: boolean
+
+allOf:
+ - description: Scalar properties should not have array keywords
+ if:
+ properties:
+ $ref:
+ pattern: '(int[1-8]+|phandle|flag)$'
+ required:
+ - $ref
+ then:
+ properties:
+ maxItems: false
+ minItems: false
+ items: false
next prev parent reply other threads:[~2022-04-12 16:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-09 4:51 [PATCH 0/2] soc: ti: wkup_m3_ipc: support vtt toggle Drew Fustini
2022-04-09 4:51 ` [PATCH 1/2] dt-bindings: wkup-m3-ipc: Add vtt toggle bindings Drew Fustini
2022-04-09 16:25 ` Krzysztof Kozlowski
2022-04-09 20:37 ` Drew Fustini
2022-04-12 16:09 ` Rob Herring [this message]
2022-04-09 4:51 ` [PATCH 2/2] soc: ti: wkup_m3_ipc: Add support for toggling VTT regulator Drew Fustini
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=YlWkKo2pKbH+F7NX@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=d-gerlach@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=dfustini@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=ssantosh@kernel.org \
--cc=tony@atomide.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