[RFC PATCH 3/4] dt-bindings: panel: Introduce dual-link LVDS panel
Aradhya Bhatia
a-bhatia1 at ti.com
Mon Jan 9 07:49:08 PST 2023
Hi Krzysztof,
On 03-Jan-23 16:58, Krzysztof Kozlowski wrote:
> On 03/01/2023 12:02, Aradhya Bhatia wrote:
>> But this is throwing an error. I am confused what else could be done.
>> Can you please suggest what might be a more accurate check here?
>>
>>>
>>>> + required:
>>>> + - dual-lvds-odd-pixels
>>>> + then:
>>>> + properties:
>>>> + port at 1:
>>>> + properties:
>>>> + dual-lvds-even-pixels: true
>>>> + dual-lvds-odd-pixels: false
>>>
>>> Why do you need this? Your oneOf before already solves it.
>>
>> I agree with your comment here. It makes sense to only have
>>
>> dual-lvds-even-pixels: true
>>
>> and have the oneOf condition take care of the other. But, I just tested
>> this and it was unable to pick-up this intentionally-added error.
>>
>> I added 'dual-lvds-odd-pixels' property to both the nodes, and
>> dt_binding_check passes successfully (which it should have not.)
>>
>> Instead, if I only keep this,
>>
>> dual-lvds-odd-pixels: false
>>
>> then the dt_binding_check detects the error as it should.
>>
>> Regardless, I am curious why the first method doesn't work. Will try to
>> explore more on that.
>
> The check for presence of properties is only against required:, but you
> added there properties. Like this:
>
> https://elixir.bootlin.com/linux/v5.17-rc2/source/Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml#L155
>
>
> Other way is to drop your both oneOf and entire allOf from ports and use:
>
> oneOf:
> - properties:
> ports:
> $ref: /schemas/graph.yaml#/properties/ports
> properties:
> port at 0:
> required:
> - dual-lvds-odd-pixels
> port at 1:
> required:
> - dual-lvds-even-pixels
> - properties:
> ports:
> $ref: /schemas/graph.yaml#/properties/ports
> properties:
> port at 1:
> required:
> - dual-lvds-odd-pixels
> port at 0:
> required:
> - dual-lvds-even-pixels
>
Thank you for the suggestions.
I tested the both of them, and they seem to be working as expected.
V2 will reflect all the required fixes.
Regards
Aradhya
More information about the Linux-mediatek
mailing list