Re: [PATCH] dt-bindings: arm: mediatek: convert ethsys controller to the json-schema

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

 



On Fri, Nov 17, 2023 at 08:49:26AM +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@xxxxxxxxxx>
> 
> This helps validating DTS files. The only introduced change was fixing
> "reg" value in example (1 address cell + 1 size cell).
> 
> Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
> ---
> For the record I was trying to simplify "compatible" syntax with
> following but "oneOf" apparently can't be used as a single item.
> 
> items:
>   - oneOf:
>       - const: mediatek,mt2701-ethsys
>       - const: mediatek,mt7622-ethsys
>       - items:
>           - const: mediatek,mt7623-ethsys
>           - const: mediatek,mt2701-ethsys
>       - const: mediatek,mt7629-ethsys
>       - const: mediatek,mt7981-ethsys
>       - const: mediatek,mt7986-ethsys
>   - const: syscon

The problem is you have nested 'items' which forms a matrix.

You generally need a 'oneOf' for each possible length of an array unless 
the value of each index is always the same (i.e. only the size of the 
list varies).

> 
>  .../bindings/arm/mediatek/mediatek,ethsys.txt | 29 ----------
>  .../arm/mediatek/mediatek,ethsys.yaml         | 54 +++++++++++++++++++
>  2 files changed, 54 insertions(+), 29 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.yaml

Can you move this to bindings/clock/

With that,

Reviewed-by: Rob Herring <robh@xxxxxxxxxx>




[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