Skip to content

Commit

Permalink
spi: dt-bindings: spi-controller: Fix #address-cells for slave mode
Browse files Browse the repository at this point in the history
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: 0a1b929 ("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>
  • Loading branch information
Geert Uytterhoeven authored and Mark Brown committed Mar 13, 2020
1 parent 7315608 commit a079ff8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/spi/spi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a079ff8

Please sign in to comment.