[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190610145546.4xz7hdh3gk6vjrbx@flea>
Date: Mon, 10 Jun 2019 16:55:46 +0200
From: Maxime Ripard <maxime.ripard@...tlin.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Mark Rutland <mark.rutland@....com>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Chen-Yu Tsai <wens@...e.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...com>,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
devicetree@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Antoine Ténart <antoine.tenart@...tlin.com>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH v2 05/11] dt-bindings: net: sun4i-emac: Convert the
binding to a schemas
Hi Andrew,
On Mon, Jun 10, 2019 at 04:31:39PM +0200, Andrew Lunn wrote:
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > + - phy
> > + - allwinner,sram
>
> Quoting ethernet.txt:
>
> - phy: the same as "phy-handle" property, not recommended for new bindings.
> - phy-handle: phandle, specifies a reference to a node representing a PHY
> device; this property is described in the Devicetree Specification and so
> preferred;
>
> Can this be expressed in Yaml? Accept phy, but give a warning. Accept
> phy-handle without a warning? Enforce that one or the other is
> present?
This is what we should be aiming for, yes, but right now we don't
really have a way to express that for properties.
The next specification of the schema spec seems to address that, and
it should be released pretty soon, so it's always something that we
can address later on, when it will be out.
For that particular case, we can also work around it by requiring
phy-handle instead of phy. That way, if phy-handle is missing we will
have a warning. phy will not be validated though, which is kind of a
shame, but still much better than what we currently have.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists