Skip to content

Commit a614a02

Browse files
committed
dts: Rename DT_.*_GPIO_* to DT_.*_GPIOS_*
Convert DT_.*_GPIO_{CONTROLLER,PIN,FLAGS} -> DT_.*_GPIOS_{CONTROLLER,PIN,FLAGS) Used the following commands to make these conversions: git grep -l DT_.*_GPIO_CONTROLLER | xargs sed -i 's/DT_\(.*\)_GPIO_CONTROLLER/DT_\1_GPIOS_CONTROLLER/g' git grep -l DT_.*_GPIO_PIN | xargs sed -i 's/DT_\(.*\)_GPIO_PIN/DT_\1_GPIOS_PIN/g' git grep -l DT_.*_GPIO_FLAGS | xargs sed -i 's/DT_\(.*\)_GPIO_FLAGS/DT_\1_GPIOS_FLAGS/g' Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
1 parent 0eee0a3 commit a614a02

File tree

32 files changed

+121
-121
lines changed

32 files changed

+121
-121
lines changed

doc/guides/dts/index.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -402,17 +402,17 @@ the format specified by the YAML bindings. For example:
402402
#define DT_GPIO_KEYS_0 1
403403
404404
/* button_0 */
405-
#define DT_GPIO_KEYS_BUTTON_0_GPIO_CONTROLLER "GPIO_2"
406-
#define DT_GPIO_KEYS_BUTTON_0_GPIO_FLAGS 0
407-
#define DT_GPIO_KEYS_BUTTON_0_GPIO_PIN 6
405+
#define DT_GPIO_KEYS_BUTTON_0_GPIOS_CONTROLLER "GPIO_2"
406+
#define DT_GPIO_KEYS_BUTTON_0_GPIOS_FLAGS 0
407+
#define DT_GPIO_KEYS_BUTTON_0_GPIOS_PIN 6
408408
#define DT_GPIO_KEYS_BUTTON_0_LABEL "User SW2"
409-
#define DT_GPIO_KEYS_SW1_GPIO_CONTROLLER DT_GPIO_KEYS_BUTTON_0_GPIO_CONTROLLER
410-
#define DT_GPIO_KEYS_SW1_GPIO_FLAGS DT_GPIO_KEYS_BUTTON_0_GPIO_FLAGS
411-
#define DT_GPIO_KEYS_SW1_GPIO_PIN DT_GPIO_KEYS_BUTTON_0_GPIO_PIN
409+
#define DT_GPIO_KEYS_SW1_GPIOS_CONTROLLER DT_GPIO_KEYS_BUTTON_0_GPIOS_CONTROLLER
410+
#define DT_GPIO_KEYS_SW1_GPIOS_FLAGS DT_GPIO_KEYS_BUTTON_0_GPIOS_FLAGS
411+
#define DT_GPIO_KEYS_SW1_GPIOS_PIN DT_GPIO_KEYS_BUTTON_0_GPIOS_PIN
412412
#define DT_GPIO_KEYS_SW1_LABEL DT_GPIO_KEYS_BUTTON_0_LABEL
413-
#define SW1_GPIO_CONTROLLER DT_GPIO_KEYS_BUTTON_0_GPIO_CONTROLLER
414-
#define SW1_GPIO_FLAGS DT_GPIO_KEYS_BUTTON_0_GPIO_FLAGS
415-
#define SW1_GPIO_PIN DT_GPIO_KEYS_BUTTON_0_GPIO_PIN
413+
#define SW1_GPIO_CONTROLLER DT_GPIO_KEYS_BUTTON_0_GPIOS_CONTROLLER
414+
#define SW1_GPIO_FLAGS DT_GPIO_KEYS_BUTTON_0_GPIOS_FLAGS
415+
#define SW1_GPIO_PIN DT_GPIO_KEYS_BUTTON_0_GPIOS_PIN
416416
#define SW1_LABEL DT_GPIO_KEYS_BUTTON_0_LABEL
417417
418418
Additionally, a file named ``generated_dts_board_fixups.h`` is

drivers/bluetooth/hci/spi.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
#define CMD_OGF 1
4646
#define CMD_OCF 2
4747

48-
#define GPIO_IRQ_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_IRQ_GPIO_PIN
49-
#define GPIO_RESET_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_RESET_GPIO_PIN
50-
#ifdef DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_PIN
51-
#define GPIO_CS_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_PIN
52-
#endif /* DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_PIN */
48+
#define GPIO_IRQ_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_IRQ_GPIOS_PIN
49+
#define GPIO_RESET_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_RESET_GPIOS_PIN
50+
#ifdef DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIOS_PIN
51+
#define GPIO_CS_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIOS_PIN
52+
#endif /* DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIOS_PIN */
5353

5454
/* Max SPI buffer length for transceive operations.
5555
*
@@ -194,10 +194,10 @@ static void bt_spi_handle_vendor_evt(u8_t *rxmsg)
194194
*/
195195
static int configure_cs(void)
196196
{
197-
cs_dev = device_get_binding(DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_CONTROLLER);
197+
cs_dev = device_get_binding(DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIOS_CONTROLLER);
198198
if (!cs_dev) {
199199
BT_ERR("Failed to initialize GPIO driver: %s",
200-
DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_CONTROLLER);
200+
DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIOS_CONTROLLER);
201201
return -EIO;
202202
}
203203

@@ -254,10 +254,10 @@ static int configure_cs(void)
254254

255255
spi_conf_cs.gpio_pin = GPIO_CS_PIN,
256256
spi_conf_cs.gpio_dev = device_get_binding(
257-
DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_CONTROLLER);
257+
DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIOS_CONTROLLER);
258258
if (!spi_conf_cs.gpio_dev) {
259259
BT_ERR("Failed to initialize GPIO driver: %s",
260-
DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_CONTROLLER);
260+
DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIOS_CONTROLLER);
261261
return -EIO;
262262
}
263263

@@ -545,18 +545,18 @@ static int bt_spi_init(struct device *unused)
545545
}
546546

547547
irq_dev = device_get_binding(
548-
DT_INST_0_ZEPHYR_BT_HCI_SPI_IRQ_GPIO_CONTROLLER);
548+
DT_INST_0_ZEPHYR_BT_HCI_SPI_IRQ_GPIOS_CONTROLLER);
549549
if (!irq_dev) {
550550
BT_ERR("Failed to initialize GPIO driver: %s",
551-
DT_INST_0_ZEPHYR_BT_HCI_SPI_IRQ_GPIO_CONTROLLER);
551+
DT_INST_0_ZEPHYR_BT_HCI_SPI_IRQ_GPIOS_CONTROLLER);
552552
return -EIO;
553553
}
554554

555555
rst_dev = device_get_binding(
556-
DT_INST_0_ZEPHYR_BT_HCI_SPI_RESET_GPIO_CONTROLLER);
556+
DT_INST_0_ZEPHYR_BT_HCI_SPI_RESET_GPIOS_CONTROLLER);
557557
if (!rst_dev) {
558558
BT_ERR("Failed to initialize GPIO driver: %s",
559-
DT_INST_0_ZEPHYR_BT_HCI_SPI_RESET_GPIO_CONTROLLER);
559+
DT_INST_0_ZEPHYR_BT_HCI_SPI_RESET_GPIOS_CONTROLLER);
560560
return -EIO;
561561
}
562562

drivers/can/can_mcp2515.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ static int mcp2515_init(struct device *dev)
531531
return -EINVAL;
532532
}
533533

534-
#ifdef DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN
534+
#ifdef DT_INST_0_MICROCHIP_MCP2515_CS_GPIOS_PIN
535535
dev_data->spi_cs_ctrl.gpio_dev =
536536
device_get_binding(dev_cfg->spi_cs_port);
537537
if (!dev_data->spi_cs_ctrl.gpio_dev) {
@@ -545,7 +545,7 @@ static int mcp2515_init(struct device *dev)
545545
dev_data->spi_cfg.cs = &dev_data->spi_cs_ctrl;
546546
#else
547547
dev_data->spi_cfg.cs = NULL;
548-
#endif /* DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN */
548+
#endif /* DT_INST_0_MICROCHIP_MCP2515_CS_GPIOS_PIN */
549549

550550
/* Reset MCP2515 */
551551
if (mcp2515_cmd_soft_reset(dev)) {
@@ -614,10 +614,10 @@ static const struct mcp2515_config mcp2515_config_1 = {
614614
.int_port = DT_INST_0_MICROCHIP_MCP2515_INT_GPIOS_CONTROLLER,
615615
.int_thread_stack_size = CONFIG_CAN_MCP2515_INT_THREAD_STACK_SIZE,
616616
.int_thread_priority = CONFIG_CAN_MCP2515_INT_THREAD_PRIO,
617-
#ifdef DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN
618-
.spi_cs_pin = DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN,
619-
.spi_cs_port = DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_CONTROLLER,
620-
#endif /* DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN */
617+
#ifdef DT_INST_0_MICROCHIP_MCP2515_CS_GPIOS_PIN
618+
.spi_cs_pin = DT_INST_0_MICROCHIP_MCP2515_CS_GPIOS_PIN,
619+
.spi_cs_port = DT_INST_0_MICROCHIP_MCP2515_CS_GPIOS_CONTROLLER,
620+
#endif /* DT_INST_0_MICROCHIP_MCP2515_CS_GPIOS_PIN */
621621
.tq_sjw = CONFIG_CAN_SJW,
622622
.tq_prop = CONFIG_CAN_PROP_SEG,
623623
.tq_bs1 = CONFIG_CAN_PHASE_SEG1,

drivers/can/can_mcp2515.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ struct mcp2515_data {
2727
/* spi device data */
2828
struct device *spi;
2929
struct spi_config spi_cfg;
30-
#ifdef DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN
30+
#ifdef DT_INST_0_MICROCHIP_MCP2515_CS_GPIOS_PIN
3131
struct spi_cs_control spi_cs_ctrl;
32-
#endif /* DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN */
32+
#endif /* DT_INST_0_MICROCHIP_MCP2515_CS_GPIOS_PIN */
3333

3434
/* interrupt data */
3535
struct device *int_gpio;

drivers/display/display_ili9340.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct ili9340_data {
2424
struct device *command_data_gpio;
2525
struct device *spi_dev;
2626
struct spi_config spi_config;
27-
#ifdef DT_INST_0_ILITEK_ILI9340_CS_GPIO_CONTROLLER
27+
#ifdef DT_INST_0_ILITEK_ILI9340_CS_GPIOS_CONTROLLER
2828
struct spi_cs_control cs_ctrl;
2929
#endif
3030
};
@@ -61,10 +61,10 @@ static int ili9340_init(struct device *dev)
6161
data->spi_config.operation = SPI_OP_MODE_MASTER | SPI_WORD_SET(8);
6262
data->spi_config.slave = DT_INST_0_ILITEK_ILI9340_BASE_ADDRESS;
6363

64-
#ifdef DT_INST_0_ILITEK_ILI9340_CS_GPIO_CONTROLLER
64+
#ifdef DT_INST_0_ILITEK_ILI9340_CS_GPIOS_CONTROLLER
6565
data->cs_ctrl.gpio_dev =
66-
device_get_binding(DT_INST_0_ILITEK_ILI9340_CS_GPIO_CONTROLLER);
67-
data->cs_ctrl.gpio_pin = DT_INST_0_ILITEK_ILI9340_CS_GPIO_PIN;
66+
device_get_binding(DT_INST_0_ILITEK_ILI9340_CS_GPIOS_CONTROLLER);
67+
data->cs_ctrl.gpio_pin = DT_INST_0_ILITEK_ILI9340_CS_GPIOS_PIN;
6868
data->cs_ctrl.delay = 0U;
6969
data->spi_config.cs = &(data->cs_ctrl);
7070
#else

drivers/display/ssd1673.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct ssd1673_data {
3939
struct device *busy;
4040
struct device *spi_dev;
4141
struct spi_config spi_config;
42-
#if defined(DT_INST_0_SOLOMON_SSD1673FB_CS_GPIO_CONTROLLER)
42+
#if defined(DT_INST_0_SOLOMON_SSD1673FB_CS_GPIOS_CONTROLLER)
4343
struct spi_cs_control cs_ctrl;
4444
#endif
4545
u8_t scan_mode;
@@ -620,15 +620,15 @@ static int ssd1673_init(struct device *dev)
620620
gpio_pin_configure(driver->busy, DT_INST_0_SOLOMON_SSD1673FB_BUSY_GPIOS_PIN,
621621
GPIO_DIR_IN);
622622

623-
#if defined(DT_INST_0_SOLOMON_SSD1673FB_CS_GPIO_CONTROLLER)
623+
#if defined(DT_INST_0_SOLOMON_SSD1673FB_CS_GPIOS_CONTROLLER)
624624
driver->cs_ctrl.gpio_dev = device_get_binding(
625-
DT_INST_0_SOLOMON_SSD1673FB_CS_GPIO_CONTROLLER);
625+
DT_INST_0_SOLOMON_SSD1673FB_CS_GPIOS_CONTROLLER);
626626
if (!driver->cs_ctrl.gpio_dev) {
627627
LOG_ERR("Unable to get SPI GPIO CS device");
628628
return -EIO;
629629
}
630630

631-
driver->cs_ctrl.gpio_pin = DT_INST_0_SOLOMON_SSD1673FB_CS_GPIO_PIN;
631+
driver->cs_ctrl.gpio_pin = DT_INST_0_SOLOMON_SSD1673FB_CS_GPIOS_PIN;
632632
driver->cs_ctrl.delay = 0U;
633633
driver->spi_config.cs = &driver->cs_ctrl;
634634
#endif

drivers/ethernet/eth_enc28j60.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,8 @@ static const struct eth_enc28j60_config eth_enc28j60_0_config = {
764764
.spi_freq = DT_INST_0_MICROCHIP_ENC28J60_SPI_MAX_FREQUENCY,
765765
.spi_slave = DT_INST_0_MICROCHIP_ENC28J60_BASE_ADDRESS,
766766
#ifdef CONFIG_ETH_ENC28J60_0_GPIO_SPI_CS
767-
.spi_cs_port = DT_INST_0_MICROCHIP_ENC28J60_CS_GPIO_CONTROLLER,
768-
.spi_cs_pin = DT_INST_0_MICROCHIP_ENC28J60_CS_GPIO_PIN,
767+
.spi_cs_port = DT_INST_0_MICROCHIP_ENC28J60_CS_GPIOS_CONTROLLER,
768+
.spi_cs_pin = DT_INST_0_MICROCHIP_ENC28J60_CS_GPIOS_PIN,
769769
#endif /* CONFIG_ETH_ENC28J60_0_GPIO_SPI_CS */
770770
.full_duplex = IS_ENABLED(CONFIG_ETH_ENC28J60_0_FULL_DUPLEX),
771771
.timeout = CONFIG_ETH_ENC28J60_TIMEOUT,

drivers/flash/spi_flash_w25qxxdv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,12 @@ static int spi_flash_wb_configure(struct device *dev)
412412

413413
#if defined(CONFIG_SPI_FLASH_W25QXXDV_GPIO_SPI_CS)
414414
data->cs_ctrl.gpio_dev = device_get_binding(
415-
DT_INST_0_WINBOND_W25Q16_CS_GPIO_CONTROLLER);
415+
DT_INST_0_WINBOND_W25Q16_CS_GPIOS_CONTROLLER);
416416
if (!data->cs_ctrl.gpio_dev) {
417417
return -ENODEV;
418418
}
419419

420-
data->cs_ctrl.gpio_pin = DT_INST_0_WINBOND_W25Q16_CS_GPIO_PIN;
420+
data->cs_ctrl.gpio_pin = DT_INST_0_WINBOND_W25Q16_CS_GPIOS_PIN;
421421
data->cs_ctrl.delay = CONFIG_SPI_FLASH_W25QXXDV_GPIO_CS_WAIT_DELAY;
422422

423423
data->spi_cfg.cs = &data->cs_ctrl;

drivers/flash/spi_nor.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
struct spi_nor_data {
4848
struct device *spi;
4949
struct spi_config spi_cfg;
50-
#ifdef DT_INST_0_JEDEC_SPI_NOR_CS_GPIO_CONTROLLER
50+
#ifdef DT_INST_0_JEDEC_SPI_NOR_CS_GPIOS_CONTROLLER
5151
struct spi_cs_control cs_ctrl;
52-
#endif /* DT_INST_0_JEDEC_SPI_NOR_CS_GPIO_CONTROLLER */
52+
#endif /* DT_INST_0_JEDEC_SPI_NOR_CS_GPIOS_CONTROLLER */
5353
struct k_sem sem;
5454
};
5555

@@ -348,18 +348,18 @@ static int spi_nor_configure(struct device *dev)
348348
data->spi_cfg.operation = SPI_WORD_SET(8);
349349
data->spi_cfg.slave = DT_INST_0_JEDEC_SPI_NOR_BASE_ADDRESS;
350350

351-
#ifdef DT_INST_0_JEDEC_SPI_NOR_CS_GPIO_CONTROLLER
351+
#ifdef DT_INST_0_JEDEC_SPI_NOR_CS_GPIOS_CONTROLLER
352352
data->cs_ctrl.gpio_dev =
353-
device_get_binding(DT_INST_0_JEDEC_SPI_NOR_CS_GPIO_CONTROLLER);
353+
device_get_binding(DT_INST_0_JEDEC_SPI_NOR_CS_GPIOS_CONTROLLER);
354354
if (!data->cs_ctrl.gpio_dev) {
355355
return -ENODEV;
356356
}
357357

358-
data->cs_ctrl.gpio_pin = DT_INST_0_JEDEC_SPI_NOR_CS_GPIO_PIN;
358+
data->cs_ctrl.gpio_pin = DT_INST_0_JEDEC_SPI_NOR_CS_GPIOS_PIN;
359359
data->cs_ctrl.delay = CONFIG_SPI_NOR_CS_WAIT_DELAY;
360360

361361
data->spi_cfg.cs = &data->cs_ctrl;
362-
#endif /* DT_INST_0_JEDEC_SPI_NOR_CS_GPIO_CONTROLLER */
362+
#endif /* DT_INST_0_JEDEC_SPI_NOR_CS_GPIOS_CONTROLLER */
363363

364364
/* now the spi bus is configured, we can verify the flash id */
365365
if (spi_nor_read_id(dev, params) != 0) {

drivers/ieee802154/ieee802154_cc2520.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -985,20 +985,20 @@ static inline int configure_spi(struct device *dev)
985985

986986
#if defined(CONFIG_IEEE802154_CC2520_GPIO_SPI_CS)
987987
cs_ctrl.gpio_dev = device_get_binding(
988-
DT_INST_0_TI_CC2520_CS_GPIO_CONTROLLER);
988+
DT_INST_0_TI_CC2520_CS_GPIOS_CONTROLLER);
989989
if (!cs_ctrl.gpio_dev) {
990990
LOG_ERR("Unable to get GPIO SPI CS device");
991991
return -ENODEV;
992992
}
993993

994-
cs_ctrl.gpio_pin = DT_INST_0_TI_CC2520_CS_GPIO_PIN;
994+
cs_ctrl.gpio_pin = DT_INST_0_TI_CC2520_CS_GPIOS_PIN;
995995
cs_ctrl.delay = 0U;
996996

997997
cc2520->spi_cfg.cs = &cs_ctrl;
998998

999999
LOG_DBG("SPI GPIO CS configured on %s:%u",
1000-
DT_INST_0_TI_CC2520_CS_GPIO_CONTROLLER,
1001-
DT_INST_0_TI_CC2520_CS_GPIO_PIN);
1000+
DT_INST_0_TI_CC2520_CS_GPIOS_CONTROLLER,
1001+
DT_INST_0_TI_CC2520_CS_GPIOS_PIN);
10021002
#endif /* CONFIG_IEEE802154_CC2520_GPIO_SPI_CS */
10031003

10041004
cc2520->spi_cfg.frequency = DT_INST_0_TI_CC2520_SPI_MAX_FREQUENCY;

drivers/ieee802154/ieee802154_mcr20a.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,23 +1378,23 @@ static inline int configure_spi(struct device *dev)
13781378
return -ENODEV;
13791379
}
13801380

1381-
#if defined(DT_NXP_MCR20A_0_CS_GPIO_CONTROLLER)
1381+
#if defined(DT_NXP_MCR20A_0_CS_GPIOS_CONTROLLER)
13821382
mcr20a->cs_ctrl.gpio_dev = device_get_binding(
1383-
DT_NXP_MCR20A_0_CS_GPIO_CONTROLLER);
1383+
DT_NXP_MCR20A_0_CS_GPIOS_CONTROLLER);
13841384
if (!mcr20a->cs_ctrl.gpio_dev) {
13851385
LOG_ERR("Unable to get GPIO SPI CS device");
13861386
return -ENODEV;
13871387
}
13881388

1389-
mcr20a->cs_ctrl.gpio_pin = DT_NXP_MCR20A_0_CS_GPIO_PIN;
1389+
mcr20a->cs_ctrl.gpio_pin = DT_NXP_MCR20A_0_CS_GPIOS_PIN;
13901390
mcr20a->cs_ctrl.delay = 0U;
13911391

13921392
mcr20a->spi_cfg.cs = &mcr20a->cs_ctrl;
13931393

13941394
LOG_DBG("SPI GPIO CS configured on %s:%u",
1395-
DT_NXP_MCR20A_0_CS_GPIO_CONTROLLER,
1396-
DT_NXP_MCR20A_0_CS_GPIO_PIN);
1397-
#endif /* DT_NXP_MCR20A_0_CS_GPIO_CONTROLLER */
1395+
DT_NXP_MCR20A_0_CS_GPIOS_CONTROLLER,
1396+
DT_NXP_MCR20A_0_CS_GPIOS_PIN);
1397+
#endif /* DT_NXP_MCR20A_0_CS_GPIOS_CONTROLLER */
13981398

13991399
mcr20a->spi_cfg.frequency = DT_INST_0_NXP_MCR20A_SPI_MAX_FREQUENCY;
14001400
mcr20a->spi_cfg.operation = SPI_WORD_SET(8);

drivers/ieee802154/ieee802154_mcr20a.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct mcr20a_context {
2525
struct gpio_callback irqb_cb;
2626
struct device *spi;
2727
struct spi_config spi_cfg;
28-
#if defined(DT_NXP_MCR20A_0_CS_GPIO_CONTROLLER)
28+
#if defined(DT_NXP_MCR20A_0_CS_GPIOS_CONTROLLER)
2929
struct spi_cs_control cs_ctrl;
3030
#endif
3131
u8_t mac_addr[8];

drivers/sensor/adxl362/adxl362.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ static int adxl362_init(struct device *dev)
734734
data->spi_cfg.frequency = config->spi_max_frequency;
735735
data->spi_cfg.slave = config->spi_slave;
736736

737-
#if defined(DT_INST_0_ADI_ADXL362_CS_GPIO_CONTROLLER)
737+
#if defined(DT_INST_0_ADI_ADXL362_CS_GPIOS_CONTROLLER)
738738
data->adxl362_cs_ctrl.gpio_dev =
739739
device_get_binding(config->gpio_cs_port);
740740
if (!data->adxl362_cs_ctrl.gpio_dev) {
@@ -788,9 +788,9 @@ static const struct adxl362_config adxl362_config = {
788788
.spi_name = DT_INST_0_ADI_ADXL362_BUS_NAME,
789789
.spi_slave = DT_INST_0_ADI_ADXL362_BASE_ADDRESS,
790790
.spi_max_frequency = DT_INST_0_ADI_ADXL362_SPI_MAX_FREQUENCY,
791-
#if defined(DT_INST_0_ADI_ADXL362_CS_GPIO_CONTROLLER)
792-
.gpio_cs_port = DT_INST_0_ADI_ADXL362_CS_GPIO_CONTROLLER,
793-
.cs_gpio = DT_INST_0_ADI_ADXL362_CS_GPIO_PIN,
791+
#if defined(DT_INST_0_ADI_ADXL362_CS_GPIOS_CONTROLLER)
792+
.gpio_cs_port = DT_INST_0_ADI_ADXL362_CS_GPIOS_CONTROLLER,
793+
.cs_gpio = DT_INST_0_ADI_ADXL362_CS_GPIOS_PIN,
794794
#endif
795795
#if defined(CONFIG_ADXL362_TRIGGER)
796796
.gpio_port = DT_INST_0_ADI_ADXL362_INT1_GPIOS_CONTROLLER,

drivers/sensor/adxl362/adxl362.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ struct adxl362_config {
174174
char *spi_name;
175175
u32_t spi_max_frequency;
176176
u16_t spi_slave;
177-
#if defined(DT_INST_0_ADI_ADXL362_CS_GPIO_CONTROLLER)
177+
#if defined(DT_INST_0_ADI_ADXL362_CS_GPIOS_CONTROLLER)
178178
const char *gpio_cs_port;
179179
u8_t cs_gpio;
180180
#endif
@@ -189,7 +189,7 @@ struct adxl362_config {
189189
struct adxl362_data {
190190
struct device *spi;
191191
struct spi_config spi_cfg;
192-
#if defined(DT_INST_0_ADI_ADXL362_CS_GPIO_CONTROLLER)
192+
#if defined(DT_INST_0_ADI_ADXL362_CS_GPIOS_CONTROLLER)
193193
struct spi_cs_control adxl362_cs_ctrl;
194194
#endif
195195
s16_t acc_x;

drivers/sensor/adxl372/adxl372.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ static int adxl372_init(struct device *dev)
898898
data->spi_cfg.frequency = cfg->spi_max_frequency;
899899
data->spi_cfg.slave = cfg->spi_slave;
900900

901-
#if defined(DT_INST_0_ADI_ADXL372_CS_GPIO_CONTROLLER)
901+
#if defined(DT_INST_0_ADI_ADXL372_CS_GPIOS_CONTROLLER)
902902
/* handle SPI CS thru GPIO if it is the case */
903903

904904
data->adxl372_cs_ctrl.gpio_dev = device_get_binding(cfg->gpio_cs_port);
@@ -932,9 +932,9 @@ static const struct adxl372_dev_config adxl372_config = {
932932
.spi_port = DT_INST_0_ADI_ADXL372_BUS_NAME,
933933
.spi_slave = DT_INST_0_ADI_ADXL372_BASE_ADDRESS,
934934
.spi_max_frequency = DT_INST_0_ADI_ADXL372_SPI_MAX_FREQUENCY,
935-
#ifdef DT_INST_0_ADI_ADXL372_CS_GPIO_CONTROLLER
936-
.gpio_cs_port = DT_INST_0_ADI_ADXL372_CS_GPIO_CONTROLLER,
937-
.cs_gpio = DT_INST_0_ADI_ADXL372_CS_GPIO_PIN,
935+
#ifdef DT_INST_0_ADI_ADXL372_CS_GPIOS_CONTROLLER
936+
.gpio_cs_port = DT_INST_0_ADI_ADXL372_CS_GPIOS_CONTROLLER,
937+
.cs_gpio = DT_INST_0_ADI_ADXL372_CS_GPIOS_PIN,
938938
#endif
939939
#endif
940940
#ifdef CONFIG_ADXL372_TRIGGER

drivers/sensor/adxl372/adxl372.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ struct adxl372_data {
282282
struct device *bus;
283283
#ifdef CONFIG_ADXL372_SPI
284284
struct spi_config spi_cfg;
285-
#if defined(DT_INST_0_ADI_ADXL372_CS_GPIO_CONTROLLER)
285+
#if defined(DT_INST_0_ADI_ADXL372_CS_GPIOS_CONTROLLER)
286286
struct spi_cs_control adxl372_cs_ctrl;
287287
#endif
288288
#endif
@@ -318,7 +318,7 @@ struct adxl372_dev_config {
318318
const char *spi_port;
319319
u16_t spi_slave;
320320
u32_t spi_max_frequency;
321-
#if defined(DT_INST_0_ADI_ADXL372_CS_GPIO_CONTROLLER)
321+
#if defined(DT_INST_0_ADI_ADXL372_CS_GPIOS_CONTROLLER)
322322
const char *gpio_cs_port;
323323
u8_t cs_gpio;
324324
#endif

0 commit comments

Comments
 (0)