diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2022-02-23 08:35:47 +0100 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2022-02-24 09:55:56 -0600 |
commit | 418adabeb3d048a4fd2575b8b96d0769c2fcd1c1 (patch) | |
tree | f9cc68973e49fc5ae831d7b0660729a9a45e3a15 /Documentation/devicetree/bindings/example-schema.yaml | |
parent | dt-bindings: writing-schema: Install from PyPI repository (diff) | |
download | linux-dev-418adabeb3d048a4fd2575b8b96d0769c2fcd1c1.tar.xz linux-dev-418adabeb3d048a4fd2575b8b96d0769c2fcd1c1.zip |
dt-bindings: example: Extend with typical case (int-array and disallowed prop)
Extend the example with:
- an array where each element has constraints (min/max value),
- property not allowed in case of different compatible.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220223073547.8746-2-krzysztof.kozlowski@canonical.com
Diffstat (limited to 'Documentation/devicetree/bindings/example-schema.yaml')
-rw-r--r-- | Documentation/devicetree/bindings/example-schema.yaml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/example-schema.yaml b/Documentation/devicetree/bindings/example-schema.yaml index c078796ae1b5..80a28781845d 100644 --- a/Documentation/devicetree/bindings/example-schema.yaml +++ b/Documentation/devicetree/bindings/example-schema.yaml @@ -162,6 +162,16 @@ properties: don't need a type. enum: [ 100, 200, 300 ] + vendor,int-array-variable-length-and-constrained-values: + description: Array might define what type of elements might be used (e.g. + their range). + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 3 + items: + minimum: 0 + maximum: 8 + child-node: description: Child nodes are just another property from a json-schema perspective. @@ -207,6 +217,10 @@ allOf: then: required: - foo-supply + else: + # If otherwise the property is not allowed: + properties: + foo-supply: false # Altering schema depending on presence of properties is usually done by # dependencies (see above), however some adjustments might require if: - if: |