Re: [PATCH] dt-bindings: i2c: hisilicon,hix5hd2-i2c convert to DT schema
From: Krzysztof Kozlowski
Date: Wed Oct 08 2025 - 04:41:33 EST
On 08/10/2025 16:22, Wolfram Sang wrote:
> Hi,
>
> thanks for this conversion!
>
>> +properties:
>> + compatible:
>> + enum:
>> + - hisilicon,hix5hd2-i2c
>
> Question for DT maintainers: Is it preferred to start with 'enum' right
> away or to start with 'const' and convert to 'enum' once a second user
> appears?
I don't have preference except: I would suggest using enum if you
already think there will be second variant, because it would save one
re-indent/rewrite of the line.
But in this case of old schema this is unlikely, so really does not
matter for me.
>
>> + "#address-cells":
>> + const: 1
>> +
>> + "#size-cells":
>> + const: 0
>
> These should be left out because they come from i2c-controller.yaml?
Yeah, these are redundant.
>
>> +required:
>> + - compatible
>> + - reg
>> + - interrupts
>> + - clocks
>> + - "#address-cells"
>> + - "#size-cells"
>
> Same here for the last two?
i2c-controller.yaml does not require these I think for a reason - you
could have enabled empty I2C controller node for user space and having
these required without actual children causes dtc W=1 or W=2 warning.
so yeah, I would propose to drop these as well.
Best regards,
Krzysztof