wifi: eswifi: Use generated SPI CS define

Move to using the generated DT_INVENTEK_ESWIFI_ESWIFI0_CS_GPIO_pin and
DT_INVENTEK_ESWIFI_ESWIFI0_CS_GPIO_CONTROLLER defines and drop the
DT_ESWIFI0_CS_GPIOS_PIN & DT_INVENTEK_ESWIFI_ESWIFI0_CS_GPIO_PIN from
dts_fixup.hl

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-01-23 04:25:56 -06:00 committed by Kumar Gala
commit eaafdc85fc
2 changed files with 3 additions and 5 deletions

View file

@ -23,6 +23,3 @@
#define CONFIG_BT_SPI_CHIP_SELECT_PIN DT_ST_STM32_SPI_FIFO_40003C00_CS_GPIOS_PIN_0
#define CONFIG_BT_SPI_RESET_DEV_NAME BT_RESET_GPIOS_CONTROLLER
#define CONFIG_BT_SPI_RESET_PIN BT_RESET_GPIOS_PIN
#define DT_ESWIFI0_CS_GPIOS_CONTROLLER DT_ST_STM32_SPI_FIFO_40003C00_CS_GPIOS_CONTROLLER_1
#define DT_ESWIFI0_CS_GPIOS_PIN DT_ST_STM32_SPI_FIFO_40003C00_CS_GPIOS_PIN_1

View file

@ -235,8 +235,9 @@ int eswifi_spi_init(struct eswifi_dev *eswifi)
SPI_WORD_SET(16) | SPI_LINES_SINGLE |
SPI_HOLD_ON_CS | SPI_LOCK_ON);
spi->spi_cfg.slave = DT_INVENTEK_ESWIFI_ESWIFI0_BASE_ADDRESS;
spi->spi_cs.gpio_dev = device_get_binding(DT_ESWIFI0_CS_GPIOS_CONTROLLER);
spi->spi_cs.gpio_pin = DT_ESWIFI0_CS_GPIOS_PIN;
spi->spi_cs.gpio_dev =
device_get_binding(DT_INVENTEK_ESWIFI_ESWIFI0_CS_GPIO_CONTROLLER);
spi->spi_cs.gpio_pin = DT_INVENTEK_ESWIFI_ESWIFI0_CS_GPIO_PIN;
spi->spi_cs.delay = 1000;
spi->spi_cfg.cs = &spi->spi_cs;