All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: display: panel: add common definition of ports
@ 2023-04-16 15:39 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-16 15:39 UTC (permalink / raw)
  To: Neil Armstrong, Sam Ravnborg, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski, Thierry Reding,
	Laurent Pinchart, dri-devel, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, Konrad Dybcio

Few panel bindings for dual-link connections just type "ports: true",
which does not enforce any type.  Add common definition of ports, so the
type will be fixed.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
index 5b38dc89cb21..ad62d34e6fa3 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
@@ -70,6 +70,16 @@ properties:
   port:
     $ref: /schemas/graph.yaml#/properties/port
 
+  # For dual-link connections
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+    patternProperties:
+      "^port@[0-9a-f]+$":
+        $ref: /schemas/graph.yaml#/$defs/port-base
+
+    required:
+      - port@0
+
   ddc-i2c-bus:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
@@ -154,6 +164,12 @@ dependencies:
   width-mm: [ height-mm ]
   height-mm: [ width-mm ]
 
+allOf:
+  - not:
+      required:
+        - port
+        - ports
+
 additionalProperties: true
 
 ...
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] dt-bindings: display: panel: add common definition of ports
@ 2023-04-16 15:39 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-16 15:39 UTC (permalink / raw)
  To: Neil Armstrong, Sam Ravnborg, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski, Thierry Reding,
	Laurent Pinchart, dri-devel, devicetree, linux-kernel
  Cc: Konrad Dybcio, Krzysztof Kozlowski

Few panel bindings for dual-link connections just type "ports: true",
which does not enforce any type.  Add common definition of ports, so the
type will be fixed.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
index 5b38dc89cb21..ad62d34e6fa3 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
@@ -70,6 +70,16 @@ properties:
   port:
     $ref: /schemas/graph.yaml#/properties/port
 
+  # For dual-link connections
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+    patternProperties:
+      "^port@[0-9a-f]+$":
+        $ref: /schemas/graph.yaml#/$defs/port-base
+
+    required:
+      - port@0
+
   ddc-i2c-bus:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
@@ -154,6 +164,12 @@ dependencies:
   width-mm: [ height-mm ]
   height-mm: [ width-mm ]
 
+allOf:
+  - not:
+      required:
+        - port
+        - ports
+
 additionalProperties: true
 
 ...
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] dt-bindings: display: panel: add common definition of ports
  2023-04-16 15:39 ` Krzysztof Kozlowski
  (?)
@ 2023-04-17  7:20 ` Konrad Dybcio
  -1 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-04-17  7:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Neil Armstrong, Sam Ravnborg, David Airlie,
	Daniel Vetter, Rob Herring, Krzysztof Kozlowski, Thierry Reding,
	Laurent Pinchart, dri-devel, devicetree, linux-kernel



On 16.04.2023 17:39, Krzysztof Kozlowski wrote:
> Few panel bindings for dual-link connections just type "ports: true",
> which does not enforce any type.  Add common definition of ports, so the
> type will be fixed.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
> 
> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> index 5b38dc89cb21..ad62d34e6fa3 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> @@ -70,6 +70,16 @@ properties:
>    port:
>      $ref: /schemas/graph.yaml#/properties/port
>  
> +  # For dual-link connections
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    patternProperties:
> +      "^port@[0-9a-f]+$":
> +        $ref: /schemas/graph.yaml#/$defs/port-base
> +
> +    required:
> +      - port@0
> +
>    ddc-i2c-bus:
>      $ref: /schemas/types.yaml#/definitions/phandle
>      description:
> @@ -154,6 +164,12 @@ dependencies:
>    width-mm: [ height-mm ]
>    height-mm: [ width-mm ]
>  
> +allOf:
> +  - not:
> +      required:
> +        - port
> +        - ports
> +
>  additionalProperties: true
>  
>  ...

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dt-bindings: display: panel: add common definition of ports
  2023-04-16 15:39 ` Krzysztof Kozlowski
  (?)
  (?)
@ 2023-04-17  7:24 ` Neil Armstrong
  -1 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2023-04-17  7:24 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Sam Ravnborg, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski, Thierry Reding,
	Laurent Pinchart, dri-devel, devicetree, linux-kernel
  Cc: Konrad Dybcio

On 16/04/2023 17:39, Krzysztof Kozlowski wrote:
> Few panel bindings for dual-link connections just type "ports: true",
> which does not enforce any type.  Add common definition of ports, so the
> type will be fixed.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>   .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> index 5b38dc89cb21..ad62d34e6fa3 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> @@ -70,6 +70,16 @@ properties:
>     port:
>       $ref: /schemas/graph.yaml#/properties/port
>   
> +  # For dual-link connections
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    patternProperties:
> +      "^port@[0-9a-f]+$":
> +        $ref: /schemas/graph.yaml#/$defs/port-base
> +
> +    required:
> +      - port@0
> +
>     ddc-i2c-bus:
>       $ref: /schemas/types.yaml#/definitions/phandle
>       description:
> @@ -154,6 +164,12 @@ dependencies:
>     width-mm: [ height-mm ]
>     height-mm: [ width-mm ]
>   
> +allOf:
> +  - not:
> +      required:
> +        - port
> +        - ports
> +
>   additionalProperties: true
>   
>   ...

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dt-bindings: display: panel: add common definition of ports
  2023-04-16 15:39 ` Krzysztof Kozlowski
@ 2023-04-18 22:26   ` Rob Herring
  -1 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2023-04-18 22:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Neil Armstrong, Sam Ravnborg, David Airlie, Daniel Vetter,
	Krzysztof Kozlowski, Thierry Reding, Laurent Pinchart, dri-devel,
	devicetree, linux-kernel, Konrad Dybcio

On Sun, Apr 16, 2023 at 05:39:29PM +0200, Krzysztof Kozlowski wrote:
> Few panel bindings for dual-link connections just type "ports: true",
> which does not enforce any type.  Add common definition of ports, so the
> type will be fixed.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> index 5b38dc89cb21..ad62d34e6fa3 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> @@ -70,6 +70,16 @@ properties:
>    port:
>      $ref: /schemas/graph.yaml#/properties/port
>  
> +  # For dual-link connections
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    patternProperties:
> +      "^port@[0-9a-f]+$":
> +        $ref: /schemas/graph.yaml#/$defs/port-base

This allows any undocumented property.

> +
> +    required:
> +      - port@0
> +

I don't think this should be added here because users must define what 
each port is. With it here, we're going to validate the nodes twice as 
well. Same can be said for 'port' though. It can't be extended though.

I originally wanted to a do a meta-schema to enforce some of this, but 
there's just too many exceptions.

Rob

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dt-bindings: display: panel: add common definition of ports
@ 2023-04-18 22:26   ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2023-04-18 22:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Neil Armstrong, Laurent Pinchart, devicetree, Sam Ravnborg,
	linux-kernel, dri-devel, Konrad Dybcio, Thierry Reding,
	Krzysztof Kozlowski

On Sun, Apr 16, 2023 at 05:39:29PM +0200, Krzysztof Kozlowski wrote:
> Few panel bindings for dual-link connections just type "ports: true",
> which does not enforce any type.  Add common definition of ports, so the
> type will be fixed.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> index 5b38dc89cb21..ad62d34e6fa3 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> @@ -70,6 +70,16 @@ properties:
>    port:
>      $ref: /schemas/graph.yaml#/properties/port
>  
> +  # For dual-link connections
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    patternProperties:
> +      "^port@[0-9a-f]+$":
> +        $ref: /schemas/graph.yaml#/$defs/port-base

This allows any undocumented property.

> +
> +    required:
> +      - port@0
> +

I don't think this should be added here because users must define what 
each port is. With it here, we're going to validate the nodes twice as 
well. Same can be said for 'port' though. It can't be extended though.

I originally wanted to a do a meta-schema to enforce some of this, but 
there's just too many exceptions.

Rob

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dt-bindings: display: panel: add common definition of ports
  2023-04-18 22:26   ` Rob Herring
@ 2023-04-19  8:56     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-19  8:56 UTC (permalink / raw)
  To: Rob Herring
  Cc: Neil Armstrong, Sam Ravnborg, David Airlie, Daniel Vetter,
	Krzysztof Kozlowski, Thierry Reding, Laurent Pinchart, dri-devel,
	devicetree, linux-kernel, Konrad Dybcio

On 19/04/2023 00:26, Rob Herring wrote:
> On Sun, Apr 16, 2023 at 05:39:29PM +0200, Krzysztof Kozlowski wrote:
>> Few panel bindings for dual-link connections just type "ports: true",
>> which does not enforce any type.  Add common definition of ports, so the
>> type will be fixed.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
>>  1 file changed, 16 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
>> index 5b38dc89cb21..ad62d34e6fa3 100644
>> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
>> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
>> @@ -70,6 +70,16 @@ properties:
>>    port:
>>      $ref: /schemas/graph.yaml#/properties/port
>>  
>> +  # For dual-link connections
>> +  ports:
>> +    $ref: /schemas/graph.yaml#/properties/ports
>> +    patternProperties:
>> +      "^port@[0-9a-f]+$":
>> +        $ref: /schemas/graph.yaml#/$defs/port-base
> 
> This allows any undocumented property.

Yes, which I hope the device schema (using this panel-common) will
narrow with additionalProperties: false.

I can make it explicit: additionalProperties: true.

Otherwise, how do I allow custom properties like:
Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml

> 
>> +
>> +    required:
>> +      - port@0
>> +
> 
> I don't think this should be added here because users must define what 
> each port is. With it here, we're going to validate the nodes twice as 
> well. Same can be said for 'port' though. It can't be extended though.

So you propose to drop entire "ports" here and expect every panel schema
to define it instead?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dt-bindings: display: panel: add common definition of ports
@ 2023-04-19  8:56     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-19  8:56 UTC (permalink / raw)
  To: Rob Herring
  Cc: Neil Armstrong, Laurent Pinchart, devicetree, Sam Ravnborg,
	linux-kernel, dri-devel, Konrad Dybcio, Thierry Reding,
	Krzysztof Kozlowski

On 19/04/2023 00:26, Rob Herring wrote:
> On Sun, Apr 16, 2023 at 05:39:29PM +0200, Krzysztof Kozlowski wrote:
>> Few panel bindings for dual-link connections just type "ports: true",
>> which does not enforce any type.  Add common definition of ports, so the
>> type will be fixed.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
>>  1 file changed, 16 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
>> index 5b38dc89cb21..ad62d34e6fa3 100644
>> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
>> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
>> @@ -70,6 +70,16 @@ properties:
>>    port:
>>      $ref: /schemas/graph.yaml#/properties/port
>>  
>> +  # For dual-link connections
>> +  ports:
>> +    $ref: /schemas/graph.yaml#/properties/ports
>> +    patternProperties:
>> +      "^port@[0-9a-f]+$":
>> +        $ref: /schemas/graph.yaml#/$defs/port-base
> 
> This allows any undocumented property.

Yes, which I hope the device schema (using this panel-common) will
narrow with additionalProperties: false.

I can make it explicit: additionalProperties: true.

Otherwise, how do I allow custom properties like:
Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml

> 
>> +
>> +    required:
>> +      - port@0
>> +
> 
> I don't think this should be added here because users must define what 
> each port is. With it here, we're going to validate the nodes twice as 
> well. Same can be said for 'port' though. It can't be extended though.

So you propose to drop entire "ports" here and expect every panel schema
to define it instead?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dt-bindings: display: panel: add common definition of ports
  2023-04-19  8:56     ` Krzysztof Kozlowski
@ 2023-04-20 16:09       ` Rob Herring
  -1 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2023-04-20 16:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Neil Armstrong, Sam Ravnborg, David Airlie, Daniel Vetter,
	Krzysztof Kozlowski, Thierry Reding, Laurent Pinchart, dri-devel,
	devicetree, linux-kernel, Konrad Dybcio

On Wed, Apr 19, 2023 at 10:56:55AM +0200, Krzysztof Kozlowski wrote:
> On 19/04/2023 00:26, Rob Herring wrote:
> > On Sun, Apr 16, 2023 at 05:39:29PM +0200, Krzysztof Kozlowski wrote:
> >> Few panel bindings for dual-link connections just type "ports: true",
> >> which does not enforce any type.  Add common definition of ports, so the
> >> type will be fixed.
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>
> >> ---
> >>
> >> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> >> ---
> >>  .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
> >>  1 file changed, 16 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> >> index 5b38dc89cb21..ad62d34e6fa3 100644
> >> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> >> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> >> @@ -70,6 +70,16 @@ properties:
> >>    port:
> >>      $ref: /schemas/graph.yaml#/properties/port
> >>  
> >> +  # For dual-link connections
> >> +  ports:
> >> +    $ref: /schemas/graph.yaml#/properties/ports
> >> +    patternProperties:
> >> +      "^port@[0-9a-f]+$":
> >> +        $ref: /schemas/graph.yaml#/$defs/port-base
> > 
> > This allows any undocumented property.
> 
> Yes, which I hope the device schema (using this panel-common) will
> narrow with additionalProperties: false.
> 
> I can make it explicit: additionalProperties: true.
> 
> Otherwise, how do I allow custom properties like:
> Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml
> 
> > 
> >> +
> >> +    required:
> >> +      - port@0
> >> +
> > 
> > I don't think this should be added here because users must define what 
> > each port is. With it here, we're going to validate the nodes twice as 
> > well. Same can be said for 'port' though. It can't be extended though.
> 
> So you propose to drop entire "ports" here and expect every panel schema
> to define it instead?

Only those with more than 1 port or extra port/endpoint properties. If 
neither of those are true, then they can use just 'port'. Otherwise, 
all those panel bindings already have to define the port nodes already.

Rob

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dt-bindings: display: panel: add common definition of ports
@ 2023-04-20 16:09       ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2023-04-20 16:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Neil Armstrong, Laurent Pinchart, devicetree, Sam Ravnborg,
	linux-kernel, dri-devel, Konrad Dybcio, Thierry Reding,
	Krzysztof Kozlowski

On Wed, Apr 19, 2023 at 10:56:55AM +0200, Krzysztof Kozlowski wrote:
> On 19/04/2023 00:26, Rob Herring wrote:
> > On Sun, Apr 16, 2023 at 05:39:29PM +0200, Krzysztof Kozlowski wrote:
> >> Few panel bindings for dual-link connections just type "ports: true",
> >> which does not enforce any type.  Add common definition of ports, so the
> >> type will be fixed.
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>
> >> ---
> >>
> >> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> >> ---
> >>  .../bindings/display/panel/panel-common.yaml     | 16 ++++++++++++++++
> >>  1 file changed, 16 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> >> index 5b38dc89cb21..ad62d34e6fa3 100644
> >> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> >> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> >> @@ -70,6 +70,16 @@ properties:
> >>    port:
> >>      $ref: /schemas/graph.yaml#/properties/port
> >>  
> >> +  # For dual-link connections
> >> +  ports:
> >> +    $ref: /schemas/graph.yaml#/properties/ports
> >> +    patternProperties:
> >> +      "^port@[0-9a-f]+$":
> >> +        $ref: /schemas/graph.yaml#/$defs/port-base
> > 
> > This allows any undocumented property.
> 
> Yes, which I hope the device schema (using this panel-common) will
> narrow with additionalProperties: false.
> 
> I can make it explicit: additionalProperties: true.
> 
> Otherwise, how do I allow custom properties like:
> Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml
> 
> > 
> >> +
> >> +    required:
> >> +      - port@0
> >> +
> > 
> > I don't think this should be added here because users must define what 
> > each port is. With it here, we're going to validate the nodes twice as 
> > well. Same can be said for 'port' though. It can't be extended though.
> 
> So you propose to drop entire "ports" here and expect every panel schema
> to define it instead?

Only those with more than 1 port or extra port/endpoint properties. If 
neither of those are true, then they can use just 'port'. Otherwise, 
all those panel bindings already have to define the port nodes already.

Rob

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-04-20 16:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-16 15:39 [PATCH] dt-bindings: display: panel: add common definition of ports Krzysztof Kozlowski
2023-04-16 15:39 ` Krzysztof Kozlowski
2023-04-17  7:20 ` Konrad Dybcio
2023-04-17  7:24 ` Neil Armstrong
2023-04-18 22:26 ` Rob Herring
2023-04-18 22:26   ` Rob Herring
2023-04-19  8:56   ` Krzysztof Kozlowski
2023-04-19  8:56     ` Krzysztof Kozlowski
2023-04-20 16:09     ` Rob Herring
2023-04-20 16:09       ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.