[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3fc3c670-ce63-4a27-9d12-1c6c996cf914@ti.com>
Date: Wed, 30 Oct 2024 14:14:50 +0200
From: "Nemanov, Michael" <michael.nemanov@...com>
To: Krzysztof Kozlowski <krzk@...nel.org>, Kalle Valo <kvalo@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Rob
Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor
Dooley <conor+dt@...nel.org>, <linux-wireless@...r.kernel.org>,
<netdev@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Sabeeh Khan <sabeeh-khan@...com>
Subject: Re: [PATCH v4 01/17] dt-bindings: net: wireless: cc33xx: Add
ti,cc33xx.yaml
On 10/30/2024 1:09 PM, Krzysztof Kozlowski wrote:
> 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
>
OK.
So I should make one of the variants the base and declare others as
compatible? i.e:
--Bindings--
compatible:
oneOf:
- const: ti,cc3300
- items:
- enum:
- ti,cc3301
- ti,cc3350
- ti,cc3351
- const: ti,cc3300
--Driver--
static const struct of_device_id cc33xx_sdio_of_match_table[] = {
{ .compatible = "ti,cc3300", .data = &cc33xx_data },
{ }
};
Powered by blists - more mailing lists