Message ID | 20200612141903.2391044-32-thierry.reding@gmail.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | dt-bindings: json-schema conversions and cleanups | expand |
On Fri, Jun 12, 2020 at 8:20 AM Thierry Reding <thierry.reding@gmail.com> wrote: > > From: Thierry Reding <treding@nvidia.com> > > Using "additionalProperties: false" results in rejecting any of the > properties defined in panel-common.yaml, whereas the intent is to > inherit the common properties defined in that file. > > Signed-off-by: Thierry Reding <treding@nvidia.com> > --- > .../devicetree/bindings/display/panel/panel-simple.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml > index 34fe3d42b829..c58bc90ffd43 100644 > --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml > +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml > @@ -275,7 +275,7 @@ properties: > port: true > power-supply: true > > -additionalProperties: false > +unevaluatedProperties: false But we've listed the properties we use here. Some of the common ones may not be applicable. Maybe they are and if so, then you should drop all the ones listed with 'true' with this change. Rob
On Fri, Jun 12, 2020 at 08:28:13AM -0600, Rob Herring wrote: > On Fri, Jun 12, 2020 at 8:20 AM Thierry Reding <thierry.reding@gmail.com> wrote: > > > > From: Thierry Reding <treding@nvidia.com> > > > > Using "additionalProperties: false" results in rejecting any of the > > properties defined in panel-common.yaml, whereas the intent is to > > inherit the common properties defined in that file. > > > > Signed-off-by: Thierry Reding <treding@nvidia.com> > > --- > > .../devicetree/bindings/display/panel/panel-simple.yaml | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml > > index 34fe3d42b829..c58bc90ffd43 100644 > > --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml > > +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml > > @@ -275,7 +275,7 @@ properties: > > port: true > > power-supply: true > > > > -additionalProperties: false > > +unevaluatedProperties: false > > But we've listed the properties we use here. Some of the common ones > may not be applicable. Maybe they are and if so, then you should drop > all the ones listed with 'true' with this change. Looks like the only one I need this for is ddc-i2c-bus, which is already contained in panel-common.yaml. unevaluatedProperties: false is able to look into that and hence doesn't flag this as extra. However, I can also work around that by adding a "ddc-i2c-bus: true" to panel-simple.yaml, which seems like it's the currently preferred way to do this. Is it expected that once jsonschema/dt-schema support the unevaluatedProperties keyword that we'd move towards using that instead? Thierry
diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml index 34fe3d42b829..c58bc90ffd43 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml @@ -275,7 +275,7 @@ properties: port: true power-supply: true -additionalProperties: false +unevaluatedProperties: false required: - compatible