* [PATCH 1/2] dt-bindings: writing-schema: Install from PyPI repository
@ 2022-02-23 7:35 Krzysztof Kozlowski
2022-02-23 7:35 ` [PATCH 2/2] dt-bindings: example: Extend with typical case (int-array and disallowed prop) Krzysztof Kozlowski
2022-02-24 15:55 ` [PATCH 1/2] dt-bindings: writing-schema: Install from PyPI repository Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-23 7:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel
Cc: Krzysztof Kozlowski, Marek Szyprowski
From: Krzysztof Kozlowski <krzk@kernel.org>
Installing dtschema from github.com/devicetree-org is not needed anymore
because dtschema is now part of regular PyPI repository. In certain
cases it might cause some troubles as it brings latest master version,
not the stable release:
$ pip3 show dtschema
Version: 2020.8.2.dev4+g341f3e3
$ make dt_binding_check
dtschema minimum version is v2020.8.1
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Documentation/devicetree/bindings/writing-schema.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/writing-schema.rst b/Documentation/devicetree/bindings/writing-schema.rst
index ea21c72aeb37..4004dd9209a6 100644
--- a/Documentation/devicetree/bindings/writing-schema.rst
+++ b/Documentation/devicetree/bindings/writing-schema.rst
@@ -118,7 +118,7 @@ The DT schema project must be installed in order to validate the DT schema
binding documents and validate DTS files using the DT schema. The DT schema
project can be installed with pip::
- pip3 install git+https://github.com/devicetree-org/dt-schema.git@master
+ pip3 install dtschema
Several executables (dt-doc-validate, dt-mk-schema, dt-validate) will be
installed. Ensure they are in your PATH (~/.local/bin by default).
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] dt-bindings: example: Extend with typical case (int-array and disallowed prop)
2022-02-23 7:35 [PATCH 1/2] dt-bindings: writing-schema: Install from PyPI repository Krzysztof Kozlowski
@ 2022-02-23 7:35 ` Krzysztof Kozlowski
2022-02-24 15:55 ` Rob Herring
2022-02-24 15:55 ` [PATCH 1/2] dt-bindings: writing-schema: Install from PyPI repository Rob Herring
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-23 7:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel
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>
---
.../devicetree/bindings/example-schema.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
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:
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: writing-schema: Install from PyPI repository
2022-02-23 7:35 [PATCH 1/2] dt-bindings: writing-schema: Install from PyPI repository Krzysztof Kozlowski
2022-02-23 7:35 ` [PATCH 2/2] dt-bindings: example: Extend with typical case (int-array and disallowed prop) Krzysztof Kozlowski
@ 2022-02-24 15:55 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2022-02-24 15:55 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Krzysztof Kozlowski, Marek Szyprowski, devicetree, linux-kernel,
Rob Herring
On Wed, 23 Feb 2022 08:35:46 +0100, Krzysztof Kozlowski wrote:
> From: Krzysztof Kozlowski <krzk@kernel.org>
>
> Installing dtschema from github.com/devicetree-org is not needed anymore
> because dtschema is now part of regular PyPI repository. In certain
> cases it might cause some troubles as it brings latest master version,
> not the stable release:
>
> $ pip3 show dtschema
> Version: 2020.8.2.dev4+g341f3e3
> $ make dt_binding_check
> dtschema minimum version is v2020.8.1
>
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> Documentation/devicetree/bindings/writing-schema.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] dt-bindings: example: Extend with typical case (int-array and disallowed prop)
2022-02-23 7:35 ` [PATCH 2/2] dt-bindings: example: Extend with typical case (int-array and disallowed prop) Krzysztof Kozlowski
@ 2022-02-24 15:55 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2022-02-24 15:55 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Rob Herring, linux-kernel, devicetree
On Wed, 23 Feb 2022 08:35:47 +0100, Krzysztof Kozlowski wrote:
> 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>
> ---
> .../devicetree/bindings/example-schema.yaml | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-24 15:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 7:35 [PATCH 1/2] dt-bindings: writing-schema: Install from PyPI repository Krzysztof Kozlowski
2022-02-23 7:35 ` [PATCH 2/2] dt-bindings: example: Extend with typical case (int-array and disallowed prop) Krzysztof Kozlowski
2022-02-24 15:55 ` Rob Herring
2022-02-24 15:55 ` [PATCH 1/2] dt-bindings: writing-schema: Install from PyPI repository Rob Herring
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).