mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave mode
scripts/dtc/checks.c: if (get_property(node, "spi-slave")) spi_addr_cells = 0; if (node_addr_cells(node) != spi_addr_cells) FAIL(c, dti, node, "incorrect #address-cells for SPI bus"); if (node_size_cells(node) != 0) FAIL(c, dti, node, "incorrect #size-cells for SPI bus"); The above code in check_spi_bus_bridge() require that the number of address cells must be 0. So we should explicitly declare "#address-cells = <0>". Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20201013160845.1772-4-thunder.leizhen@huawei.com Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
441848282c
commit
faaa30dd1f
1 changed files with 14 additions and 6 deletions
|
@ -20,7 +20,7 @@ properties:
|
||||||
pattern: "^spi(@.*|-[0-9a-f])*$"
|
pattern: "^spi(@.*|-[0-9a-f])*$"
|
||||||
|
|
||||||
"#address-cells":
|
"#address-cells":
|
||||||
const: 1
|
enum: [0, 1]
|
||||||
|
|
||||||
"#size-cells":
|
"#size-cells":
|
||||||
const: 0
|
const: 0
|
||||||
|
@ -52,11 +52,19 @@ properties:
|
||||||
description:
|
description:
|
||||||
The SPI controller acts as a slave, instead of a master.
|
The SPI controller acts as a slave, instead of a master.
|
||||||
|
|
||||||
oneOf:
|
allOf:
|
||||||
- required:
|
- if:
|
||||||
- "#address-cells"
|
not:
|
||||||
- required:
|
required:
|
||||||
- spi-slave
|
- spi-slave
|
||||||
|
then:
|
||||||
|
properties:
|
||||||
|
"#address-cells":
|
||||||
|
const: 1
|
||||||
|
else:
|
||||||
|
properties:
|
||||||
|
"#address-cells":
|
||||||
|
const: 0
|
||||||
|
|
||||||
patternProperties:
|
patternProperties:
|
||||||
"^slave$":
|
"^slave$":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue