From: Maxime Ripard <maxime@cerno.tech>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: devicetree@vger.kernel.org,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Sandy Huang <hjc@rock-chips.com>,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, Chen-Yu Tsai <wens@csie.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Yao <mark.yao@rock-chips.com>
Subject: Re: [PATCH/RFC 2/6] dt-bindings: display: bridge: renesas,dw-hdmi: Convert binding to YAML
Date: Mon, 6 Apr 2020 19:04:59 +0200 [thread overview]
Message-ID: <20200406170459.wwfxtsuvjuhlcyoe@gilmour.lan> (raw)
In-Reply-To: <20200406113247.GF4757@pendragon.ideasonboard.com>
[-- Attachment #1.1: Type: text/plain, Size: 2967 bytes --]
On Mon, Apr 06, 2020 at 02:32:47PM +0300, Laurent Pinchart wrote:
> > > > +
> > > > + clock-names:
> > > > + items:
> > > > + - const: iahb
> > > > + - const: isfr
> > > > +
> > > > + interrupts: true
> > > > +
> > > > + ports:
> > > > + type: object
> > > > + description: |
> > > > + This device has three video ports. Their connections are modelled using the
> > > > + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
> > > > + Each port shall have a single endpoint.
> > > > +
> > > > + properties:
> > > > + '#address-cells':
> > > > + const: 1
> > > > +
> > > > + '#size-cells':
> > > > + const: 0
> > > > +
> > > > + port@0:
> > > > + type: object
> > > > + description: Parallel RGB input port
> > > > +
> > > > + port@1:
> > > > + type: object
> > > > + description: HDMI output port
> > > > +
> > > > + port@2:
> > > > + type: object
> > > > + description: Sound input port
> > > > +
> > > > + required:
> > > > + - port@0
> > > > + - port@1
> > > > + - port@2
> > > > +
> > > > + additionalProperties: false
>
> Would it also make sense to use unevaluatedProperties here, and drop
> #address-cells and #size-cells above as they're already evaluated in
> synopsys,dw-hdmi.yaml ?
Yup :)
> > > > +
> > > > + power-domains:
> > > > + maxItems: 1
> > > > +
> > > > +required:
> > > > + - compatible
> > > > + - reg
> > > > + - clocks
> > > > + - clock-names
> > > > + - interrupts
> > > > + - ports
> > > > +
> > > > +additionalProperties: false
> > >
> > > In the case where you have some kind of generic schema and then a more
> > > specific one like you have here, unevaluatedProperties make more sense
> > > that additionalProperties.
> > >
> > > additionalProperties checks that there are no extra properties on the
> > > current schema, which is a problem here since you have to duplicate
> > > the entire list of properties found in the generic schema, while
> > > unevaluatedProperties checks that there are no extra properties in the
> > > entire set of all schemas that apply to this node.
> > >
> > > This way, you can just put what is different from the generic schema,
> > > and you don't have to keep it in sync.
> > >
> > > It's a feature that has been added in the spec of the schemas that
> > > went on right after the one we support in the tools, so for now the
> > > kernel meta-schemas only allows that property to be there (just like
> > > deprecated) but won't do anything.
> > >
> > > This should be fixed quite soon however, the library we depend on
> > > has started to work on that spec apparently.
> >
> > Should I postpone this series until support for unevaluatedProperties is
> > available, to be able to test this ?
>
> Also, to make sure I understand this correctly, does it mean I can drop
> "reg: true" and "interrupts: true" ?
Ditto :)
Maxime
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-04-07 8:09 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-05 23:39 [PATCH/RFC 0/6] dt-bindings: display: Convert DWC HDMI TX bindings to YAML Laurent Pinchart
2020-04-05 23:39 ` [PATCH/RFC 1/6] dt-bindings: display: bridge: Add YAML schema for Synopsys DW-HDMI Laurent Pinchart
2020-04-06 7:50 ` Maxime Ripard
2020-04-05 23:39 ` [PATCH/RFC 2/6] dt-bindings: display: bridge: renesas, dw-hdmi: Convert binding to YAML Laurent Pinchart
2020-04-06 7:57 ` [PATCH/RFC 2/6] dt-bindings: display: bridge: renesas,dw-hdmi: " Maxime Ripard
2020-04-06 11:28 ` Laurent Pinchart
2020-04-06 11:32 ` Laurent Pinchart
2020-04-06 17:04 ` Maxime Ripard [this message]
2020-04-06 17:06 ` Maxime Ripard
2020-04-06 8:51 ` Geert Uytterhoeven
2020-04-05 23:39 ` [PATCH/RFC 3/6] dt-bindings: display: imx: hdmi: " Laurent Pinchart
2020-04-05 23:39 ` [PATCH/RFC 4/6] dt-bindings: display: rockchip: dw-hdmi: " Laurent Pinchart
2020-04-06 8:00 ` Maxime Ripard
2020-04-06 11:19 ` Laurent Pinchart
2020-04-06 17:09 ` Maxime Ripard
2020-04-06 17:50 ` Laurent Pinchart
2020-04-07 7:12 ` Maxime Ripard
2020-04-08 11:45 ` Laurent Pinchart
2020-04-08 12:25 ` Maxime Ripard
2020-04-08 14:01 ` Laurent Pinchart
2020-04-14 23:10 ` Rob Herring
2020-04-15 1:06 ` Laurent Pinchart
2020-04-15 13:50 ` Rob Herring
2020-04-05 23:39 ` [PATCH/RFC 5/6] dt-bindings: display: sun8i-a83t-dw-hdmi: Reference dw-hdmi YAML schema Laurent Pinchart
2020-04-14 23:10 ` Rob Herring
2020-04-05 23:39 ` [PATCH/RFC 6/6] dt-bindings: display: bridge: Remove deprecated dw_hdmi.txt Laurent Pinchart
2020-04-14 23:11 ` Rob Herring
2020-04-05 23:55 ` [PATCH/RFC 0/6] dt-bindings: display: Convert DWC HDMI TX bindings to YAML Laurent Pinchart
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=20200406170459.wwfxtsuvjuhlcyoe@gilmour.lan \
--to=maxime@cerno.tech \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hjc@rock-chips.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mark.yao@rock-chips.com \
--cc=robh+dt@kernel.org \
--cc=wens@csie.org \
/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).