lkml.org 
[lkml]   [2022]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 net-next 05/10] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml
Date
The dsa.yaml binding contains duplicated bindings for address and size
cells, as well as the reference to dsa-port.yaml. Instead of duplicating
this information, remove the reference to dsa-port.yaml and include the
full reference to dsa.yaml.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
---

v2 -> v3
* Remove #address-cells and #size-cells from v2. The examples were
incorrect and fixed elsewhere.
* Remove erroneous unevaluatedProperties: true under Ethernet Port.
* Add back ref: dsa-port.yaml#.

v1 -> v2
* Add #address-cells and #size-cells to the switch layer. They aren't
part of dsa.yaml.
* Add unevaluatedProperties: true to the ethernet-port layer so it can
correctly read properties from dsa.yaml.

---
Documentation/devicetree/bindings/net/dsa/qca8k.yaml | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
index 6fc9bc985726..93a9ddebcac8 100644
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
@@ -66,20 +66,15 @@ properties:
With the legacy mapping the reg corresponding to the internal
mdio is the switch reg with an offset of -1.

+$ref: "dsa.yaml#"
+
patternProperties:
"^(ethernet-)?ports$":
type: object
- properties:
- '#address-cells':
- const: 1
- '#size-cells':
- const: 0
-
patternProperties:
"^(ethernet-)?port@[0-6]$":
type: object
description: Ethernet switch ports
-
$ref: dsa-port.yaml#

properties:
@@ -116,7 +111,7 @@ required:
- compatible
- reg

-additionalProperties: true
+unevaluatedProperties: false

examples:
- |
--
2.25.1
\
 
 \ /
  Last update: 2022-11-27 23:48    [W:0.140 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site