drivers: ssd1673: fix SPI GPIO CS configuration

Use DT_SSD1673_SPI_GPIO_CS_DRV_NAME for CS configuration.

Resolves: #10720

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
Johann Fischer 2018-11-23 00:12:13 +01:00 committed by Anas Nashif
commit aee6764c32
2 changed files with 2 additions and 3 deletions

View file

@ -20,7 +20,6 @@
#define DT_SSD1673_SPI_FREQ DT_NORDIC_NRF_SPI_4002B000_SOLOMON_SSD1673FB_SPI_0_SPI_MAX_FREQUENCY #define DT_SSD1673_SPI_FREQ DT_NORDIC_NRF_SPI_4002B000_SOLOMON_SSD1673FB_SPI_0_SPI_MAX_FREQUENCY
#define DT_SSD1673_SPI_DEV_NAME DT_NORDIC_NRF_SPI_4002B000_SOLOMON_SSD1673FB_SPI_0_BUS_NAME #define DT_SSD1673_SPI_DEV_NAME DT_NORDIC_NRF_SPI_4002B000_SOLOMON_SSD1673FB_SPI_0_BUS_NAME
#define DT_SSD1673_SPI_SLAVE_NUMBER DT_NORDIC_NRF_SPI_4002B000_SOLOMON_SSD1673FB_SPI_0_BASE_ADDRESS #define DT_SSD1673_SPI_SLAVE_NUMBER DT_NORDIC_NRF_SPI_4002B000_SOLOMON_SSD1673FB_SPI_0_BASE_ADDRESS
#define DT_SSD1673_SPI_GPIO_CS y
#define DT_SSD1673_SPI_GPIO_CS_DRV_NAME DT_NORDIC_NRF_SPI_4002B000_CS_GPIOS_CONTROLLER #define DT_SSD1673_SPI_GPIO_CS_DRV_NAME DT_NORDIC_NRF_SPI_4002B000_CS_GPIOS_CONTROLLER
#define DT_SSD1673_SPI_GPIO_CS_PIN DT_NORDIC_NRF_SPI_4002B000_CS_GPIOS_PIN #define DT_SSD1673_SPI_GPIO_CS_PIN DT_NORDIC_NRF_SPI_4002B000_CS_GPIOS_PIN

View file

@ -36,7 +36,7 @@ struct ssd1673_data {
struct device *busy; struct device *busy;
struct device *spi_dev; struct device *spi_dev;
struct spi_config spi_config; struct spi_config spi_config;
#if defined(DT_SSD1673_SPI_GPIO_CS) #if defined(DT_SSD1673_SPI_GPIO_CS_DRV_NAME)
struct spi_cs_control cs_ctrl; struct spi_cs_control cs_ctrl;
#endif #endif
u8_t contrast; u8_t contrast;
@ -492,7 +492,7 @@ static int ssd1673_init(struct device *dev)
gpio_pin_configure(driver->busy, DT_SSD1673_BUSY_PIN, gpio_pin_configure(driver->busy, DT_SSD1673_BUSY_PIN,
GPIO_DIR_IN); GPIO_DIR_IN);
#if defined(DT_SSD1673_SPI_GPIO_CS) #if defined(DT_SSD1673_SPI_GPIO_CS_DRV_NAME)
driver->cs_ctrl.gpio_dev = device_get_binding( driver->cs_ctrl.gpio_dev = device_get_binding(
DT_SSD1673_SPI_GPIO_CS_DRV_NAME); DT_SSD1673_SPI_GPIO_CS_DRV_NAME);
if (!driver->cs_ctrl.gpio_dev) { if (!driver->cs_ctrl.gpio_dev) {