Re: [RFC PATCH 3/4] dt-bindings: panel: Introduce dual-link LVDS panel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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@0:
             required:
               - dual-lvds-odd-pixels
           port@1:
             required:
               - dual-lvds-even-pixels
   - properties:
       ports:
         $ref: /schemas/graph.yaml#/properties/ports
         properties:
           port@1:
             required:
               - dual-lvds-odd-pixels
           port@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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux