Re: Aw: Re: [RFC v2] dt-bindings: net: dsa: convert binding for mediatek switches

From: Krzysztof Kozlowski
Date: Fri May 06 2022 - 03:15:23 EST


On 06/05/2022 08:46, Frank Wunderlich wrote:
>>> + const: 1
>>> +
>>> + "#size-cells":
>>> + const: 0
>>> +
>>> + core-supply:
>>> + description: |
>>
>> Drop | everywhere where it is not needed (so in all places, AFAICT)
>
> is it necessary for multiline-descriptions or is indentation enough?

It's necessary only when YAML syntax characters appear in description or
when you want specific formatting.

https://elixir.bootlin.com/linux/v5.18-rc5/source/Documentation/devicetree/bindings/example-schema.yaml#L97

https://yaml-multiline.info/

>>> +
>>> +patternProperties:
>>
>> patternProperties go before allOf, just after regular properties.
>
> after required, right?

properties do not go after required, so neither patternProperties
should. Something like: propertes -> patternProperties -> dependencies
-> required -> allOf -> additionalProperties -> examples

>
>>> + "^(ethernet-)?ports$":
>>> + type: object
>>
>> Also on this level:
>> unevaluatedProperties: false
>
> this is imho a bit redundant because in dsa.yaml (which is included now after patternProperties)
> it is already set on both levels.

dsa.yaml does not set it on ethernet-ports.

> Adding it here will fail in examples because of size/address-cells which are already defined in dsa.yaml...
> so i need to define them here again.

You're right, it cannot be set here.

Best regards,
Krzysztof