Re: [PATCH v4 01/17] dt-bindings: net: wireless: cc33xx: Add ti,cc33xx.yaml

From: Krzysztof Kozlowski
Date: Wed Oct 30 2024 - 07:10:13 EST


On 30/10/2024 11:59, Nemanov, Michael wrote:
>>
>> Your changelog does not explain these three. "Fixed compatibility" is
>> way too vague, especially that you do not fix anything here.
>>
>
> I was trying to address the feedback from previous patch. You said:
>
>>>>> +static const struct of_device_id cc33xx_sdio_of_match_table[] = {
>>>>> + { .compatible = "ti,cc3300", .data = &cc33xx_data },
>>>>> + { .compatible = "ti,cc3301", .data = &cc33xx_data },
>>>>> + { .compatible = "ti,cc3350", .data = &cc33xx_data },
>>>>> + { .compatible = "ti,cc3351", .data = &cc33xx_data },
>>>>> + { }
>>>>> +};
>>>>
>>>>
>>>> Eh? What happened here? So devices are compatibles thus make them
>>>> compatible in the bindings.
>>>>
>>>
>>> I thought this is the right way to do it (originally taken from [1]).
>>> How can I solve it via DT bindings?
>>
>> It's all over the bindings (also example-schema). Use fallback and oneOf.
>>
>
> Looking at [2] and [3] as an example I tried to do the same (make cc33xx
> driver compatible with all chip variants).
> How should have I done it?

qcom-wdt is quite a different device. It's true you should have here
oneOf, but for a purpose. oneOf without purpose does not make sense, right?

I think other TI bindings would serve you as an example. Or this one:

https://elixir.bootlin.com/linux/v6.3-rc6/source/Documentation/devicetree/bindings/sound/nvidia,tegra210-ope.yaml#L31


Best regards,
Krzysztof