Commit 17161c34 authored by Rob Herring's avatar Rob Herring Committed by David S. Miller

dt-bindings: net: ethernet-controller: Rework 'fixed-link' schema

While the if/then schemas mostly work, there's a few issues. The 'allOf'
schema will also be true if 'fixed-link' is not an array or object as a
false 'if' schema (without an 'else') will be true. In the array case
doesn't set the type (uint32-array) in the 'then' clause. In the node case,
'additionalProperties' is missing.

Rework the schema to use oneOf with each possible type.
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b20a7ca8
...@@ -167,10 +167,8 @@ properties: ...@@ -167,10 +167,8 @@ properties:
- in-band-status - in-band-status
fixed-link: fixed-link:
allOf: oneOf:
- if: - $ref: /schemas/types.yaml#/definitions/uint32-array
type: array
then:
deprecated: true deprecated: true
items: items:
- minimum: 0 - minimum: 0
...@@ -196,11 +194,8 @@ properties: ...@@ -196,11 +194,8 @@ properties:
description: description:
Asymmetric pause configuration. 0 for no asymmetric Asymmetric pause configuration. 0 for no asymmetric
pause, 1 for asymmetric pause pause, 1 for asymmetric pause
- type: object
additionalProperties: false
- if:
type: object
then:
properties: properties:
speed: speed:
description: description:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment