Re: [PATCH v2] dt-bindings: interrupt-controller: Convert UniPhier AIDET to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 22, 2020 at 08:04:35PM +0900, Masahiro Yamada wrote:
> Convert the UniPhier AIDET (ARM Interrupt Detector) binding to DT
> schema format.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
> Some qeustions:
> 
> I was wondering when 'additionalProperties: false' should be added.
> 
> If I add it to a bus controller device (e.g. I2C),
> I see some schema warnings because various sub-nodes
> are added depending on which device you connect.
> 
> On the other hand, the interrupt controller like this
> does not have a subnode.
> So, probably this is the case where we can add
> 'additionalProperties: false'.
> 
> Is this correct?

Yes.

The problem with 'additionalProperties: false' is it doesn't include 
what any $ref includes. There's a json-schema fix for this coming with 
'unevaluatedProperties', but the json-schema python lib we use doesn't 
yet support that.

> 
> One more thing.
> 
> There are multiple ways to do a similar thing:
> 
>    compatible:
>      enum:
>         - socionext,uniphier-ld4-aidet
>         - socionext,uniphier-pro4-aidet
>         ...
> vs
> 
>    compatible:
>      oneOf:
>         - const: socionext,uniphier-ld4-aidet
>         - const: socionext,uniphier-pro4-aidet
>         ...
> 
> I adopted the former because I can save 'const'.
> If there is a preferred way, I will follow it.

I prefer the former.

> 
> END
> 
> ---
> 
> Changes in v2:
>   - fix the schema warning in the example
> 
>  .../socionext,uniphier-aidet.txt              | 32 ----------
>  .../socionext,uniphier-aidet.yaml             | 61 +++++++++++++++++++
>  2 files changed, 61 insertions(+), 32 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/socionext,uniphier-aidet.txt
>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/socionext,uniphier-aidet.yaml

It all looks fine, so I'll drop the questions and apply.

Rob



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux