]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave...
authorZhen Lei <thunder.leizhen@huawei.com>
Tue, 13 Oct 2020 16:08:42 +0000 (00:08 +0800)
committerRob Herring <robh@kernel.org>
Wed, 14 Oct 2020 13:40:20 +0000 (08:40 -0500)
commita7e2000ee19bfeb665d6a2d6f3d3b38ff5e26088
treecd1ff3695e16fd49f840daba99cadd6ef02e4ace
parentde7a92323466f454a158a4143f3a6b3944d4ab96
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>
Documentation/devicetree/bindings/spi/spi-controller.yaml