summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/spi/spi-controller.yaml
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2020-03-06 09:50:37 +0100
committerMark Brown <broonie@kernel.org>2020-03-13 17:06:33 +0000
commita079ff858cc0831f5bbad205016bfd88bf992bb1 (patch)
treea510a4692590428057f1cab6ce72a45188b83adb /Documentation/devicetree/bindings/spi/spi-controller.yaml
parent7315608302f1ff76c873e6acbc4ac1b0ada02fe1 (diff)
spi: dt-bindings: spi-controller: Fix #address-cells for slave mode
Currently, the DT bindings for an SPI controller specify that "#address-cells" must be fixed to one. However, that applies to an SPI controller in master mode only. When running in SPI slave mode, "#address-cells" should not be specified. Fix this making "#address-cells" mutually-exclusive with "spi-slave". Fixes: 0a1b929356830257 ("spi: Add YAML schemas for the generic SPI options") Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200306085038.8111-2-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/spi/spi-controller.yaml')
-rw-r--r--Documentation/devicetree/bindings/spi/spi-controller.yaml6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
index 1e0ca6ccf64b..0ebaf6677ac4 100644
--- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
@@ -52,6 +52,12 @@ properties:
description:
The SPI controller acts as a slave, instead of a master.
+oneOf:
+ - required:
+ - "#address-cells"
+ - required:
+ - spi-slave
+
patternProperties:
"^slave$":
type: object