devicetree: spi: add CS GPIO controller accessors
Add two new macros for getting the chip select GPIO controller from a
SPI device:
- DT_SPI_DEV_CS_GPIOS_CTLR()
- DT_INST_SPI_DEV_CS_GPIOS_CTLR()
Now that we can get struct device pointers at build time directly from
a devicetree node identifier, it's useful to be able to get a
node_id for a CS GPIO controller from the SPI device, because that's
necessary for setting up the gpio_dev in a struct spi_cs_control.
Signed-off-by:
Martí Bolívar <marti.bolivar@nordicsemi.no>
Loading
Please sign in to comment