All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: devicetree@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org>,
	Maxime Ripard <mripard@kernel.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v2] dt-bindings: display: Use OF graph schema
Date: Tue, 17 Nov 2020 16:37:33 -0600	[thread overview]
Message-ID: <CAL_JsqLENMjeNYsg0JSCBvsgZOqiz2ivKX7jP9kVE_AV5in3dw@mail.gmail.com> (raw)
In-Reply-To: <20201117200522.4000817-1-robh@kernel.org>

On Tue, Nov 17, 2020 at 2:05 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that we have a graph schema, rework the display related schemas to use
> it. Mostly this is adding a reference to graph.yaml and dropping duplicate
> parts from schemas.
>
> In panel-common.yaml, 'ports' is dropped. Any binding using 'ports'
> should be one with more than 1 port node, and the binding must define
> what each port is.
>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> v2:
>  - Drop 'type: object' where we have a $ref
>  - Drop any common properties like 'reg', '#address-cells', "#size-cells',
>    'remote-endpoint'

I think this isn't going to work in regards to unevaluatedProperties.
Consider this example:

parent:
  $ref: schema.yaml#/parent  # containing properties of 'child'
  properties:
    child:
      unevaluatedProperties: false

The problem is at the 'child' instance level when
'unevaluatedProperties' is evaluated, it can't see the parent schema
with the $ref. So any property in schema.yaml won't be taken into
account. Instead, we have to do something like this:

parent:
  $ref: schema.yaml#/parent
  properties:
    child:
      $ref: schema.yaml#/child
      unevaluatedProperties: false

So we're going to need a $ref for every ports, port, and endpoint
node. Or just allow extra properties.

Rob

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Thierry Reding <thierry.reding@gmail.com>,
	 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: devicetree@vger.kernel.org,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH v2] dt-bindings: display: Use OF graph schema
Date: Tue, 17 Nov 2020 16:37:33 -0600	[thread overview]
Message-ID: <CAL_JsqLENMjeNYsg0JSCBvsgZOqiz2ivKX7jP9kVE_AV5in3dw@mail.gmail.com> (raw)
In-Reply-To: <20201117200522.4000817-1-robh@kernel.org>

On Tue, Nov 17, 2020 at 2:05 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that we have a graph schema, rework the display related schemas to use
> it. Mostly this is adding a reference to graph.yaml and dropping duplicate
> parts from schemas.
>
> In panel-common.yaml, 'ports' is dropped. Any binding using 'ports'
> should be one with more than 1 port node, and the binding must define
> what each port is.
>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> v2:
>  - Drop 'type: object' where we have a $ref
>  - Drop any common properties like 'reg', '#address-cells', "#size-cells',
>    'remote-endpoint'

I think this isn't going to work in regards to unevaluatedProperties.
Consider this example:

parent:
  $ref: schema.yaml#/parent  # containing properties of 'child'
  properties:
    child:
      unevaluatedProperties: false

The problem is at the 'child' instance level when
'unevaluatedProperties' is evaluated, it can't see the parent schema
with the $ref. So any property in schema.yaml won't be taken into
account. Instead, we have to do something like this:

parent:
  $ref: schema.yaml#/parent
  properties:
    child:
      $ref: schema.yaml#/child
      unevaluatedProperties: false

So we're going to need a $ref for every ports, port, and endpoint
node. Or just allow extra properties.

Rob
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-11-17 22:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 20:05 [PATCH v2] dt-bindings: display: Use OF graph schema Rob Herring
2020-11-17 20:05 ` Rob Herring
2020-11-17 22:37 ` Rob Herring [this message]
2020-11-17 22:37   ` Rob Herring

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=CAL_JsqLENMjeNYsg0JSCBvsgZOqiz2ivKX7jP9kVE_AV5in3dw@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.com \
    --cc=tzimmermann@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.