Message ID | 20200408195109.32692-2-sam@ravnborg.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | dt-bindings: display: convert remaning panel bindings to DT Schema | expand |
On Wed, Apr 8, 2020 at 1:51 PM Sam Ravnborg <sam@ravnborg.org> wrote: > > Both port and ports names may be used. > port - for a single port > ports - if there is more than one port in sub-nodes > > Fixes the following warning: > advantech,idk-2121wr.example.dt.yaml: panel-lvds: 'port' is a required property > > advantech,idk-2121wr.yaml needs several ports, so uses a ports node. > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > Cc: Fabrizio Castro <fabrizio.castro@bp.renesas.com> > Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > Cc: Thierry Reding <thierry.reding@gmail.com> > Cc: Sam Ravnborg <sam@ravnborg.org> > --- > Documentation/devicetree/bindings/display/panel/lvds.yaml | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml > index d0083301acbe..f9132d50821c 100644 > --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml > +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml > @@ -102,6 +102,12 @@ required: > - width-mm > - height-mm > - panel-timing > - - port > + > +if: > + required: > + - port > +else: > + required: > + - ports Humm, I guess 'then' is not required. That's a bit weird IMO. I usually do a 'oneOf' for these cases. Either way, please apply this to drm-misc-fixes (or drm-misc-next-fixes depending on the state of the tree). Or I can take it. I'd like to get all the warnings cleared up by rc2. Reviewed-by: Rob Herring <robh@kernel.org> Rob
Hi Sam, Thank you for the patch. On Wed, Apr 8, 2020 at 10:37 PM Sam Ravnborg <sam@ravnborg.org> wrote: > > Both port and ports names may be used. > port - for a single port > ports - if there is more than one port in sub-nodes > > Fixes the following warning: > advantech,idk-2121wr.example.dt.yaml: panel-lvds: 'port' is a required property > > advantech,idk-2121wr.yaml needs several ports, so uses a ports node. > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > Cc: Fabrizio Castro <fabrizio.castro@bp.renesas.com> > Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > Cc: Thierry Reding <thierry.reding@gmail.com> > Cc: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Cheers, --Prabhakar > --- > Documentation/devicetree/bindings/display/panel/lvds.yaml | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml > index d0083301acbe..f9132d50821c 100644 > --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml > +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml > @@ -102,6 +102,12 @@ required: > - width-mm > - height-mm > - panel-timing > - - port > + > +if: > + required: > + - port > +else: > + required: > + - ports > > ... > -- > 2.20.1 >
Hi Rob. On Thu, Apr 09, 2020 at 10:11:10AM -0600, Rob Herring wrote: > On Wed, Apr 8, 2020 at 1:51 PM Sam Ravnborg <sam@ravnborg.org> wrote: > > > > Both port and ports names may be used. > > port - for a single port > > ports - if there is more than one port in sub-nodes > > > > Fixes the following warning: > > advantech,idk-2121wr.example.dt.yaml: panel-lvds: 'port' is a required property > > > > advantech,idk-2121wr.yaml needs several ports, so uses a ports node. > > > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > > Cc: Fabrizio Castro <fabrizio.castro@bp.renesas.com> > > Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Cc: Thierry Reding <thierry.reding@gmail.com> > > Cc: Sam Ravnborg <sam@ravnborg.org> > > --- > > Documentation/devicetree/bindings/display/panel/lvds.yaml | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml > > index d0083301acbe..f9132d50821c 100644 > > --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml > > +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml > > @@ -102,6 +102,12 @@ required: > > - width-mm > > - height-mm > > - panel-timing > > - - port > > + > > +if: > > + required: > > + - port > > +else: > > + required: > > + - ports > > Humm, I guess 'then' is not required. That's a bit weird IMO. > > I usually do a 'oneOf' for these cases. For the record, I re-did this patch using oneOf - much nicer. And since the patch was re-written I dropped you r-b. > > Either way, please apply this to drm-misc-fixes (or > drm-misc-next-fixes depending on the state of the tree). Or I can take > it. I'd like to get all the warnings cleared up by rc2. Will take care after -rc1 is out. Needs drm-fixes to be updated with -rc1 first. Will make sure to cover all bindings warnigns in panel/ Sam > > Reviewed-by: Rob Herring <robh@kernel.org> > > Rob > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml index d0083301acbe..f9132d50821c 100644 --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml @@ -102,6 +102,12 @@ required: - width-mm - height-mm - panel-timing - - port + +if: + required: + - port +else: + required: + - ports ...
Both port and ports names may be used. port - for a single port ports - if there is more than one port in sub-nodes Fixes the following warning: advantech,idk-2121wr.example.dt.yaml: panel-lvds: 'port' is a required property advantech,idk-2121wr.yaml needs several ports, so uses a ports node. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Fabrizio Castro <fabrizio.castro@bp.renesas.com> Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> --- Documentation/devicetree/bindings/display/panel/lvds.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)