Skip to content

Commit

Permalink
dt-bindings: nfc: use spi-peripheral-props.yaml
Browse files Browse the repository at this point in the history
Instead of listing directly properties typical for SPI peripherals,
reference the spi-peripheral-props.yaml schema.  This allows using all
properties typical for SPI-connected devices, even these which device
bindings author did not tried yet.

Remove the spi-* properties which now come via spi-peripheral-props.yaml
schema, except for the cases when device schema adds some constraints
like maximum frequency.

While changing additionalProperties->unevaluatedProperties, put it in
typical place, just before example DTS.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220727164130.385411-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Jakub Kicinski committed Jul 29, 2022
1 parent 92b54e0 commit ba323f6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/net/nfc/marvell,nci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ properties:
spi-cpha: true
spi-cpol: true
spi-max-frequency: true

required:
- compatible
Expand All @@ -85,6 +84,7 @@ allOf:
contains:
const: marvell,nfc-spi
then:
$ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
break-control: false
flow-control: false
Expand All @@ -108,7 +108,7 @@ allOf:
spi-max-frequency: false
reg: false

additionalProperties: false
unevaluatedProperties: false

examples:
- |
Expand Down
5 changes: 2 additions & 3 deletions Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ properties:
reg:
maxItems: 1

spi-max-frequency: true

uicc-present:
type: boolean
description: |
Expand All @@ -55,10 +53,11 @@ then:
properties:
spi-max-frequency: false
else:
$ref: /schemas/spi/spi-peripheral-props.yaml#
required:
- spi-max-frequency

additionalProperties: false
unevaluatedProperties: false

examples:
- |
Expand Down
7 changes: 4 additions & 3 deletions Documentation/devicetree/bindings/net/nfc/st,st95hf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ properties:
st95hfvin-supply:
description: ST95HF transceiver's Vin regulator supply

spi-max-frequency: true

required:
- compatible
- enable-gpio
- interrupts
- reg
- spi-max-frequency

additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
- |
Expand Down
7 changes: 4 additions & 3 deletions Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ properties:
reg:
maxItems: 1

spi-max-frequency: true

ti,enable-gpios:
minItems: 1
maxItems: 2
Expand All @@ -65,7 +63,10 @@ required:
- ti,enable-gpios
- vin-supply

additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
- |
Expand Down

0 comments on commit ba323f6

Please sign in to comment.