2019-06-24 22:10:03

by Rob Herring (Arm)

[permalink] [raw]
Subject: [PATCH v2 06/15] dt-bindings: display: Convert dlc,dlc0700yzg-1 panel to DT schema

Convert the dlc,dlc0700yzg-1 panel binding to DT schema.

Cc: Philipp Zabel <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: [email protected]
Signed-off-by: Rob Herring <[email protected]>
---
.../display/panel/dlc,dlc0700yzg-1.txt | 13 ---------
.../display/panel/dlc,dlc0700yzg-1.yaml | 28 +++++++++++++++++++
2 files changed, 28 insertions(+), 13 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt b/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
deleted file mode 100644
index bf06bb025b08..000000000000
--- a/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-DLC Display Co. DLC0700YZG-1 7.0" WSVGA TFT LCD panel
-
-Required properties:
-- compatible: should be "dlc,dlc0700yzg-1"
-- power-supply: See simple-panel.txt
-
-Optional properties:
-- reset-gpios: See panel-common.txt
-- enable-gpios: See simple-panel.txt
-- backlight: See simple-panel.txt
-
-This binding is compatible with the simple-panel binding, which is specified
-in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml b/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
new file mode 100644
index 000000000000..1b0b63d46f3e
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/dlc,dlc0700yzg-1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: DLC Display Co. DLC0700YZG-1 7.0" WSVGA TFT LCD panel
+
+maintainers:
+ - Philipp Zabel <[email protected]>
+ - Thierry Reding <[email protected]>
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ const: dlc,dlc0700yzg-1
+
+ reset-gpios: true
+ enable-gpios: true
+ backlight: true
+
+required:
+ - compatible
+ - power-supply
+
+...
--
2.20.1


2019-06-25 07:57:59

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v2 06/15] dt-bindings: display: Convert dlc,dlc0700yzg-1 panel to DT schema

Hi,

On Mon, Jun 24, 2019 at 03:56:40PM -0600, Rob Herring wrote:
> Convert the dlc,dlc0700yzg-1 panel binding to DT schema.
>
> Cc: Philipp Zabel <[email protected]>
> Cc: Thierry Reding <[email protected]>
> Cc: Sam Ravnborg <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: [email protected]
> Signed-off-by: Rob Herring <[email protected]>
> ---
> .../display/panel/dlc,dlc0700yzg-1.txt | 13 ---------
> .../display/panel/dlc,dlc0700yzg-1.yaml | 28 +++++++++++++++++++
> 2 files changed, 28 insertions(+), 13 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
> create mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
>
> diff --git a/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt b/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
> deleted file mode 100644
> index bf06bb025b08..000000000000
> --- a/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -DLC Display Co. DLC0700YZG-1 7.0" WSVGA TFT LCD panel
> -
> -Required properties:
> -- compatible: should be "dlc,dlc0700yzg-1"
> -- power-supply: See simple-panel.txt
> -
> -Optional properties:
> -- reset-gpios: See panel-common.txt
> -- enable-gpios: See simple-panel.txt
> -- backlight: See simple-panel.txt
> -
> -This binding is compatible with the simple-panel binding, which is specified
> -in simple-panel.txt in this directory.
> diff --git a/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml b/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
> new file mode 100644
> index 000000000000..1b0b63d46f3e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
> @@ -0,0 +1,28 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/dlc,dlc0700yzg-1.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: DLC Display Co. DLC0700YZG-1 7.0" WSVGA TFT LCD panel
> +
> +maintainers:
> + - Philipp Zabel <[email protected]>
> + - Thierry Reding <[email protected]>
> +
> +allOf:
> + - $ref: panel-common.yaml#
> +
> +properties:
> + compatible:
> + const: dlc,dlc0700yzg-1
> +
> + reset-gpios: true
> + enable-gpios: true
> + backlight: true

Do we need to list them?

Since we don't have additionalItems, it doesn't really change anything
since it will be validated by panel-common.

Either way, it should be consistent between your patches, and the
previous patches in this series didn't list all the properties in the
binding.

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Attachments:
(No filename) (2.88 kB)
signature.asc (235.00 B)
Download all attachments

2019-06-25 14:16:49

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 06/15] dt-bindings: display: Convert dlc,dlc0700yzg-1 panel to DT schema

On Tue, Jun 25, 2019 at 1:55 AM Maxime Ripard <[email protected]> wrote:
>
> Hi,
>
> On Mon, Jun 24, 2019 at 03:56:40PM -0600, Rob Herring wrote:
> > Convert the dlc,dlc0700yzg-1 panel binding to DT schema.
> >
> > Cc: Philipp Zabel <[email protected]>
> > Cc: Thierry Reding <[email protected]>
> > Cc: Sam Ravnborg <[email protected]>
> > Cc: Maxime Ripard <[email protected]>
> > Cc: Laurent Pinchart <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Rob Herring <[email protected]>
> > ---
> > .../display/panel/dlc,dlc0700yzg-1.txt | 13 ---------
> > .../display/panel/dlc,dlc0700yzg-1.yaml | 28 +++++++++++++++++++
> > 2 files changed, 28 insertions(+), 13 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
> > create mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt b/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
> > deleted file mode 100644
> > index bf06bb025b08..000000000000
> > --- a/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
> > +++ /dev/null
> > @@ -1,13 +0,0 @@
> > -DLC Display Co. DLC0700YZG-1 7.0" WSVGA TFT LCD panel
> > -
> > -Required properties:
> > -- compatible: should be "dlc,dlc0700yzg-1"
> > -- power-supply: See simple-panel.txt
> > -
> > -Optional properties:
> > -- reset-gpios: See panel-common.txt
> > -- enable-gpios: See simple-panel.txt
> > -- backlight: See simple-panel.txt
> > -
> > -This binding is compatible with the simple-panel binding, which is specified
> > -in simple-panel.txt in this directory.
> > diff --git a/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml b/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
> > new file mode 100644
> > index 000000000000..1b0b63d46f3e
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
> > @@ -0,0 +1,28 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/panel/dlc,dlc0700yzg-1.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: DLC Display Co. DLC0700YZG-1 7.0" WSVGA TFT LCD panel
> > +
> > +maintainers:
> > + - Philipp Zabel <[email protected]>
> > + - Thierry Reding <[email protected]>
> > +
> > +allOf:
> > + - $ref: panel-common.yaml#
> > +
> > +properties:
> > + compatible:
> > + const: dlc,dlc0700yzg-1
> > +
> > + reset-gpios: true
> > + enable-gpios: true
> > + backlight: true
>
> Do we need to list them?
>
> Since we don't have additionalItems, it doesn't really change anything
> since it will be validated by panel-common.

I've gone back and forth on it. I think we need to express what
properties from the common properties apply for a particular panel.
I've been requiring panel bindings to be explicit here rather than
just say "uses the simple-panel binding." For example, if
'power-supply' is not listed, does the panel have a single supply or
multiple supplies that haven't haven't been considered?

> Either way, it should be consistent between your patches, and the
> previous patches in this series didn't list all the properties in the
> binding.

Indeed.

Rob