devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Aradhya Bhatia <a-bhatia1@ti.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Tomi Valkeinen <tomba@kernel.org>, Jyri Sarha <jyri.sarha@iki.fi>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Maxime Ripard <maxime@cerno.tech>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Guo Ren <guoren@kernel.org>
Cc: DRI Development List <dri-devel@lists.freedesktop.org>,
	Devicetree List <devicetree@vger.kernel.org>,
	Linux Kernel List <linux-kernel@vger.kernel.org>,
	Linux RISC-V List <linux-riscv@lists.infradead.org>,
	Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>,
	Linux Mediatek List <linux-mediatek@lists.infradead.org>,
	Linux C-SKY Arch List <linux-csky@vger.kernel.org>,
	Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Rahul T R <r-ravikumar@ti.com>, Devarsh Thakkar <devarsht@ti.com>,
	Jai Luthra <j-luthra@ti.com>,
	Jayesh Choudhary <j-choudhary@ti.com>
Subject: Re: [RFC PATCH 3/4] dt-bindings: panel: Introduce dual-link LVDS panel
Date: Tue, 3 Jan 2023 12:28:11 +0100	[thread overview]
Message-ID: <30423568-df03-1d72-81fe-3a4b33214e5c@linaro.org> (raw)
In-Reply-To: <32d66fb7-6c63-0985-222f-0bd3c36c165d@ti.com>

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


Best regards,
Krzysztof


  reply	other threads:[~2023-01-03 11:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03  6:46 [RFC PATCH 0/4] dt-bindings: Introduce dual-link panels & panel-vendors Aradhya Bhatia
2023-01-03  6:46 ` [RFC PATCH 1/4] dt-bindings: vendor-prefixes: Add microtips Aradhya Bhatia
2023-01-03  8:21   ` Krzysztof Kozlowski
2023-01-08  7:02   ` Laurent Pinchart
2023-01-03  6:46 ` [RFC PATCH 2/4] dt-bindings: vendor-prefixes: Add lincolntech Aradhya Bhatia
2023-01-03  8:22   ` Krzysztof Kozlowski
2023-01-08  7:03   ` Laurent Pinchart
2023-01-03  6:46 ` [RFC PATCH 3/4] dt-bindings: panel: Introduce dual-link LVDS panel Aradhya Bhatia
2023-01-03  8:32   ` Krzysztof Kozlowski
2023-01-03 11:02     ` Aradhya Bhatia
2023-01-03 11:28       ` Krzysztof Kozlowski [this message]
2023-01-09 15:49         ` Aradhya Bhatia
2023-01-03 11:51   ` AngeloGioacchino Del Regno
2023-01-09 16:21     ` Aradhya Bhatia
2023-01-17 12:38       ` Tomi Valkeinen
2023-01-20  4:58         ` Aradhya Bhatia
2023-01-08  6:56   ` Laurent Pinchart
2023-01-09 16:44     ` Aradhya Bhatia
2023-01-03  6:46 ` [RFC PATCH 4/4] drm: panel-lvds: Introduce dual-link panels Aradhya Bhatia
2023-01-16  9:30 ` [RFC PATCH 0/4] dt-bindings: Introduce dual-link panels & panel-vendors Laurent Pinchart
2023-01-17 10:26   ` Aradhya Bhatia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30423568-df03-1d72-81fe-3a4b33214e5c@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=a-bhatia1@ti.com \
    --cc=airlied@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=broonie@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devarsht@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guoren@kernel.org \
    --cc=j-choudhary@ti.com \
    --cc=j-luthra@ti.com \
    --cc=jyri.sarha@iki.fi \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=maxime@cerno.tech \
    --cc=nm@ti.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=r-ravikumar@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.com \
    --cc=tomba@kernel.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).