Re: [PATCH] dt-bindings: examples: add a list of templates and solutions

From: Krzysztof Kozlowski
Date: Mon Nov 07 2022 - 13:35:46 EST


On 04/11/2022 22:47, Rob Herring wrote:
>>>> +7. Phandle to syscon with offset:
>>>> + Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
>>>> + Line: 42
>>>> +
>>>> +8. Variable length of array (e.g. clocks and clock-names) but narrowed to
>>>> + specific variant:
>>>> + Documentation/devicetree/bindings/clock/qcom,mmcc.yaml
>>>> + Lines: 33 and 71
>>>
>>> It seems like some of these that are just a single property we could add
>>> to example-schema.yaml.
>>
>> I am afraid the example-schema will grow too big for folks to look into.
>> It's already quite complicated, with explanations of the dtschema
>> behavior itself.
>
> How about splitting up the top-level descriptions and property examples?

You mean splitting up to separate YAML files? I guess this could work
and still be concise - few examples showing different concepts.

>
>> How about then RST file with small code snippets?
>
> Then they don't validate.
>
>>
>>> Also, perhaps a reference to this from writing-schema.rst.
>>
>> I can do this as well.
>>
>> The problem with my approach above (and adding these to writing-schema)
>> is that examples above can change, lines can be inadequate.
>
> I just meant a link in writing-schema.rst to this doc. We already have
> that for example-schema.yaml.


Best regards,
Krzysztof