2020-11-02 20:39:43

by Rob Herring (Arm)

[permalink] [raw]
Subject: [PATCH v3 0/3] dt-bindings: Convert graph bindings to json-schema

Sameer, I wanted to experiment with what the interface for graph users
looks like, so I've tweaked your patch a bit and converted 2 users.

This series converts the DT graph binding to a schema. Users of the graph
binding should reference the schema from 'ports' or 'port' node. Users
will still need to define what each port node is and any additional
properties that appear in port or endpoint nodes.

I'm still considering whether to apply graph.yaml to the dtschema repo
instead. Then I can sync adding it with a meta-schema update to check
for a reference.

Rob

Rob Herring (2):
dt-bindings: usb-connector: Add reference to graph schema
dt-bindings: panel: common: Add reference to graph schema

Sameer Pujar (1):
dt-bindings: Convert graph bindings to json-schema

.../bindings/connector/usb-connector.yaml | 10 +-
.../bindings/display/panel/panel-common.yaml | 7 +-
Documentation/devicetree/bindings/graph.txt | 129 +-----------
Documentation/devicetree/bindings/graph.yaml | 199 ++++++++++++++++++
4 files changed, 209 insertions(+), 136 deletions(-)
create mode 100644 Documentation/devicetree/bindings/graph.yaml

--
2.25.1


2020-11-02 20:40:02

by Rob Herring (Arm)

[permalink] [raw]
Subject: [PATCH v3 2/3] dt-bindings: usb-connector: Add reference to graph schema

Now that we have a graph schema, reference it from the usb-connector
schema.

Signed-off-by: Rob Herring <[email protected]>
---
v3: new patch

.../devicetree/bindings/connector/usb-connector.yaml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml
index 728f82db073d..64f2e1246ddb 100644
--- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
+++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
@@ -125,11 +125,13 @@ properties:
power dual role.

ports:
- description: OF graph bindings (specified in bindings/graph.txt) that model
- any data bus to the connector unless the bus is between parent node and
- the connector. Since a single connector can have multiple data buses every
- bus has an assigned OF graph port number as described below.
+ $ref: /schemas/graph.yaml#/properties/ports
type: object
+ description: OF graph bindings modeling any data bus to the connector
+ unless the bus is between parent node and the connector. Since a single
+ connector can have multiple data buses every bus has an assigned OF graph
+ port number as described below.
+
properties:
port@0:
type: object
--
2.25.1

2020-11-03 06:07:06

by Sameer Pujar

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] dt-bindings: Convert graph bindings to json-schema

Hi Rob,

> Sameer, I wanted to experiment with what the interface for graph users
> looks like, so I've tweaked your patch a bit and converted 2 users.

Thanks for the update and help.

2020-11-11 14:03:50

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH v3 2/3] dt-bindings: usb-connector: Add reference to graph schema

Hi Rob,

Thank you for the patch.

On Mon, Nov 02, 2020 at 02:36:55PM -0600, Rob Herring wrote:
> Now that we have a graph schema, reference it from the usb-connector
> schema.
>
> Signed-off-by: Rob Herring <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> v3: new patch
>
> .../devicetree/bindings/connector/usb-connector.yaml | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> index 728f82db073d..64f2e1246ddb 100644
> --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> @@ -125,11 +125,13 @@ properties:
> power dual role.
>
> ports:
> - description: OF graph bindings (specified in bindings/graph.txt) that model
> - any data bus to the connector unless the bus is between parent node and
> - the connector. Since a single connector can have multiple data buses every
> - bus has an assigned OF graph port number as described below.
> + $ref: /schemas/graph.yaml#/properties/ports
> type: object
> + description: OF graph bindings modeling any data bus to the connector
> + unless the bus is between parent node and the connector. Since a single
> + connector can have multiple data buses every bus has an assigned OF graph
> + port number as described below.
> +
> properties:
> port@0:
> type: object

--
Regards,

Laurent Pinchart