[PATCH 6/9] ASoC: dt-bindings: meson: convert axg fifo to schema
Krzysztof Kozlowski
krzysztof.kozlowski at linaro.org
Fri Feb 3 09:58:12 PST 2023
On 03/02/2023 14:27, Jerome Brunet wrote:
>
>>> + resets:
>>> + items:
>>> + - description: Memory ARB line
>>> + - description: Dedicated device reset line
>>
>> This won't work without minItems and you should see errors on your DTS
>> or in dt_binding_check
>>
>
> The example provided here worked but there is indeed a warning with the
> axg-frddr variant.
>
> I'm adding a 2nd example so it does not happen again.
If the difference is only in one property, no need. If the difference is
in more properties - then could be. We do not keep examples for every
trivial change, because the assumption is that submitter tests DTS as well.
>
>>> +
>>> + reset-names: true
>>
>> minItems
>> maxItems
>
> Adding this causes troubles with the reset-names definitions in the 'if'
> clause. If I put min: 1, max: 2 and min: 2 in the 'then' clause I get:
>
>> Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml: allOf:1:then:properties:reset-names: 'oneOf' conditional failed, one must be fixed:
>> [{'const': 'arb'}, {'const': 'rst'}] is too long
>> [{'const': 'arb'}, {'const': 'rst'}] is too short
>> False schema does not allow 2
>> 1 was expected
>> hint: "minItems" is only needed if less than the "items" list length
>> from schema $id: http://devicetree.org/meta-schemas/items.yaml#
Probably because rest of binding does not match. One way is like this:
https://elixir.bootlin.com/linux/v5.19-rc6/source/Documentation/devicetree/bindings/clock/samsung,exynos7-clock.yaml#L57
>
> The older devices just have the 'arb' reset.
> Newer devices have a 2nd reset line (called rst here)
>
> If I just restrict the min and max, it would be valid for the older
> devices to have 'rst' only - but it is not valid.
How? Why would you define for old devices "rst" as one name if this is
not correct?
>
> With just 'true', it works as expected (throw errors if an incorrect
> name or number of names is passed). Min and Max comes from the items list.
Because the rest is not in recommended way. Once you implement it in
recommended way, there will be no such...
>
> Any suggestions ?
Implement rest of comments.
Best regards,
Krzysztof
More information about the linux-amlogic
mailing list