[PATCH net-next 15/16] dt-bindings: net: dwmac: Simplify MTL queue props dependencies

Rob Herring robh at kernel.org
Fri Mar 17 13:56:04 PDT 2023


On Tue, Mar 14, 2023 at 01:51:02AM +0300, Serge Semin wrote:
> Currently the Tx/Rx queues properties interdependencies are described by
> means of the pattern: "if: required: X, then: properties: Y: false, Z:
> false, etc". Due to very unfortunate MTL Tx/Rx queue DT-node design the
> resultant sub-nodes schemas look very bulky and thus hard to read. The
> situation can be improved by using the "allOf:/oneOf: required: X,
> required: Y, etc" pattern instead thus getting shorter and a bit easier to
> comprehend constructions.
> 
> Signed-off-by: Serge Semin <Sergey.Semin at baikalelectronics.ru>
> 
> ---

Reviewed-by: Rob Herring <robh at kernel.org>

> 
> Note the solution can be shortened out a bit further by replacing the
> single-entry allOf statements with just the "not: required: etc" pattern.
> But in order to do that the DT-schema validation tool must be fixed like
> this:
> 
> --- a/meta-schemas/nodes.yaml	2021-02-08 14:20:56.732447780 +0300
> +++ b/meta-schemas/nodes.yaml	2021-02-08 14:21:00.736492245 +0300
> @@ -22,6 +22,7 @@
>      - unevaluatedProperties
>      - deprecated
>      - required
> +    - not
>      - allOf
>      - anyOf
>      - oneOf

This should be added regardless. Can you send a patch to devicetree-spec 
or a GH PR. But I'd skip using that here for now because then we require 
a new version of dtschema.

Rob



More information about the linux-arm-kernel mailing list