Skip to contentSkip to conversation

dt-bindings: PCI: faraday,ftpci100: Fix 'contains' schema usage

PATCH In review Rob Herring 2 participants 2 messages Aug 17, 2021

Subsystems (3)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: PCI: faraday,ftpci100: Fix 'contains' schema usage

The 'contains' keyword applies to elements within an array, so using 'items' only makes sense if the elements of the array are another array which is not the case for 'compatible' properties.

Looking at the driver, it seems the intent was the condition should be true when 'faraday,ftpci100' is present, so we can drop 'cortina,gemini-pci'.

Fixes 2720b991337d ("dt-bindings: PCI: ftpci100: convert faraday,ftpci100 to YAML")
Cc Bjorn Helgaas <[email protected]>
Cc Linus Walleij <[email protected]>
---
 Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml +1 -3
index fb32f7b55035..92efbf0f1297 100644
@@ -113,9 +113,7 @@ if:
   properties:
     compatible:
       contains:
-        items:
-          - const: cortina,gemini-pci
-          - const: faraday,ftpci100
+        const: faraday,ftpci100
 then:
   required:
     - interrupt-controller
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Rob Herring

The 'contains' keyword applies to elements within an array, so using 'items' only makes sense if the elements of the array are another array which is not the case for 'compatible' properties.

Looking at the driver, it seems the intent was the condition should be true when 'faraday,ftpci100' is present, so we can drop 'cortina,gemini-pci'.

Quoted 5 lines
Fixes 2720b991337d ("dt-bindings: PCI: ftpci100: convert faraday,ftpci100 to YAML")
Cc Bjorn Helgaas <[email protected]>
Cc Linus Walleij <[email protected]>

Yours,
Linus Walleij