devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
@ 2022-01-11 11:06 Maxime Ripard
  2022-01-11 11:06 ` [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding Maxime Ripard
  2022-01-11 13:02 ` [PATCH v3 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema Laurent Pinchart
  0 siblings, 2 replies; 12+ messages in thread
From: Maxime Ripard @ 2022-01-11 11:06 UTC (permalink / raw)
  To: Laurent Pinchart, Thierry Reding, Sam Ravnborg, Daniel Vetter,
	David Airlie, Rob Herring, Frank Rowand
  Cc: devicetree, dri-devel, Maxime Ripard, Rob Herring

The lvds.yaml file so far was both defining the generic LVDS properties
(such as data-mapping) that could be used for any LVDS sink, but also
the panel-lvds binding.

That last binding was to describe LVDS panels simple enough, and had a
number of other bindings using it as a base to specialise it further.

However, this situation makes it fairly hard to extend and reuse both
the generic parts, and the panel-lvds itself.

Let's remove the panel-lvds parts and leave only the generic LVDS
properties.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>

---

Changes from v2:
  - Fix references to that file

Changes from v1:
  - Moved the schema out of panel
---
 .../bindings/display/bridge/lvds-codec.yaml   |  2 +-
 .../bindings/display/{panel => }/lvds.yaml    | 31 ++-----------------
 .../display/panel/advantech,idk-1110wr.yaml   | 19 ++++++++++--
 .../display/panel/innolux,ee101ia-01d.yaml    | 23 ++++++++++++--
 .../display/panel/mitsubishi,aa104xd12.yaml   | 19 ++++++++++--
 .../display/panel/mitsubishi,aa121td01.yaml   | 19 ++++++++++--
 .../display/panel/sgd,gktw70sdae4se.yaml      | 19 ++++++++++--
 MAINTAINERS                                   |  2 +-
 8 files changed, 93 insertions(+), 41 deletions(-)
 rename Documentation/devicetree/bindings/display/{panel => }/lvds.yaml (86%)

diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
index 5079c1cc337b..27b905b81b12 100644
--- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
+++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
@@ -67,7 +67,7 @@ properties:
                   - vesa-24
                 description: |
                   The color signals mapping order. See details in
-                  Documentation/devicetree/bindings/display/panel/lvds.yaml
+                  Documentation/devicetree/bindings/display/lvds.yaml
 
       port@1:
         $ref: /schemas/graph.yaml#/properties/port
diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/lvds.yaml
similarity index 86%
rename from Documentation/devicetree/bindings/display/panel/lvds.yaml
rename to Documentation/devicetree/bindings/display/lvds.yaml
index 49460c9dceea..55751402fb13 100644
--- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
+++ b/Documentation/devicetree/bindings/display/lvds.yaml
@@ -1,10 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/display/panel/lvds.yaml#
+$id: http://devicetree.org/schemas/display/lvds.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: LVDS Display Panel
+title: LVDS Display Common Properties
 
 maintainers:
   - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
@@ -26,18 +26,7 @@ description: |+
   Device compatible with those specifications have been marketed under the
   FPD-Link and FlatLink brands.
 
-allOf:
-  - $ref: panel-common.yaml#
-
 properties:
-  compatible:
-    contains:
-      const: panel-lvds
-    description:
-      Shall contain "panel-lvds" in addition to a mandatory panel-specific
-      compatible string defined in individual panel bindings. The "panel-lvds"
-      value shall never be used on its own.
-
   data-mapping:
     enum:
       - jeida-18
@@ -96,22 +85,6 @@ properties:
       If set, reverse the bit order described in the data mappings below on all
       data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
 
-  port: true
-  ports: true
-
-required:
-  - compatible
-  - data-mapping
-  - width-mm
-  - height-mm
-  - panel-timing
-
-oneOf:
-  - required:
-      - port
-  - required:
-      - ports
-
 additionalProperties: true
 
 ...
diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
index 93878c2cd370..3a8c2c11f9bd 100644
--- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
+++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
-  - $ref: lvds.yaml#
+  - $ref: panel-common.yaml#
+  - $ref: /schemas/display/lvds.yaml/#
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: advantech,idk-1110wr
+
+  required:
+    - compatible
 
 properties:
   compatible:
     items:
       - const: advantech,idk-1110wr
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   data-mapping:
     const: jeida-24
@@ -35,6 +45,11 @@ additionalProperties: false
 
 required:
   - compatible
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
 
 examples:
   - |+
diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
index a69681e724cb..566e11f6bfc0 100644
--- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
+++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
@@ -11,15 +11,26 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
-  - $ref: lvds.yaml#
+  - $ref: panel-common.yaml#
+  - $ref: /schemas/display/lvds.yaml/#
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: innolux,ee101ia-01d
+
+  required:
+    - compatible
 
 properties:
   compatible:
     items:
       - const: innolux,ee101ia-01d
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   backlight: true
+  data-mapping: true
   enable-gpios: true
   power-supply: true
   width-mm: true
@@ -27,5 +38,13 @@ properties:
   panel-timing: true
   port: true
 
+required:
+  - compatible
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
+
 additionalProperties: false
 ...
diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
index b5e7ee230fa6..5cf3c588f46d 100644
--- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
+++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
-  - $ref: lvds.yaml#
+  - $ref: panel-common.yaml#
+  - $ref: /schemas/display/lvds.yaml/#
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: mitsubishi,aa104xd12
+
+  required:
+    - compatible
 
 properties:
   compatible:
     items:
       - const: mitsubishi,aa104xd12
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   vcc-supply:
     description: Reference to the regulator powering the panel VCC pins.
@@ -39,6 +49,11 @@ additionalProperties: false
 required:
   - compatible
   - vcc-supply
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
 
 examples:
   - |+
diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
index 977c50a85b67..54750cc5440d 100644
--- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
+++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
-  - $ref: lvds.yaml#
+  - $ref: panel-common.yaml#
+  - $ref: /schemas/display/lvds.yaml/#
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: mitsubishi,aa121td01
+
+  required:
+    - compatible
 
 properties:
   compatible:
     items:
       - const: mitsubishi,aa121td01
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   vcc-supply:
     description: Reference to the regulator powering the panel VCC pins.
@@ -39,6 +49,11 @@ additionalProperties: false
 required:
   - compatible
   - vcc-supply
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
 
 examples:
   - |+
diff --git a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
index e63a570ae59d..44e02decdf3a 100644
--- a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
+++ b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
-  - $ref: lvds.yaml#
+  - $ref: panel-common.yaml#
+  - $ref: /schemas/display/lvds.yaml/#
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: sgd,gktw70sdae4se
+
+  required:
+    - compatible
 
 properties:
   compatible:
     items:
       - const: sgd,gktw70sdae4se
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   data-mapping:
     const: jeida-18
@@ -35,6 +45,11 @@ additionalProperties: false
 
 required:
   - compatible
+  - port
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
 
 examples:
   - |+
diff --git a/MAINTAINERS b/MAINTAINERS
index 41d2916600e0..368072da0a05 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6079,7 +6079,7 @@ L:	dri-devel@lists.freedesktop.org
 T:	git git://anongit.freedesktop.org/drm/drm-misc
 S:	Maintained
 F:	drivers/gpu/drm/panel/panel-lvds.c
-F:	Documentation/devicetree/bindings/display/panel/lvds.yaml
+F:	Documentation/devicetree/bindings/display/lvds.yaml
 
 DRM DRIVER FOR MANTIX MLAF057WE51 PANELS
 M:	Guido Günther <agx@sigxcpu.org>
-- 
2.34.1


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

* [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-01-11 11:06 [PATCH v3 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema Maxime Ripard
@ 2022-01-11 11:06 ` Maxime Ripard
  2022-01-11 13:05   ` Laurent Pinchart
  2022-02-02  9:55   ` (subset) " Maxime Ripard
  2022-01-11 13:02 ` [PATCH v3 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema Laurent Pinchart
  1 sibling, 2 replies; 12+ messages in thread
From: Maxime Ripard @ 2022-01-11 11:06 UTC (permalink / raw)
  To: Laurent Pinchart, Thierry Reding, Sam Ravnborg, Daniel Vetter,
	David Airlie, Rob Herring, Frank Rowand
  Cc: devicetree, dri-devel, Maxime Ripard, Rob Herring

Following the previous patch, let's introduce a generic panel-lvds
binding that documents the panels that don't have any particular
constraint documented.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>

---

Changes from v2:
  - Added a MAINTAINERS entry

Changes from v1:
  - Added missing compatible
  - Fixed lint
---
 .../bindings/display/panel/panel-lvds.yaml    | 57 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
new file mode 100644
index 000000000000..fcc50db6a812
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic LVDS Display Panel Device Tree Bindings
+
+maintainers:
+  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
+  - Thierry Reding <thierry.reding@gmail.com>
+
+allOf:
+  - $ref: panel-common.yaml#
+  - $ref: /schemas/display/lvds.yaml/#
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: panel-lvds
+
+  not:
+    properties:
+      compatible:
+        contains:
+          enum:
+            - advantech,idk-1110wr
+            - advantech,idk-2121wr
+            - innolux,ee101ia-01d
+            - mitsubishi,aa104xd12
+            - mitsubishi,aa121td01
+            - sgd,gktw70sdae4se
+
+  required:
+    - compatible
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - auo,b101ew05
+          - tbs,a711-panel
+
+      - const: panel-lvds
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 368072da0a05..02001455949e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6080,6 +6080,7 @@ T:	git git://anongit.freedesktop.org/drm/drm-misc
 S:	Maintained
 F:	drivers/gpu/drm/panel/panel-lvds.c
 F:	Documentation/devicetree/bindings/display/lvds.yaml
+F:	Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
 
 DRM DRIVER FOR MANTIX MLAF057WE51 PANELS
 M:	Guido Günther <agx@sigxcpu.org>
-- 
2.34.1


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

* Re: [PATCH v3 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
  2022-01-11 11:06 [PATCH v3 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema Maxime Ripard
  2022-01-11 11:06 ` [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding Maxime Ripard
@ 2022-01-11 13:02 ` Laurent Pinchart
  1 sibling, 0 replies; 12+ messages in thread
From: Laurent Pinchart @ 2022-01-11 13:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel, Rob Herring

Hi Maxime,

Thank you for the patch.

On Tue, Jan 11, 2022 at 12:06:34PM +0100, Maxime Ripard wrote:
> The lvds.yaml file so far was both defining the generic LVDS properties
> (such as data-mapping) that could be used for any LVDS sink, but also
> the panel-lvds binding.
> 
> That last binding was to describe LVDS panels simple enough, and had a
> number of other bindings using it as a base to specialise it further.
> 
> However, this situation makes it fairly hard to extend and reuse both
> the generic parts, and the panel-lvds itself.
> 
> Let's remove the panel-lvds parts and leave only the generic LVDS
> properties.
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> 
> ---
> 
> Changes from v2:
>   - Fix references to that file
> 
> Changes from v1:
>   - Moved the schema out of panel
> ---
>  .../bindings/display/bridge/lvds-codec.yaml   |  2 +-
>  .../bindings/display/{panel => }/lvds.yaml    | 31 ++-----------------
>  .../display/panel/advantech,idk-1110wr.yaml   | 19 ++++++++++--
>  .../display/panel/innolux,ee101ia-01d.yaml    | 23 ++++++++++++--
>  .../display/panel/mitsubishi,aa104xd12.yaml   | 19 ++++++++++--
>  .../display/panel/mitsubishi,aa121td01.yaml   | 19 ++++++++++--
>  .../display/panel/sgd,gktw70sdae4se.yaml      | 19 ++++++++++--
>  MAINTAINERS                                   |  2 +-
>  8 files changed, 93 insertions(+), 41 deletions(-)
>  rename Documentation/devicetree/bindings/display/{panel => }/lvds.yaml (86%)
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> index 5079c1cc337b..27b905b81b12 100644
> --- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> +++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> @@ -67,7 +67,7 @@ properties:
>                    - vesa-24
>                  description: |
>                    The color signals mapping order. See details in
> -                  Documentation/devicetree/bindings/display/panel/lvds.yaml
> +                  Documentation/devicetree/bindings/display/lvds.yaml
>  
>        port@1:
>          $ref: /schemas/graph.yaml#/properties/port
> diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/lvds.yaml
> similarity index 86%
> rename from Documentation/devicetree/bindings/display/panel/lvds.yaml
> rename to Documentation/devicetree/bindings/display/lvds.yaml
> index 49460c9dceea..55751402fb13 100644
> --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
> +++ b/Documentation/devicetree/bindings/display/lvds.yaml
> @@ -1,10 +1,10 @@
>  # SPDX-License-Identifier: GPL-2.0
>  %YAML 1.2
>  ---
> -$id: http://devicetree.org/schemas/display/panel/lvds.yaml#
> +$id: http://devicetree.org/schemas/display/lvds.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
> -title: LVDS Display Panel
> +title: LVDS Display Common Properties
>  
>  maintainers:
>    - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> @@ -26,18 +26,7 @@ description: |+

The description mentions "This bindings supports display panels
compatible with the following specifications". This needs a small update
to avoid referring to panels.

With this updated,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>    Device compatible with those specifications have been marketed under the
>    FPD-Link and FlatLink brands.
>  
> -allOf:
> -  - $ref: panel-common.yaml#
> -
>  properties:
> -  compatible:
> -    contains:
> -      const: panel-lvds
> -    description:
> -      Shall contain "panel-lvds" in addition to a mandatory panel-specific
> -      compatible string defined in individual panel bindings. The "panel-lvds"
> -      value shall never be used on its own.
> -
>    data-mapping:
>      enum:
>        - jeida-18
> @@ -96,22 +85,6 @@ properties:
>        If set, reverse the bit order described in the data mappings below on all
>        data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
>  
> -  port: true
> -  ports: true
> -
> -required:
> -  - compatible
> -  - data-mapping
> -  - width-mm
> -  - height-mm
> -  - panel-timing
> -
> -oneOf:
> -  - required:
> -      - port
> -  - required:
> -      - ports
> -
>  additionalProperties: true
>  
>  ...
> diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> index 93878c2cd370..3a8c2c11f9bd 100644
> --- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> -  - $ref: lvds.yaml#
> +  - $ref: panel-common.yaml#
> +  - $ref: /schemas/display/lvds.yaml/#
> +
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: advantech,idk-1110wr
> +
> +  required:
> +    - compatible
>  
>  properties:
>    compatible:
>      items:
>        - const: advantech,idk-1110wr
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    data-mapping:
>      const: jeida-24
> @@ -35,6 +45,11 @@ additionalProperties: false
>  
>  required:
>    - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> index a69681e724cb..566e11f6bfc0 100644
> --- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> @@ -11,15 +11,26 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> -  - $ref: lvds.yaml#
> +  - $ref: panel-common.yaml#
> +  - $ref: /schemas/display/lvds.yaml/#
> +
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: innolux,ee101ia-01d
> +
> +  required:
> +    - compatible
>  
>  properties:
>    compatible:
>      items:
>        - const: innolux,ee101ia-01d
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    backlight: true
> +  data-mapping: true
>    enable-gpios: true
>    power-supply: true
>    width-mm: true
> @@ -27,5 +38,13 @@ properties:
>    panel-timing: true
>    port: true
>  
> +required:
> +  - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
> +
>  additionalProperties: false
>  ...
> diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
> index b5e7ee230fa6..5cf3c588f46d 100644
> --- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> -  - $ref: lvds.yaml#
> +  - $ref: panel-common.yaml#
> +  - $ref: /schemas/display/lvds.yaml/#
> +
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: mitsubishi,aa104xd12
> +
> +  required:
> +    - compatible
>  
>  properties:
>    compatible:
>      items:
>        - const: mitsubishi,aa104xd12
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    vcc-supply:
>      description: Reference to the regulator powering the panel VCC pins.
> @@ -39,6 +49,11 @@ additionalProperties: false
>  required:
>    - compatible
>    - vcc-supply
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
> index 977c50a85b67..54750cc5440d 100644
> --- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> -  - $ref: lvds.yaml#
> +  - $ref: panel-common.yaml#
> +  - $ref: /schemas/display/lvds.yaml/#
> +
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: mitsubishi,aa121td01
> +
> +  required:
> +    - compatible
>  
>  properties:
>    compatible:
>      items:
>        - const: mitsubishi,aa121td01
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    vcc-supply:
>      description: Reference to the regulator powering the panel VCC pins.
> @@ -39,6 +49,11 @@ additionalProperties: false
>  required:
>    - compatible
>    - vcc-supply
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
> index e63a570ae59d..44e02decdf3a 100644
> --- a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> -  - $ref: lvds.yaml#
> +  - $ref: panel-common.yaml#
> +  - $ref: /schemas/display/lvds.yaml/#
> +
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: sgd,gktw70sdae4se
> +
> +  required:
> +    - compatible
>  
>  properties:
>    compatible:
>      items:
>        - const: sgd,gktw70sdae4se
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    data-mapping:
>      const: jeida-18
> @@ -35,6 +45,11 @@ additionalProperties: false
>  
>  required:
>    - compatible
> +  - port
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
>  
>  examples:
>    - |+
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 41d2916600e0..368072da0a05 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -6079,7 +6079,7 @@ L:	dri-devel@lists.freedesktop.org
>  T:	git git://anongit.freedesktop.org/drm/drm-misc
>  S:	Maintained
>  F:	drivers/gpu/drm/panel/panel-lvds.c
> -F:	Documentation/devicetree/bindings/display/panel/lvds.yaml
> +F:	Documentation/devicetree/bindings/display/lvds.yaml
>  
>  DRM DRIVER FOR MANTIX MLAF057WE51 PANELS
>  M:	Guido Günther <agx@sigxcpu.org>

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-01-11 11:06 ` [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding Maxime Ripard
@ 2022-01-11 13:05   ` Laurent Pinchart
  2022-01-27 14:22     ` Maxime Ripard
  2022-02-02  9:55   ` (subset) " Maxime Ripard
  1 sibling, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2022-01-11 13:05 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel, Rob Herring

Hi Maxime,

Thank you for the patch.

On Tue, Jan 11, 2022 at 12:06:35PM +0100, Maxime Ripard wrote:
> Following the previous patch, let's introduce a generic panel-lvds
> binding that documents the panels that don't have any particular
> constraint documented.
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> 
> ---
> 
> Changes from v2:
>   - Added a MAINTAINERS entry
> 
> Changes from v1:
>   - Added missing compatible
>   - Fixed lint
> ---
>  .../bindings/display/panel/panel-lvds.yaml    | 57 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 58 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> new file mode 100644
> index 000000000000..fcc50db6a812
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> @@ -0,0 +1,57 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic LVDS Display Panel Device Tree Bindings
> +
> +maintainers:
> +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> +  - Thierry Reding <thierry.reding@gmail.com>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +  - $ref: /schemas/display/lvds.yaml/#
> +
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: panel-lvds
> +
> +  not:
> +    properties:
> +      compatible:
> +        contains:
> +          enum:
> +            - advantech,idk-1110wr
> +            - advantech,idk-2121wr
> +            - innolux,ee101ia-01d
> +            - mitsubishi,aa104xd12
> +            - mitsubishi,aa121td01
> +            - sgd,gktw70sdae4se

I still don't like this :-( Couldn't we instead do

select:
  properties:
    compatible:
      contains:
        enum:
          - auo,b101ew05
          - tbs,a711-panel

?

> +
> +  required:
> +    - compatible
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - auo,b101ew05
> +          - tbs,a711-panel
> +
> +      - const: panel-lvds
> +
> +unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
> +
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 368072da0a05..02001455949e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -6080,6 +6080,7 @@ T:	git git://anongit.freedesktop.org/drm/drm-misc
>  S:	Maintained
>  F:	drivers/gpu/drm/panel/panel-lvds.c
>  F:	Documentation/devicetree/bindings/display/lvds.yaml
> +F:	Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
>  
>  DRM DRIVER FOR MANTIX MLAF057WE51 PANELS
>  M:	Guido Günther <agx@sigxcpu.org>

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-01-11 13:05   ` Laurent Pinchart
@ 2022-01-27 14:22     ` Maxime Ripard
  2022-02-02  9:48       ` Maxime Ripard
  0 siblings, 1 reply; 12+ messages in thread
From: Maxime Ripard @ 2022-01-27 14:22 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel, Rob Herring

[-- Attachment #1: Type: text/plain, Size: 2468 bytes --]

Hi Laurent,

On Tue, Jan 11, 2022 at 03:05:10PM +0200, Laurent Pinchart wrote:
> On Tue, Jan 11, 2022 at 12:06:35PM +0100, Maxime Ripard wrote:
> > Following the previous patch, let's introduce a generic panel-lvds
> > binding that documents the panels that don't have any particular
> > constraint documented.
> > 
> > Reviewed-by: Rob Herring <robh@kernel.org>
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > 
> > ---
> > 
> > Changes from v2:
> >   - Added a MAINTAINERS entry
> > 
> > Changes from v1:
> >   - Added missing compatible
> >   - Fixed lint
> > ---
> >  .../bindings/display/panel/panel-lvds.yaml    | 57 +++++++++++++++++++
> >  MAINTAINERS                                   |  1 +
> >  2 files changed, 58 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > new file mode 100644
> > index 000000000000..fcc50db6a812
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > @@ -0,0 +1,57 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Generic LVDS Display Panel Device Tree Bindings
> > +
> > +maintainers:
> > +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > +  - Thierry Reding <thierry.reding@gmail.com>
> > +
> > +allOf:
> > +  - $ref: panel-common.yaml#
> > +  - $ref: /schemas/display/lvds.yaml/#
> > +
> > +select:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        const: panel-lvds
> > +
> > +  not:
> > +    properties:
> > +      compatible:
> > +        contains:
> > +          enum:
> > +            - advantech,idk-1110wr
> > +            - advantech,idk-2121wr
> > +            - innolux,ee101ia-01d
> > +            - mitsubishi,aa104xd12
> > +            - mitsubishi,aa121td01
> > +            - sgd,gktw70sdae4se
> 
> I still don't like this :-( Couldn't we instead do
> 
> select:
>   properties:
>     compatible:
>       contains:
>         enum:
>           - auo,b101ew05
>           - tbs,a711-panel
> 
> ?

That works too, I'll send another version.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-01-27 14:22     ` Maxime Ripard
@ 2022-02-02  9:48       ` Maxime Ripard
  2022-02-02 12:47         ` Laurent Pinchart
  0 siblings, 1 reply; 12+ messages in thread
From: Maxime Ripard @ 2022-02-02  9:48 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel, Rob Herring

[-- Attachment #1: Type: text/plain, Size: 2984 bytes --]

On Thu, Jan 27, 2022 at 03:22:15PM +0100, Maxime Ripard wrote:
> Hi Laurent,
> 
> On Tue, Jan 11, 2022 at 03:05:10PM +0200, Laurent Pinchart wrote:
> > On Tue, Jan 11, 2022 at 12:06:35PM +0100, Maxime Ripard wrote:
> > > Following the previous patch, let's introduce a generic panel-lvds
> > > binding that documents the panels that don't have any particular
> > > constraint documented.
> > > 
> > > Reviewed-by: Rob Herring <robh@kernel.org>
> > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > 
> > > ---
> > > 
> > > Changes from v2:
> > >   - Added a MAINTAINERS entry
> > > 
> > > Changes from v1:
> > >   - Added missing compatible
> > >   - Fixed lint
> > > ---
> > >  .../bindings/display/panel/panel-lvds.yaml    | 57 +++++++++++++++++++
> > >  MAINTAINERS                                   |  1 +
> > >  2 files changed, 58 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > 
> > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > new file mode 100644
> > > index 000000000000..fcc50db6a812
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > @@ -0,0 +1,57 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Generic LVDS Display Panel Device Tree Bindings
> > > +
> > > +maintainers:
> > > +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > +  - Thierry Reding <thierry.reding@gmail.com>
> > > +
> > > +allOf:
> > > +  - $ref: panel-common.yaml#
> > > +  - $ref: /schemas/display/lvds.yaml/#
> > > +
> > > +select:
> > > +  properties:
> > > +    compatible:
> > > +      contains:
> > > +        const: panel-lvds
> > > +
> > > +  not:
> > > +    properties:
> > > +      compatible:
> > > +        contains:
> > > +          enum:
> > > +            - advantech,idk-1110wr
> > > +            - advantech,idk-2121wr
> > > +            - innolux,ee101ia-01d
> > > +            - mitsubishi,aa104xd12
> > > +            - mitsubishi,aa121td01
> > > +            - sgd,gktw70sdae4se
> > 
> > I still don't like this :-( Couldn't we instead do
> > 
> > select:
> >   properties:
> >     compatible:
> >       contains:
> >         enum:
> >           - auo,b101ew05
> >           - tbs,a711-panel
> > 
> > ?
> 
> That works too, I'll send another version.

Actually, no, it doesn't work.

If we do this, if we were to have a panel that has panel-lvds but none
of the other compatible (because of a typo, or downright invalid
binding) we won't validate it and report any error.

I'll merge this version (together with the v4 version of patch 1)

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: (subset) [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-01-11 11:06 ` [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding Maxime Ripard
  2022-01-11 13:05   ` Laurent Pinchart
@ 2022-02-02  9:55   ` Maxime Ripard
  1 sibling, 0 replies; 12+ messages in thread
From: Maxime Ripard @ 2022-02-02  9:55 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Sam Ravnborg, David Airlie,
	Maxime Ripard, Daniel Vetter, Laurent Pinchart, Thierry Reding
  Cc: dri-devel, devicetree, Rob Herring

On Tue, 11 Jan 2022 12:06:35 +0100, Maxime Ripard wrote:
> Following the previous patch, let's introduce a generic panel-lvds
> binding that documents the panels that don't have any particular
> constraint documented.
> 
> 

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime

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

* Re: [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-02-02  9:48       ` Maxime Ripard
@ 2022-02-02 12:47         ` Laurent Pinchart
  2022-02-02 13:16           ` Maxime Ripard
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2022-02-02 12:47 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel, Rob Herring

Hi Maxime,

On Wed, Feb 02, 2022 at 10:48:45AM +0100, Maxime Ripard wrote:
> On Thu, Jan 27, 2022 at 03:22:15PM +0100, Maxime Ripard wrote:
> > On Tue, Jan 11, 2022 at 03:05:10PM +0200, Laurent Pinchart wrote:
> > > On Tue, Jan 11, 2022 at 12:06:35PM +0100, Maxime Ripard wrote:
> > > > Following the previous patch, let's introduce a generic panel-lvds
> > > > binding that documents the panels that don't have any particular
> > > > constraint documented.
> > > > 
> > > > Reviewed-by: Rob Herring <robh@kernel.org>
> > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > 
> > > > ---
> > > > 
> > > > Changes from v2:
> > > >   - Added a MAINTAINERS entry
> > > > 
> > > > Changes from v1:
> > > >   - Added missing compatible
> > > >   - Fixed lint
> > > > ---
> > > >  .../bindings/display/panel/panel-lvds.yaml    | 57 +++++++++++++++++++
> > > >  MAINTAINERS                                   |  1 +
> > > >  2 files changed, 58 insertions(+)
> > > >  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > new file mode 100644
> > > > index 000000000000..fcc50db6a812
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > @@ -0,0 +1,57 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: Generic LVDS Display Panel Device Tree Bindings
> > > > +
> > > > +maintainers:
> > > > +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > > +  - Thierry Reding <thierry.reding@gmail.com>
> > > > +
> > > > +allOf:
> > > > +  - $ref: panel-common.yaml#
> > > > +  - $ref: /schemas/display/lvds.yaml/#
> > > > +
> > > > +select:
> > > > +  properties:
> > > > +    compatible:
> > > > +      contains:
> > > > +        const: panel-lvds
> > > > +
> > > > +  not:
> > > > +    properties:
> > > > +      compatible:
> > > > +        contains:
> > > > +          enum:
> > > > +            - advantech,idk-1110wr
> > > > +            - advantech,idk-2121wr
> > > > +            - innolux,ee101ia-01d
> > > > +            - mitsubishi,aa104xd12
> > > > +            - mitsubishi,aa121td01
> > > > +            - sgd,gktw70sdae4se
> > > 
> > > I still don't like this :-( Couldn't we instead do
> > > 
> > > select:
> > >   properties:
> > >     compatible:
> > >       contains:
> > >         enum:
> > >           - auo,b101ew05
> > >           - tbs,a711-panel
> > > 
> > > ?
> > 
> > That works too, I'll send another version.
> 
> Actually, no, it doesn't work.
> 
> If we do this, if we were to have a panel that has panel-lvds but none
> of the other compatible (because of a typo, or downright invalid
> binding) we won't validate it and report any error.
> 
> I'll merge this version (together with the v4 version of patch 1)

I'm sorry but I *really* *really* dislike this. Having to list all other
compatible values in this file is a sign that something is wrong in the
validation infrastructure. People will forget to update it when adding
new bindings, and will get confused by the result. If I were a
maintainer for DT bindings I'd nack this.

If a DT has panel-lvds and no other compatible string, or invalid ones,
won't the validation report that the compatible isn't understood ? I
think that would be enough.

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-02-02 12:47         ` Laurent Pinchart
@ 2022-02-02 13:16           ` Maxime Ripard
  2022-02-02 13:21             ` Laurent Pinchart
  0 siblings, 1 reply; 12+ messages in thread
From: Maxime Ripard @ 2022-02-02 13:16 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel, Rob Herring

On Wed, Feb 02, 2022 at 02:47:14PM +0200, Laurent Pinchart wrote:
> On Wed, Feb 02, 2022 at 10:48:45AM +0100, Maxime Ripard wrote:
> > On Thu, Jan 27, 2022 at 03:22:15PM +0100, Maxime Ripard wrote:
> > > On Tue, Jan 11, 2022 at 03:05:10PM +0200, Laurent Pinchart wrote:
> > > > On Tue, Jan 11, 2022 at 12:06:35PM +0100, Maxime Ripard wrote:
> > > > > Following the previous patch, let's introduce a generic panel-lvds
> > > > > binding that documents the panels that don't have any particular
> > > > > constraint documented.
> > > > > 
> > > > > Reviewed-by: Rob Herring <robh@kernel.org>
> > > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > > 
> > > > > ---
> > > > > 
> > > > > Changes from v2:
> > > > >   - Added a MAINTAINERS entry
> > > > > 
> > > > > Changes from v1:
> > > > >   - Added missing compatible
> > > > >   - Fixed lint
> > > > > ---
> > > > >  .../bindings/display/panel/panel-lvds.yaml    | 57 +++++++++++++++++++
> > > > >  MAINTAINERS                                   |  1 +
> > > > >  2 files changed, 58 insertions(+)
> > > > >  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > 
> > > > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > new file mode 100644
> > > > > index 000000000000..fcc50db6a812
> > > > > --- /dev/null
> > > > > +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > @@ -0,0 +1,57 @@
> > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > > +%YAML 1.2
> > > > > +---
> > > > > +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > +
> > > > > +title: Generic LVDS Display Panel Device Tree Bindings
> > > > > +
> > > > > +maintainers:
> > > > > +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > > > +  - Thierry Reding <thierry.reding@gmail.com>
> > > > > +
> > > > > +allOf:
> > > > > +  - $ref: panel-common.yaml#
> > > > > +  - $ref: /schemas/display/lvds.yaml/#
> > > > > +
> > > > > +select:
> > > > > +  properties:
> > > > > +    compatible:
> > > > > +      contains:
> > > > > +        const: panel-lvds
> > > > > +
> > > > > +  not:
> > > > > +    properties:
> > > > > +      compatible:
> > > > > +        contains:
> > > > > +          enum:
> > > > > +            - advantech,idk-1110wr
> > > > > +            - advantech,idk-2121wr
> > > > > +            - innolux,ee101ia-01d
> > > > > +            - mitsubishi,aa104xd12
> > > > > +            - mitsubishi,aa121td01
> > > > > +            - sgd,gktw70sdae4se
> > > > 
> > > > I still don't like this :-( Couldn't we instead do
> > > > 
> > > > select:
> > > >   properties:
> > > >     compatible:
> > > >       contains:
> > > >         enum:
> > > >           - auo,b101ew05
> > > >           - tbs,a711-panel
> > > > 
> > > > ?
> > > 
> > > That works too, I'll send another version.
> > 
> > Actually, no, it doesn't work.
> > 
> > If we do this, if we were to have a panel that has panel-lvds but none
> > of the other compatible (because of a typo, or downright invalid
> > binding) we won't validate it and report any error.
> > 
> > I'll merge this version (together with the v4 version of patch 1)
> 
> I'm sorry but I *really* *really* dislike this. Having to list all other
> compatible values in this file is a sign that something is wrong in the
> validation infrastructure. People will forget to update it when adding
> new bindings, and will get confused by the result. If I were a
> maintainer for DT bindings I'd nack this.

The validation infrastructure is what it is, and we can't change that.
Rewriting one from scratch isn't reasonable either. That being said, the
*only* case where this has been a problem are the panels because there's
so many pointless schemas which should really be a single schema.

That's the root cause.

I tried to merge all of them, but once again panels seem to be special,
and it was shot down. So be it. But at the end of the day, there's not a
lot of solutions to do what we are doing for every other case out there.

> If a DT has panel-lvds and no other compatible string, or invalid ones,
> won't the validation report that the compatible isn't understood ? I
> think that would be enough.

That's just worse. How would you not get confused if there's an error
that the compatible isn't documented, you search for it, and it's
actually documented there?

We really have two solutions:

  - Either we merge all the panel-lvds schemas in one,

  - Or we have this.

The first was shot down, only the latter remains.

Maxime

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

* Re: [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-02-02 13:16           ` Maxime Ripard
@ 2022-02-02 13:21             ` Laurent Pinchart
  2022-02-02 13:43               ` Maxime Ripard
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2022-02-02 13:21 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel, Rob Herring

On Wed, Feb 02, 2022 at 02:16:23PM +0100, Maxime Ripard wrote:
> On Wed, Feb 02, 2022 at 02:47:14PM +0200, Laurent Pinchart wrote:
> > On Wed, Feb 02, 2022 at 10:48:45AM +0100, Maxime Ripard wrote:
> > > On Thu, Jan 27, 2022 at 03:22:15PM +0100, Maxime Ripard wrote:
> > > > On Tue, Jan 11, 2022 at 03:05:10PM +0200, Laurent Pinchart wrote:
> > > > > On Tue, Jan 11, 2022 at 12:06:35PM +0100, Maxime Ripard wrote:
> > > > > > Following the previous patch, let's introduce a generic panel-lvds
> > > > > > binding that documents the panels that don't have any particular
> > > > > > constraint documented.
> > > > > > 
> > > > > > Reviewed-by: Rob Herring <robh@kernel.org>
> > > > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > > > 
> > > > > > ---
> > > > > > 
> > > > > > Changes from v2:
> > > > > >   - Added a MAINTAINERS entry
> > > > > > 
> > > > > > Changes from v1:
> > > > > >   - Added missing compatible
> > > > > >   - Fixed lint
> > > > > > ---
> > > > > >  .../bindings/display/panel/panel-lvds.yaml    | 57 +++++++++++++++++++
> > > > > >  MAINTAINERS                                   |  1 +
> > > > > >  2 files changed, 58 insertions(+)
> > > > > >  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > > 
> > > > > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > > new file mode 100644
> > > > > > index 000000000000..fcc50db6a812
> > > > > > --- /dev/null
> > > > > > +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > > @@ -0,0 +1,57 @@
> > > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > > > +%YAML 1.2
> > > > > > +---
> > > > > > +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > > +
> > > > > > +title: Generic LVDS Display Panel Device Tree Bindings
> > > > > > +
> > > > > > +maintainers:
> > > > > > +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > > > > +  - Thierry Reding <thierry.reding@gmail.com>
> > > > > > +
> > > > > > +allOf:
> > > > > > +  - $ref: panel-common.yaml#
> > > > > > +  - $ref: /schemas/display/lvds.yaml/#
> > > > > > +
> > > > > > +select:
> > > > > > +  properties:
> > > > > > +    compatible:
> > > > > > +      contains:
> > > > > > +        const: panel-lvds
> > > > > > +
> > > > > > +  not:
> > > > > > +    properties:
> > > > > > +      compatible:
> > > > > > +        contains:
> > > > > > +          enum:
> > > > > > +            - advantech,idk-1110wr
> > > > > > +            - advantech,idk-2121wr
> > > > > > +            - innolux,ee101ia-01d
> > > > > > +            - mitsubishi,aa104xd12
> > > > > > +            - mitsubishi,aa121td01
> > > > > > +            - sgd,gktw70sdae4se
> > > > > 
> > > > > I still don't like this :-( Couldn't we instead do
> > > > > 
> > > > > select:
> > > > >   properties:
> > > > >     compatible:
> > > > >       contains:
> > > > >         enum:
> > > > >           - auo,b101ew05
> > > > >           - tbs,a711-panel
> > > > > 
> > > > > ?
> > > > 
> > > > That works too, I'll send another version.
> > > 
> > > Actually, no, it doesn't work.
> > > 
> > > If we do this, if we were to have a panel that has panel-lvds but none
> > > of the other compatible (because of a typo, or downright invalid
> > > binding) we won't validate it and report any error.
> > > 
> > > I'll merge this version (together with the v4 version of patch 1)
> > 
> > I'm sorry but I *really* *really* dislike this. Having to list all other
> > compatible values in this file is a sign that something is wrong in the
> > validation infrastructure. People will forget to update it when adding
> > new bindings, and will get confused by the result. If I were a
> > maintainer for DT bindings I'd nack this.
> 
> The validation infrastructure is what it is, and we can't change that.
> Rewriting one from scratch isn't reasonable either. That being said, the
> *only* case where this has been a problem are the panels because there's
> so many pointless schemas which should really be a single schema.
> 
> That's the root cause.
> 
> I tried to merge all of them, but once again panels seem to be special,
> and it was shot down. So be it. But at the end of the day, there's not a
> lot of solutions to do what we are doing for every other case out there.
> 
> > If a DT has panel-lvds and no other compatible string, or invalid ones,
> > won't the validation report that the compatible isn't understood ? I
> > think that would be enough.
> 
> That's just worse. How would you not get confused if there's an error
> that the compatible isn't documented, you search for it, and it's
> actually documented there?

Is that any different than a binding that would have

properties:
  compatible:
    items:
      enum:
        - foo,bar
        - foo,baz
      const: foo,base

and a device tree that would set compatible = "foo,base"; ? This type of
binding is very common, and I haven't heard anyone complaining that the
resulting validation error is an issue.

> We really have two solutions:
> 
>   - Either we merge all the panel-lvds schemas in one,
> 
>   - Or we have this.
> 
> The first was shot down, only the latter remains.

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-02-02 13:21             ` Laurent Pinchart
@ 2022-02-02 13:43               ` Maxime Ripard
  2022-02-02 13:50                 ` Laurent Pinchart
  0 siblings, 1 reply; 12+ messages in thread
From: Maxime Ripard @ 2022-02-02 13:43 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel, Rob Herring

On Wed, Feb 02, 2022 at 03:21:05PM +0200, Laurent Pinchart wrote:
> On Wed, Feb 02, 2022 at 02:16:23PM +0100, Maxime Ripard wrote:
> > On Wed, Feb 02, 2022 at 02:47:14PM +0200, Laurent Pinchart wrote:
> > > On Wed, Feb 02, 2022 at 10:48:45AM +0100, Maxime Ripard wrote:
> > > > On Thu, Jan 27, 2022 at 03:22:15PM +0100, Maxime Ripard wrote:
> > > > > On Tue, Jan 11, 2022 at 03:05:10PM +0200, Laurent Pinchart wrote:
> > > > > > On Tue, Jan 11, 2022 at 12:06:35PM +0100, Maxime Ripard wrote:
> > > > > > > Following the previous patch, let's introduce a generic panel-lvds
> > > > > > > binding that documents the panels that don't have any particular
> > > > > > > constraint documented.
> > > > > > > 
> > > > > > > Reviewed-by: Rob Herring <robh@kernel.org>
> > > > > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > > > > 
> > > > > > > ---
> > > > > > > 
> > > > > > > Changes from v2:
> > > > > > >   - Added a MAINTAINERS entry
> > > > > > > 
> > > > > > > Changes from v1:
> > > > > > >   - Added missing compatible
> > > > > > >   - Fixed lint
> > > > > > > ---
> > > > > > >  .../bindings/display/panel/panel-lvds.yaml    | 57 +++++++++++++++++++
> > > > > > >  MAINTAINERS                                   |  1 +
> > > > > > >  2 files changed, 58 insertions(+)
> > > > > > >  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > > > 
> > > > > > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > > > new file mode 100644
> > > > > > > index 000000000000..fcc50db6a812
> > > > > > > --- /dev/null
> > > > > > > +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > > > @@ -0,0 +1,57 @@
> > > > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > > > > +%YAML 1.2
> > > > > > > +---
> > > > > > > +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > > > +
> > > > > > > +title: Generic LVDS Display Panel Device Tree Bindings
> > > > > > > +
> > > > > > > +maintainers:
> > > > > > > +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > > > > > +  - Thierry Reding <thierry.reding@gmail.com>
> > > > > > > +
> > > > > > > +allOf:
> > > > > > > +  - $ref: panel-common.yaml#
> > > > > > > +  - $ref: /schemas/display/lvds.yaml/#
> > > > > > > +
> > > > > > > +select:
> > > > > > > +  properties:
> > > > > > > +    compatible:
> > > > > > > +      contains:
> > > > > > > +        const: panel-lvds
> > > > > > > +
> > > > > > > +  not:
> > > > > > > +    properties:
> > > > > > > +      compatible:
> > > > > > > +        contains:
> > > > > > > +          enum:
> > > > > > > +            - advantech,idk-1110wr
> > > > > > > +            - advantech,idk-2121wr
> > > > > > > +            - innolux,ee101ia-01d
> > > > > > > +            - mitsubishi,aa104xd12
> > > > > > > +            - mitsubishi,aa121td01
> > > > > > > +            - sgd,gktw70sdae4se
> > > > > > 
> > > > > > I still don't like this :-( Couldn't we instead do
> > > > > > 
> > > > > > select:
> > > > > >   properties:
> > > > > >     compatible:
> > > > > >       contains:
> > > > > >         enum:
> > > > > >           - auo,b101ew05
> > > > > >           - tbs,a711-panel
> > > > > > 
> > > > > > ?
> > > > > 
> > > > > That works too, I'll send another version.
> > > > 
> > > > Actually, no, it doesn't work.
> > > > 
> > > > If we do this, if we were to have a panel that has panel-lvds but none
> > > > of the other compatible (because of a typo, or downright invalid
> > > > binding) we won't validate it and report any error.
> > > > 
> > > > I'll merge this version (together with the v4 version of patch 1)
> > > 
> > > I'm sorry but I *really* *really* dislike this. Having to list all other
> > > compatible values in this file is a sign that something is wrong in the
> > > validation infrastructure. People will forget to update it when adding
> > > new bindings, and will get confused by the result. If I were a
> > > maintainer for DT bindings I'd nack this.
> > 
> > The validation infrastructure is what it is, and we can't change that.
> > Rewriting one from scratch isn't reasonable either. That being said, the
> > *only* case where this has been a problem are the panels because there's
> > so many pointless schemas which should really be a single schema.
> > 
> > That's the root cause.
> > 
> > I tried to merge all of them, but once again panels seem to be special,
> > and it was shot down. So be it. But at the end of the day, there's not a
> > lot of solutions to do what we are doing for every other case out there.
> > 
> > > If a DT has panel-lvds and no other compatible string, or invalid ones,
> > > won't the validation report that the compatible isn't understood ? I
> > > think that would be enough.
> > 
> > That's just worse. How would you not get confused if there's an error
> > that the compatible isn't documented, you search for it, and it's
> > actually documented there?
> 
> Is that any different than a binding that would have
> 
> properties:
>   compatible:
>     items:
>       enum:
>         - foo,bar
>         - foo,baz
>       const: foo,base
> 
> and a device tree that would set compatible = "foo,base"; ? This type of
> binding is very common, and I haven't heard anyone complaining that the
> resulting validation error is an issue.

That works indeed, but it's not what panel-lvds is doing. For some
reason, instead of that enum, we need multiple schemas, one for each
combination. And this is why we need that select clause, to work around
that decision.

Maxime

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

* Re: [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2022-02-02 13:43               ` Maxime Ripard
@ 2022-02-02 13:50                 ` Laurent Pinchart
  0 siblings, 0 replies; 12+ messages in thread
From: Laurent Pinchart @ 2022-02-02 13:50 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel, Rob Herring

On Wed, Feb 02, 2022 at 02:43:12PM +0100, Maxime Ripard wrote:
> On Wed, Feb 02, 2022 at 03:21:05PM +0200, Laurent Pinchart wrote:
> > On Wed, Feb 02, 2022 at 02:16:23PM +0100, Maxime Ripard wrote:
> > > On Wed, Feb 02, 2022 at 02:47:14PM +0200, Laurent Pinchart wrote:
> > > > On Wed, Feb 02, 2022 at 10:48:45AM +0100, Maxime Ripard wrote:
> > > > > On Thu, Jan 27, 2022 at 03:22:15PM +0100, Maxime Ripard wrote:
> > > > > > On Tue, Jan 11, 2022 at 03:05:10PM +0200, Laurent Pinchart wrote:
> > > > > > > On Tue, Jan 11, 2022 at 12:06:35PM +0100, Maxime Ripard wrote:
> > > > > > > > Following the previous patch, let's introduce a generic panel-lvds
> > > > > > > > binding that documents the panels that don't have any particular
> > > > > > > > constraint documented.
> > > > > > > > 
> > > > > > > > Reviewed-by: Rob Herring <robh@kernel.org>
> > > > > > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > > > > > 
> > > > > > > > ---
> > > > > > > > 
> > > > > > > > Changes from v2:
> > > > > > > >   - Added a MAINTAINERS entry
> > > > > > > > 
> > > > > > > > Changes from v1:
> > > > > > > >   - Added missing compatible
> > > > > > > >   - Fixed lint
> > > > > > > > ---
> > > > > > > >  .../bindings/display/panel/panel-lvds.yaml    | 57 +++++++++++++++++++
> > > > > > > >  MAINTAINERS                                   |  1 +
> > > > > > > >  2 files changed, 58 insertions(+)
> > > > > > > >  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > > > > 
> > > > > > > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > > > > new file mode 100644
> > > > > > > > index 000000000000..fcc50db6a812
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> > > > > > > > @@ -0,0 +1,57 @@
> > > > > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > > > > > +%YAML 1.2
> > > > > > > > +---
> > > > > > > > +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > > > > +
> > > > > > > > +title: Generic LVDS Display Panel Device Tree Bindings
> > > > > > > > +
> > > > > > > > +maintainers:
> > > > > > > > +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > > > > > > +  - Thierry Reding <thierry.reding@gmail.com>
> > > > > > > > +
> > > > > > > > +allOf:
> > > > > > > > +  - $ref: panel-common.yaml#
> > > > > > > > +  - $ref: /schemas/display/lvds.yaml/#
> > > > > > > > +
> > > > > > > > +select:
> > > > > > > > +  properties:
> > > > > > > > +    compatible:
> > > > > > > > +      contains:
> > > > > > > > +        const: panel-lvds
> > > > > > > > +
> > > > > > > > +  not:
> > > > > > > > +    properties:
> > > > > > > > +      compatible:
> > > > > > > > +        contains:
> > > > > > > > +          enum:
> > > > > > > > +            - advantech,idk-1110wr
> > > > > > > > +            - advantech,idk-2121wr
> > > > > > > > +            - innolux,ee101ia-01d
> > > > > > > > +            - mitsubishi,aa104xd12
> > > > > > > > +            - mitsubishi,aa121td01
> > > > > > > > +            - sgd,gktw70sdae4se
> > > > > > > 
> > > > > > > I still don't like this :-( Couldn't we instead do
> > > > > > > 
> > > > > > > select:
> > > > > > >   properties:
> > > > > > >     compatible:
> > > > > > >       contains:
> > > > > > >         enum:
> > > > > > >           - auo,b101ew05
> > > > > > >           - tbs,a711-panel
> > > > > > > 
> > > > > > > ?
> > > > > > 
> > > > > > That works too, I'll send another version.
> > > > > 
> > > > > Actually, no, it doesn't work.
> > > > > 
> > > > > If we do this, if we were to have a panel that has panel-lvds but none
> > > > > of the other compatible (because of a typo, or downright invalid
> > > > > binding) we won't validate it and report any error.
> > > > > 
> > > > > I'll merge this version (together with the v4 version of patch 1)
> > > > 
> > > > I'm sorry but I *really* *really* dislike this. Having to list all other
> > > > compatible values in this file is a sign that something is wrong in the
> > > > validation infrastructure. People will forget to update it when adding
> > > > new bindings, and will get confused by the result. If I were a
> > > > maintainer for DT bindings I'd nack this.
> > > 
> > > The validation infrastructure is what it is, and we can't change that.
> > > Rewriting one from scratch isn't reasonable either. That being said, the
> > > *only* case where this has been a problem are the panels because there's
> > > so many pointless schemas which should really be a single schema.
> > > 
> > > That's the root cause.
> > > 
> > > I tried to merge all of them, but once again panels seem to be special,
> > > and it was shot down. So be it. But at the end of the day, there's not a
> > > lot of solutions to do what we are doing for every other case out there.
> > > 
> > > > If a DT has panel-lvds and no other compatible string, or invalid ones,
> > > > won't the validation report that the compatible isn't understood ? I
> > > > think that would be enough.
> > > 
> > > That's just worse. How would you not get confused if there's an error
> > > that the compatible isn't documented, you search for it, and it's
> > > actually documented there?
> > 
> > Is that any different than a binding that would have
> > 
> > properties:
> >   compatible:
> >     items:
> >       enum:
> >         - foo,bar
> >         - foo,baz
> >       const: foo,base
> > 
> > and a device tree that would set compatible = "foo,base"; ? This type of
> > binding is very common, and I haven't heard anyone complaining that the
> > resulting validation error is an issue.
> 
> That works indeed, but it's not what panel-lvds is doing. For some
> reason, instead of that enum, we need multiple schemas, one for each
> combination. And this is why we need that select clause, to work around
> that decision.

I get that, but unless I'm mistaken, you concern with

select:
  properties:
    compatible:
      contains:
        enum:
          - auo,b101ew05
          - tbs,a711-panel

is that it will result in skipping validation silently (until all nodes
are required to be validated) if a DT contains compatible =
"aou,b101ew05", "panel-lvds". Don't we also get the same problem with
compatible = "foo,bat", "foo,base" ? How do the two issues differ ?

-- 
Regards,

Laurent Pinchart

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

end of thread, other threads:[~2022-02-02 13:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 11:06 [PATCH v3 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema Maxime Ripard
2022-01-11 11:06 ` [PATCH v3 2/2] dt-bindings: panel: Introduce a panel-lvds binding Maxime Ripard
2022-01-11 13:05   ` Laurent Pinchart
2022-01-27 14:22     ` Maxime Ripard
2022-02-02  9:48       ` Maxime Ripard
2022-02-02 12:47         ` Laurent Pinchart
2022-02-02 13:16           ` Maxime Ripard
2022-02-02 13:21             ` Laurent Pinchart
2022-02-02 13:43               ` Maxime Ripard
2022-02-02 13:50                 ` Laurent Pinchart
2022-02-02  9:55   ` (subset) " Maxime Ripard
2022-01-11 13:02 ` [PATCH v3 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema Laurent Pinchart

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).