From dbca294ac7146d872d2b9c84e9a95fd14bf009ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Bol=C3=ADvar?= Date: Mon, 29 Mar 2021 08:39:13 -0700 Subject: [PATCH] devicetree: spi: clean up DT_SPI_DEV_CS_GPIOS_CTLR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Write this in terms of DT_GPIO_CTLR_BY_IDX instead of the lower level DT_PHANDLE_BY_IDX for clarity and parallelism with things like DT_SPI_DEV_CS_GPIOS_PIN, which is written using DT_GPIO_PIN_BY_IDX instead of DT_PHA_BY_IDX. Signed-off-by: Martí Bolívar --- include/devicetree/spi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/devicetree/spi.h b/include/devicetree/spi.h index bbdc5f31ab9..f147cde7718 100644 --- a/include/devicetree/spi.h +++ b/include/devicetree/spi.h @@ -148,7 +148,7 @@ extern "C" { * @return node identifier for spi_dev's chip select GPIO controller */ #define DT_SPI_DEV_CS_GPIOS_CTLR(spi_dev) \ - DT_PHANDLE_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR(spi_dev)) + DT_GPIO_CTLR_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR(spi_dev)) /** * @brief Get a SPI device's chip select GPIO controller's label property