Commit a079ff85 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown

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: 0a1b9293 ("spi: Add YAML schemas for the generic SPI options")
Reported-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200306085038.8111-2-geert+renesas@glider.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 73156083
......@@ -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
......
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