Skip to content

Commit 532b04d

Browse files
krzkrobherring
authored andcommitted
dt-bindings: eeprom: at25: use spi-peripheral-props.yaml
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> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220727164424.386499-1-krzysztof.kozlowski@linaro.org
1 parent 944ad76 commit 532b04d

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

Documentation/devicetree/bindings/eeprom/at25.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ properties:
4444
reg:
4545
maxItems: 1
4646

47-
spi-max-frequency: true
48-
4947
pagesize:
5048
$ref: /schemas/types.yaml#/definitions/uint32
5149
enum: [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]
@@ -105,6 +103,7 @@ required:
105103
- spi-max-frequency
106104

107105
allOf:
106+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
108107
- if:
109108
properties:
110109
compatible:
@@ -117,7 +116,7 @@ allOf:
117116
- size
118117
- address-width
119118

120-
additionalProperties: false
119+
unevaluatedProperties: false
121120

122121
examples:
123122
- |

Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ properties:
2828
description: chip select of EEPROM
2929
maxItems: 1
3030

31-
spi-max-frequency: true
32-
spi-cs-high: true
33-
3431
read-only:
3532
description:
3633
parameter-less property which disables writes to the EEPROM
@@ -42,14 +39,16 @@ properties:
4239
of EEPROM (e.g. for SPI bus multiplexing)
4340
maxItems: 1
4441

45-
4642
required:
4743
- compatible
4844
- reg
4945
- data-size
5046
- spi-max-frequency
5147

52-
additionalProperties: false
48+
allOf:
49+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
50+
51+
unevaluatedProperties: false
5352

5453
examples:
5554
- |

0 commit comments

Comments
 (0)