Skip to contentSkip to conversation

dt-bindings: mfd: google,cros-ec: Use unevaluatedProperties

PATCH In review Krzysztof Kozlowski 3 participants 4 messages Aug 31, 2020 – Sep 3, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: mfd: google,cros-ec: Use unevaluatedProperties

Additional properties or nodes actually might appear (e.g. wakeup) so use unevaluatedProperties to fix dtbs_check warnings like:

arch/arm/boot/dts/exynos5250-snow.dt.yaml: embedded-controller@1e:
'keyboard-controller', 'wakeup-source' do not match any of the regexes: 'pinctrl-[0-9]+'

---
 Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +1 -1
index 6a7279a85ec1..0586c5791cf6 100644
@@ -79,7 +79,7 @@ then:
     google,cros-ec-spi-msg-delay: false
     spi-max-frequency: false
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   # Example for I2C
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 dt-bindings: mmc: mmc-pwreq-simple: Accept more than one reset GPIO

There might be multiple reset GPIOs but dtschema has trouble parsing it if there are no maxItems:

arch/arm/boot/dts/exynos5250-snow.dt.yaml: mmc3_pwrseq: reset-gpios: [[20, 2, 1], [20, 1, 1]] is too long
From schema: Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml

---
 Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml +2 -0
index 449215444723..8d625f903856 100644
@@ -20,6 +20,8 @@ properties:
 
   reset-gpios:
     minItems: 1
+    # Put some limit to avoid false warnings
+    maxItems: 32
     description:
       contains a list of GPIO specifiers. The reset GPIOs are asserted
       at initialization and prior we start the power up procedure of the card.
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/2] dt-bindings: mmc: mmc-pwreq-simple: Accept more than one reset GPIO

Quoted 17 lines · Krzysztof Kozlowski

There might be multiple reset GPIOs but dtschema has trouble parsing it if there are no maxItems:

arch/arm/boot/dts/exynos5250-snow.dt.yaml: mmc3_pwrseq: reset-gpios: [[20, 2, 1], [20, 1, 1]] is too long
From schema: Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml

---
 Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml +0 -0
index 449215444723..8d625f903856 100644

Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml properties: · line 24

Quoted 5 lines
Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml +2 -0
@@ -20,6 +20,8 @@ properties:
 
   reset-gpios:
     minItems: 1
+    # Put some limit to avoid false warnings
+    maxItems: 32

Not sure what number to pick. I guess two should be enough, but on the other hand it doesn't really matter.

Quoted 6 lines
Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml +0 -1
     description:
       contains a list of GPIO specifiers. The reset GPIOs are asserted
       at initialization and prior we start the power up procedure of the card.
--

2.17.1

Applied for next, thanks!

Kind regards
Uffe

maintainer
#3 lore raw
In reply to Krzysztof Kozlowski
Quoted 10 lines · Krzysztof Kozlowski

Additional properties or nodes actually might appear (e.g. wakeup) so use unevaluatedProperties to fix dtbs_check warnings like:

arch/arm/boot/dts/exynos5250-snow.dt.yaml: embedded-controller@1e:
'keyboard-controller', 'wakeup-source' do not match any of the regexes: 'pinctrl-[0-9]+'

---
 Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

NAK. See https://lore.kernel.org/r/CAL_JsqKPXJxsHPS34_TCf9bwgKxZNSV4mvQR-WKRnknQVtGGxQ@mail.gmail.com/