Re: [PATCH v2 05/11] dt-bindings: net: sun4i-emac: Convert the binding to a schemas

From
Maxime Ripard <hidden>
Date
2019-06-10 14:55:46
Also in
linux-arm-kernel, netdev
Reply to
Andrew Lunn, 2019-06-10
Hi Andrew,

On Mon, Jun 10, 2019 at 04:31:39PM +0200, Andrew Lunn wrote:
quoted
+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
Thread (35 messages) 35 messages, 5 authors, last reply 2019-06-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help