display: gd7965: Add chip select flags
Adds the chip select devicetree flags to the spi_cs_control instance. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
750ccd39dc
commit
99a9d1cf06
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,7 @@ LOG_MODULE_REGISTER(gd7965, CONFIG_DISPLAY_LOG_LEVEL);
|
||||||
#define GD7965_DC_FLAGS DT_INST_GPIO_FLAGS(0, dc_gpios)
|
#define GD7965_DC_FLAGS DT_INST_GPIO_FLAGS(0, dc_gpios)
|
||||||
#define GD7965_DC_CNTRL DT_INST_GPIO_LABEL(0, dc_gpios)
|
#define GD7965_DC_CNTRL DT_INST_GPIO_LABEL(0, dc_gpios)
|
||||||
#define GD7965_CS_PIN DT_INST_SPI_DEV_CS_GPIOS_PIN(0)
|
#define GD7965_CS_PIN DT_INST_SPI_DEV_CS_GPIOS_PIN(0)
|
||||||
|
#define GD7965_CS_FLAGS DT_INST_SPI_DEV_CS_GPIOS_FLAGS(0)
|
||||||
#if DT_INST_SPI_DEV_HAS_CS_GPIOS(0)
|
#if DT_INST_SPI_DEV_HAS_CS_GPIOS(0)
|
||||||
#define GD7965_CS_CNTRL DT_INST_SPI_DEV_CS_GPIOS_LABEL(0)
|
#define GD7965_CS_CNTRL DT_INST_SPI_DEV_CS_GPIOS_LABEL(0)
|
||||||
#endif
|
#endif
|
||||||
|
@ -441,6 +442,7 @@ static int gd7965_init(struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
driver->cs_ctrl.gpio_pin = GD7965_CS_PIN;
|
driver->cs_ctrl.gpio_pin = GD7965_CS_PIN;
|
||||||
|
driver->cs_ctrl.gpio_dt_flags = GD7965_CS_FLAGS;
|
||||||
driver->cs_ctrl.delay = 0U;
|
driver->cs_ctrl.delay = 0U;
|
||||||
driver->spi_config.cs = &driver->cs_ctrl;
|
driver->spi_config.cs = &driver->cs_ctrl;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue