Re: [PATCH v3 2/6] dt-bindings: display/msm: gpu: Document A612 GPU
From: Krzysztof Kozlowski
Date: Tue Nov 25 2025 - 02:58:32 EST
On 24/11/2025 22:39, Akhil P Oommen wrote:
> On 11/22/2025 4:32 PM, Krzysztof Kozlowski wrote:
>> On Sat, Nov 22, 2025 at 03:22:16AM +0530, Akhil P Oommen wrote:
>>> +
>>> + - if:
>>> + properties:
>>> + compatible:
>>> + contains:
>>> + const: qcom,adreno-612.0
>>> + then:
>>> + properties:
>>> + clocks:
>>> + items:
>>> + - description: GPU Core clock
>>> +
>>> + clock-names:
>>> + items:
>>> + - const: core
>>> +
>>> + required:
>>> + - clocks
>>> + - clock-names
>>> +
>>> else:
>>
>> I am pretty sure you break not only intention/logic behindi this else,
>> but actually cause real warnings to appear.
>>
>> The else was intentional, right? So the pattern further will not match
>> some of devices defined in if:. Now else is for different part, so only
>> 612 out of these devices is excluded.
>>
>> There is a reason we do not want ever else:if: in bindings. If it
>> appeared, sure, maybe there is some benefit of it, but it means you need
>> to be more careful now.
>
> Aah! I missed that this comes under an 'allOf'. Not an expert in this
The allOf does not matter here. If these were separate if:then: then it
would be the same.
> syntax, does moving this entire block under an 'else' make sense? Or is
No, never nest blocks.
> there a saner alternative?
Not sure, I don't remember the code. Original code was not easy to read,
with your changes it will not be easier. So the only alternative I see
is to make it simple and obvious.
Best regards,
Krzysztof