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:
Jordan Yates 2020-06-18 18:12:17 +10:00 committed by Kumar Gala
commit 99a9d1cf06

View file

@ -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_CNTRL DT_INST_GPIO_LABEL(0, dc_gpios)
#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)
#define GD7965_CS_CNTRL DT_INST_SPI_DEV_CS_GPIOS_LABEL(0)
#endif
@ -441,6 +442,7 @@ static int gd7965_init(struct device *dev)
}
driver->cs_ctrl.gpio_pin = GD7965_CS_PIN;
driver->cs_ctrl.gpio_dt_flags = GD7965_CS_FLAGS;
driver->cs_ctrl.delay = 0U;
driver->spi_config.cs = &driver->cs_ctrl;
#endif