Re: [PATCH 13/18] dt-bindings: fix jz4780-nemc issue as reported by dtbscheck
From: Krzysztof Kozlowski
Date: Sun Apr 10 2022 - 11:36:16 EST
On 09/04/2022 15:18, Krzysztof Kozlowski wrote:
> On 09/04/2022 15:09, H. Nikolaus Schaller wrote:
(...)
>>>> @@ -17,7 +17,7 @@ properties:
>>>> oneOf:
>>>> - enum:
>>>> -
>>>> - - ingenic,jz4780-nemc
>>>> + - [ , simple-mfd ]
>>>
>>> This is not correct representation. If you really need simple-mfd, then
>>> this should be a separate item below oneOf.
>>
>> Well, it is valid YAML syntax and seems to be accepted by dtbscheck.
Minor update:
Well, it is not a valid schema. Rob's checker now confirmed. If you run
dt_bindings_check by yourself you will see the error:
properties:compatible:oneOf:0:enum:1: ['ingenic', 'jz4780-nemc',
'simple-mfd'] is not of type 'string'
Probably because enum expects string, not another enum (so enum inside
enum is not correct).
If you do not see the error, you might be missing some packages
(mentioned in writing-schema + yamllint for a different issue) or your
dtschema is old.
>
> It's not how we code it. Please do not introduce inconsistent - even if
> valid - blocks.
Best regards,
Krzysztof