diff --git a/drivers/adc/adc_mcux_adc12.c b/drivers/adc/adc_mcux_adc12.c index 8105545ca2b708..f6f5b76282eda1 100644 --- a/drivers/adc/adc_mcux_adc12.c +++ b/drivers/adc/adc_mcux_adc12.c @@ -255,22 +255,22 @@ static const struct adc_driver_api mcux_adc12_driver_api = { #if CONFIG_ADC_0 static void mcux_adc12_config_func_0(struct device *dev); -ASSERT_WITHIN_RANGE(DT_NXP_KINETIS_ADC12_ADC_0_CLK_SOURCE, 0, 3, +ASSERT_WITHIN_RANGE(DT_INST_0_NXP_KINETIS_ADC12_ADC_CLK_SOURCE, 0, 3, "Invalid clock source"); -ASSERT_ADC12_CLK_DIV_VALID(DT_NXP_KINETIS_ADC12_ADC_0_CLK_DIVIDER, +ASSERT_ADC12_CLK_DIV_VALID(DT_INST_0_NXP_KINETIS_ADC12_ADC_CLK_DIVIDER, "Invalid clock divider"); -ASSERT_WITHIN_RANGE(DT_NXP_KINETIS_ADC12_ADC_0_SAMPLE_TIME, 2, 256, +ASSERT_WITHIN_RANGE(DT_INST_0_NXP_KINETIS_ADC12_ADC_SAMPLE_TIME, 2, 256, "Invalid sample time"); static const struct mcux_adc12_config mcux_adc12_config_0 = { - .base = (ADC_Type *)DT_NXP_KINETIS_ADC12_ADC_0_BASE_ADDRESS, - .clock_src = TO_ADC12_CLOCK_SRC(DT_NXP_KINETIS_ADC12_ADC_0_CLK_SOURCE), - .clock_div = TO_ADC12_CLOCK_DIV(DT_NXP_KINETIS_ADC12_ADC_0_CLK_DIVIDER), -#if DT_NXP_KINETIS_ADC12_ADC_0_ALTERNATE_VOLTAGE_REFERENCE == 1 + .base = (ADC_Type *)DT_INST_0_NXP_KINETIS_ADC12_ADC_BASE_ADDRESS, + .clock_src = TO_ADC12_CLOCK_SRC(DT_INST_0_NXP_KINETIS_ADC12_ADC_CLK_SOURCE), + .clock_div = TO_ADC12_CLOCK_DIV(DT_INST_0_NXP_KINETIS_ADC12_ADC_CLK_DIVIDER), +#if DT_INST_0_NXP_KINETIS_ADC12_ADC_ALTERNATE_VOLTAGE_REFERENCE == 1 .ref_src = kADC12_ReferenceVoltageSourceValt, #else .ref_src = kADC12_ReferenceVoltageSourceVref, #endif - .sample_clk_count = DT_NXP_KINETIS_ADC12_ADC_0_SAMPLE_TIME, + .sample_clk_count = DT_INST_0_NXP_KINETIS_ADC12_ADC_SAMPLE_TIME, .irq_config_func = mcux_adc12_config_func_0, }; @@ -280,40 +280,40 @@ static struct mcux_adc12_data mcux_adc12_data_0 = { ADC_CONTEXT_INIT_SYNC(mcux_adc12_data_0, ctx), }; -DEVICE_AND_API_INIT(mcux_adc12_0, DT_NXP_KINETIS_ADC12_ADC_0_LABEL, +DEVICE_AND_API_INIT(mcux_adc12_0, DT_INST_0_NXP_KINETIS_ADC12_ADC_LABEL, &mcux_adc12_init, &mcux_adc12_data_0, &mcux_adc12_config_0, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &mcux_adc12_driver_api); static void mcux_adc12_config_func_0(struct device *dev) { - IRQ_CONNECT(DT_NXP_KINETIS_ADC12_ADC_0_IRQ, - DT_NXP_KINETIS_ADC12_ADC_0_IRQ_PRIORITY, mcux_adc12_isr, + IRQ_CONNECT(DT_INST_0_NXP_KINETIS_ADC12_ADC_IRQ, + DT_INST_0_NXP_KINETIS_ADC12_ADC_IRQ_PRIORITY, mcux_adc12_isr, DEVICE_GET(mcux_adc12_0), 0); - irq_enable(DT_NXP_KINETIS_ADC12_ADC_0_IRQ); + irq_enable(DT_INST_0_NXP_KINETIS_ADC12_ADC_IRQ); } #endif /* CONFIG_ADC_0 */ #if CONFIG_ADC_1 static void mcux_adc12_config_func_1(struct device *dev); -ASSERT_WITHIN_RANGE(DT_NXP_KINETIS_ADC12_ADC_1_CLK_SOURCE, 0, 3, +ASSERT_WITHIN_RANGE(DT_INST_1_NXP_KINETIS_ADC12_ADC_CLK_SOURCE, 0, 3, "Invalid clock source"); -ASSERT_ADC12_CLK_DIV_VALID(DT_NXP_KINETIS_ADC12_ADC_1_CLK_DIVIDER, +ASSERT_ADC12_CLK_DIV_VALID(DT_INST_1_NXP_KINETIS_ADC12_ADC_CLK_DIVIDER, "Invalid clock divider"); -ASSERT_WITHIN_RANGE(DT_NXP_KINETIS_ADC12_ADC_1_SAMPLE_TIME, 2, 256, +ASSERT_WITHIN_RANGE(DT_INST_1_NXP_KINETIS_ADC12_ADC_SAMPLE_TIME, 2, 256, "Invalid sample time"); static const struct mcux_adc12_config mcux_adc12_config_1 = { - .base = (ADC_Type *)DT_NXP_KINETIS_ADC12_ADC_1_BASE_ADDRESS, - .clock_src = TO_ADC12_CLOCK_SRC(DT_NXP_KINETIS_ADC12_ADC_1_CLK_SOURCE), - .clock_div = TO_ADC12_CLOCK_DIV(DT_NXP_KINETIS_ADC12_ADC_1_CLK_DIVIDER), -#if DT_NXP_KINETIS_ADC12_ADC_1_ALTERNATE_VOLTAGE_REFERENCE == 1 + .base = (ADC_Type *)DT_INST_1_NXP_KINETIS_ADC12_ADC_BASE_ADDRESS, + .clock_src = TO_ADC12_CLOCK_SRC(DT_INST_1_NXP_KINETIS_ADC12_ADC_CLK_SOURCE), + .clock_div = TO_ADC12_CLOCK_DIV(DT_INST_1_NXP_KINETIS_ADC12_ADC_CLK_DIVIDER), +#if DT_INST_1_NXP_KINETIS_ADC12_ADC_ALTERNATE_VOLTAGE_REFERENCE == 1 .ref_src = kADC12_ReferenceVoltageSourceValt, #else .ref_src = kADC12_ReferenceVoltageSourceVref, #endif - .sample_clk_count = DT_NXP_KINETIS_ADC12_ADC_1_SAMPLE_TIME, + .sample_clk_count = DT_INST_1_NXP_KINETIS_ADC12_ADC_SAMPLE_TIME, .irq_config_func = mcux_adc12_config_func_1, }; @@ -323,40 +323,40 @@ static struct mcux_adc12_data mcux_adc12_data_1 = { ADC_CONTEXT_INIT_SYNC(mcux_adc12_data_1, ctx), }; -DEVICE_AND_API_INIT(mcux_adc12_1, DT_NXP_KINETIS_ADC12_ADC_1_LABEL, +DEVICE_AND_API_INIT(mcux_adc12_1, DT_INST_1_NXP_KINETIS_ADC12_ADC_LABEL, &mcux_adc12_init, &mcux_adc12_data_1, &mcux_adc12_config_1, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &mcux_adc12_driver_api); static void mcux_adc12_config_func_1(struct device *dev) { - IRQ_CONNECT(DT_NXP_KINETIS_ADC12_ADC_1_IRQ, - DT_NXP_KINETIS_ADC12_ADC_1_IRQ_PRIORITY, mcux_adc12_isr, + IRQ_CONNECT(DT_INST_1_NXP_KINETIS_ADC12_ADC_IRQ, + DT_INST_1_NXP_KINETIS_ADC12_ADC_IRQ_PRIORITY, mcux_adc12_isr, DEVICE_GET(mcux_adc12_1), 0); - irq_enable(DT_NXP_KINETIS_ADC12_ADC_1_IRQ); + irq_enable(DT_INST_1_NXP_KINETIS_ADC12_ADC_IRQ); } #endif /* CONFIG_ADC_1 */ #if CONFIG_ADC_2 static void mcux_adc12_config_func_2(struct device *dev); -ASSERT_WITHIN_RANGE(DT_NXP_KINETIS_ADC12_ADC_2_CLK_SOURCE, 0, 3, +ASSERT_WITHIN_RANGE(DT_INST_2_NXP_KINETIS_ADC12_ADC_CLK_SOURCE, 0, 3, "Invalid clock source"); -ASSERT_ADC12_CLK_DIV_VALID(DT_NXP_KINETIS_ADC12_ADC_2_CLK_DIVIDER, +ASSERT_ADC12_CLK_DIV_VALID(DT_INST_2_NXP_KINETIS_ADC12_ADC_CLK_DIVIDER, "Invalid clock divider"); -ASSERT_WITHIN_RANGE(DT_NXP_KINETIS_ADC12_ADC_2_SAMPLE_TIME, 2, 256, +ASSERT_WITHIN_RANGE(DT_INST_2_NXP_KINETIS_ADC12_ADC_SAMPLE_TIME, 2, 256, "Invalid sample time"); static const struct mcux_adc12_config mcux_adc12_config_2 = { - .base = (ADC_Type *)DT_NXP_KINETIS_ADC12_ADC_2_BASE_ADDRESS, - .clock_src = TO_ADC12_CLOCK_SRC(DT_NXP_KINETIS_ADC12_ADC_2_CLK_SOURCE), - .clock_div = TO_ADC12_CLOCK_DIV(DT_NXP_KINETIS_ADC12_ADC_2_CLK_DIVIDER), -#if DT_NXP_KINETIS_ADC12_ADC_2_ALTERNATE_VOLTAGE_REFERENCE == 1 + .base = (ADC_Type *)DT_INST_2_NXP_KINETIS_ADC12_ADC_BASE_ADDRESS, + .clock_src = TO_ADC12_CLOCK_SRC(DT_INST_2_NXP_KINETIS_ADC12_ADC_CLK_SOURCE), + .clock_div = TO_ADC12_CLOCK_DIV(DT_INST_2_NXP_KINETIS_ADC12_ADC_CLK_DIVIDER), +#if DT_INST_2_NXP_KINETIS_ADC12_ADC_ALTERNATE_VOLTAGE_REFERENCE == 1 .ref_src = kADC12_ReferenceVoltageSourceValt, #else .ref_src = kADC12_ReferenceVoltageSourceVref, #endif - .sample_clk_count = DT_NXP_KINETIS_ADC12_ADC_2_SAMPLE_TIME, + .sample_clk_count = DT_INST_2_NXP_KINETIS_ADC12_ADC_SAMPLE_TIME, .irq_config_func = mcux_adc12_config_func_2, }; @@ -366,17 +366,17 @@ static struct mcux_adc12_data mcux_adc12_data_2 = { ADC_CONTEXT_INIT_SYNC(mcux_adc12_data_2, ctx), }; -DEVICE_AND_API_INIT(mcux_adc12_2, DT_NXP_KINETIS_ADC12_ADC_2_LABEL, +DEVICE_AND_API_INIT(mcux_adc12_2, DT_INST_2_NXP_KINETIS_ADC12_ADC_LABEL, &mcux_adc12_init, &mcux_adc12_data_2, &mcux_adc12_config_2, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &mcux_adc12_driver_api); static void mcux_adc12_config_func_2(struct device *dev) { - IRQ_CONNECT(DT_NXP_KINETIS_ADC12_ADC_2_IRQ, - DT_NXP_KINETIS_ADC12_ADC_2_IRQ_PRIORITY, mcux_adc12_isr, + IRQ_CONNECT(DT_INST_2_NXP_KINETIS_ADC12_ADC_IRQ, + DT_INST_2_NXP_KINETIS_ADC12_ADC_IRQ_PRIORITY, mcux_adc12_isr, DEVICE_GET(mcux_adc12_2), 0); - irq_enable(DT_NXP_KINETIS_ADC12_ADC_2_IRQ); + irq_enable(DT_INST_2_NXP_KINETIS_ADC12_ADC_IRQ); } #endif /* CONFIG_ADC_2 */ diff --git a/drivers/audio/tlv320dac310x.c b/drivers/audio/tlv320dac310x.c index 18dcba946ba78f..5b0ec779f3752b 100644 --- a/drivers/audio/tlv320dac310x.c +++ b/drivers/audio/tlv320dac310x.c @@ -41,12 +41,12 @@ struct codec_driver_data { static struct codec_driver_config codec_device_config = { .i2c_device = NULL, - .i2c_dev_name = DT_TI_TLV320DAC_0_BUS_NAME, - .i2c_address = DT_TI_TLV320DAC_0_BASE_ADDRESS, + .i2c_dev_name = DT_INST_0_TI_TLV320DAC_BUS_NAME, + .i2c_address = DT_INST_0_TI_TLV320DAC_BASE_ADDRESS, .gpio_device = NULL, - .gpio_dev_name = DT_TI_TLV320DAC_0_RESET_GPIOS_CONTROLLER, - .gpio_pin = DT_TI_TLV320DAC_0_RESET_GPIOS_PIN, - .gpio_flags = DT_TI_TLV320DAC_0_RESET_GPIOS_FLAGS, + .gpio_dev_name = DT_INST_0_TI_TLV320DAC_RESET_GPIOS_CONTROLLER, + .gpio_pin = DT_INST_0_TI_TLV320DAC_RESET_GPIOS_PIN, + .gpio_flags = DT_INST_0_TI_TLV320DAC_RESET_GPIOS_FLAGS, }; static struct codec_driver_data codec_device_data; @@ -538,6 +538,6 @@ static const struct audio_codec_api codec_driver_api = { .apply_properties = codec_apply_properties, }; -DEVICE_AND_API_INIT(tlv320dac310x, DT_TI_TLV320DAC_0_LABEL, codec_initialize, +DEVICE_AND_API_INIT(tlv320dac310x, DT_INST_0_TI_TLV320DAC_LABEL, codec_initialize, &codec_device_data, &codec_device_config, POST_KERNEL, CONFIG_AUDIO_CODEC_INIT_PRIORITY, &codec_driver_api); diff --git a/drivers/can/can_mcp2515.c b/drivers/can/can_mcp2515.c index 3f3333eeef38cf..f5ece20eec00a8 100644 --- a/drivers/can/can_mcp2515.c +++ b/drivers/can/can_mcp2515.c @@ -531,7 +531,7 @@ static int mcp2515_init(struct device *dev) return -EINVAL; } -#ifdef DT_MICROCHIP_MCP2515_0_CS_GPIO_PIN +#ifdef DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN dev_data->spi_cs_ctrl.gpio_dev = device_get_binding(dev_cfg->spi_cs_port); if (!dev_data->spi_cs_ctrl.gpio_dev) { @@ -545,7 +545,7 @@ static int mcp2515_init(struct device *dev) dev_data->spi_cfg.cs = &dev_data->spi_cs_ctrl; #else dev_data->spi_cfg.cs = NULL; -#endif /* DT_MICROCHIP_MCP2515_0_CS_GPIO_PIN */ +#endif /* DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN */ /* Reset MCP2515 */ if (mcp2515_cmd_soft_reset(dev)) { @@ -607,25 +607,25 @@ static struct mcp2515_data mcp2515_data_1 = { }; static const struct mcp2515_config mcp2515_config_1 = { - .spi_port = DT_MICROCHIP_MCP2515_0_BUS_NAME, - .spi_freq = DT_MICROCHIP_MCP2515_0_SPI_MAX_FREQUENCY, - .spi_slave = DT_MICROCHIP_MCP2515_0_BASE_ADDRESS, - .int_pin = DT_MICROCHIP_MCP2515_0_INT_GPIOS_PIN, - .int_port = DT_MICROCHIP_MCP2515_0_INT_GPIOS_CONTROLLER, + .spi_port = DT_INST_0_MICROCHIP_MCP2515_BUS_NAME, + .spi_freq = DT_INST_0_MICROCHIP_MCP2515_SPI_MAX_FREQUENCY, + .spi_slave = DT_INST_0_MICROCHIP_MCP2515_BASE_ADDRESS, + .int_pin = DT_INST_0_MICROCHIP_MCP2515_INT_GPIOS_PIN, + .int_port = DT_INST_0_MICROCHIP_MCP2515_INT_GPIOS_CONTROLLER, .int_thread_stack_size = CONFIG_CAN_MCP2515_INT_THREAD_STACK_SIZE, .int_thread_priority = CONFIG_CAN_MCP2515_INT_THREAD_PRIO, -#ifdef DT_MICROCHIP_MCP2515_0_CS_GPIO_PIN - .spi_cs_pin = DT_MICROCHIP_MCP2515_0_CS_GPIO_PIN, - .spi_cs_port = DT_MICROCHIP_MCP2515_0_CS_GPIO_CONTROLLER, -#endif /* DT_MICROCHIP_MCP2515_0_CS_GPIO_PIN */ +#ifdef DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN + .spi_cs_pin = DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN, + .spi_cs_port = DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_CONTROLLER, +#endif /* DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN */ .tq_sjw = CONFIG_CAN_SJW, .tq_prop = CONFIG_CAN_PROP_SEG, .tq_bs1 = CONFIG_CAN_PHASE_SEG1, .tq_bs2 = CONFIG_CAN_PHASE_SEG2, - .bus_speed = DT_MICROCHIP_MCP2515_0_BUS_SPEED, + .bus_speed = DT_INST_0_MICROCHIP_MCP2515_BUS_SPEED, }; -DEVICE_AND_API_INIT(can_mcp2515_1, DT_MICROCHIP_MCP2515_0_LABEL, &mcp2515_init, +DEVICE_AND_API_INIT(can_mcp2515_1, DT_INST_0_MICROCHIP_MCP2515_LABEL, &mcp2515_init, &mcp2515_data_1, &mcp2515_config_1, POST_KERNEL, CONFIG_CAN_MCP2515_INIT_PRIORITY, &can_api_funcs); diff --git a/drivers/can/can_mcp2515.h b/drivers/can/can_mcp2515.h index a9f79982ccc705..485f8fdfb9b69b 100644 --- a/drivers/can/can_mcp2515.h +++ b/drivers/can/can_mcp2515.h @@ -27,9 +27,9 @@ struct mcp2515_data { /* spi device data */ struct device *spi; struct spi_config spi_cfg; -#ifdef DT_MICROCHIP_MCP2515_0_CS_GPIO_PIN +#ifdef DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN struct spi_cs_control spi_cs_ctrl; -#endif /* DT_MICROCHIP_MCP2515_0_CS_GPIO_PIN */ +#endif /* DT_INST_0_MICROCHIP_MCP2515_CS_GPIO_PIN */ /* interrupt data */ struct device *int_gpio; diff --git a/drivers/ethernet/eth_enc28j60.c b/drivers/ethernet/eth_enc28j60.c index 2145a4808fd994..3403f8b7a7c758 100644 --- a/drivers/ethernet/eth_enc28j60.c +++ b/drivers/ethernet/eth_enc28j60.c @@ -381,11 +381,11 @@ static void eth_enc28j60_init_mac(struct device *dev) /* Configure MAC address */ eth_enc28j60_set_bank(dev, ENC28J60_REG_MAADR0); eth_enc28j60_write_reg(dev, ENC28J60_REG_MAADR0, - DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_5); + DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_5); eth_enc28j60_write_reg(dev, ENC28J60_REG_MAADR1, - DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_4); + DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_4); eth_enc28j60_write_reg(dev, ENC28J60_REG_MAADR2, - DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_3); + DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_3); eth_enc28j60_write_reg(dev, ENC28J60_REG_MAADR3, MICROCHIP_OUI_B2); eth_enc28j60_write_reg(dev, ENC28J60_REG_MAADR4, MICROCHIP_OUI_B1); eth_enc28j60_write_reg(dev, ENC28J60_REG_MAADR5, MICROCHIP_OUI_B0); @@ -747,9 +747,9 @@ static struct eth_enc28j60_runtime eth_enc28j60_0_runtime = { MICROCHIP_OUI_B0, MICROCHIP_OUI_B1, MICROCHIP_OUI_B2, - DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_3, - DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_4, - DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_5 + DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_3, + DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_4, + DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_5 }, .tx_rx_sem = Z_SEM_INITIALIZER(eth_enc28j60_0_runtime.tx_rx_sem, 1, UINT_MAX), @@ -758,20 +758,20 @@ static struct eth_enc28j60_runtime eth_enc28j60_0_runtime = { }; static const struct eth_enc28j60_config eth_enc28j60_0_config = { - .gpio_port = DT_MICROCHIP_ENC28J60_0_INT_GPIOS_CONTROLLER, - .gpio_pin = DT_MICROCHIP_ENC28J60_0_INT_GPIOS_PIN, - .spi_port = DT_MICROCHIP_ENC28J60_0_BUS_NAME, - .spi_freq = DT_MICROCHIP_ENC28J60_0_SPI_MAX_FREQUENCY, - .spi_slave = DT_MICROCHIP_ENC28J60_0_BASE_ADDRESS, + .gpio_port = DT_INST_0_MICROCHIP_ENC28J60_INT_GPIOS_CONTROLLER, + .gpio_pin = DT_INST_0_MICROCHIP_ENC28J60_INT_GPIOS_PIN, + .spi_port = DT_INST_0_MICROCHIP_ENC28J60_BUS_NAME, + .spi_freq = DT_INST_0_MICROCHIP_ENC28J60_SPI_MAX_FREQUENCY, + .spi_slave = DT_INST_0_MICROCHIP_ENC28J60_BASE_ADDRESS, #ifdef CONFIG_ETH_ENC28J60_0_GPIO_SPI_CS - .spi_cs_port = DT_MICROCHIP_ENC28J60_0_CS_GPIO_CONTROLLER, - .spi_cs_pin = DT_MICROCHIP_ENC28J60_0_CS_GPIO_PIN, + .spi_cs_port = DT_INST_0_MICROCHIP_ENC28J60_CS_GPIO_CONTROLLER, + .spi_cs_pin = DT_INST_0_MICROCHIP_ENC28J60_CS_GPIO_PIN, #endif /* CONFIG_ETH_ENC28J60_0_GPIO_SPI_CS */ .full_duplex = IS_ENABLED(CONFIG_ETH_ENC28J60_0_FULL_DUPLEX), .timeout = CONFIG_ETH_ENC28J60_TIMEOUT, }; -NET_DEVICE_INIT(enc28j60_0, DT_MICROCHIP_ENC28J60_0_LABEL, +NET_DEVICE_INIT(enc28j60_0, DT_INST_0_MICROCHIP_ENC28J60_LABEL, eth_enc28j60_init, ð_enc28j60_0_runtime, ð_enc28j60_0_config, CONFIG_ETH_INIT_PRIORITY, &api_funcs, ETHERNET_L2, NET_L2_GET_CTX_TYPE(ETHERNET_L2), diff --git a/drivers/pwm/pwm_sam.c b/drivers/pwm/pwm_sam.c index 33a22dd8cb0016..6687c74f92da95 100644 --- a/drivers/pwm/pwm_sam.c +++ b/drivers/pwm/pwm_sam.c @@ -106,13 +106,13 @@ DEVICE_AND_API_INIT(sam_pwm_0, DT_INST_0_ATMEL_SAM_PWM_LABEL, &sam_pwm_init, #ifdef DT_ATMEL_SAM_PWM_1 static const struct sam_pwm_config sam_pwm_config_1 = { - .regs = (Pwm *)DT_ATMEL_SAM_PWM_1_BASE_ADDRESS, - .id = DT_ATMEL_SAM_PWM_1_PERIPHERAL_ID, - .prescaler = DT_ATMEL_SAM_PWM_1_PRESCALER, - .divider = DT_ATMEL_SAM_PWM_1_DIVIDER, + .regs = (Pwm *)DT_INST_1_ATMEL_SAM_PWM_BASE_ADDRESS, + .id = DT_INST_1_ATMEL_SAM_PWM_PERIPHERAL_ID, + .prescaler = DT_INST_1_ATMEL_SAM_PWM_PRESCALER, + .divider = DT_INST_1_ATMEL_SAM_PWM_DIVIDER, }; -DEVICE_AND_API_INIT(sam_pwm_1, DT_ATMEL_SAM_PWM_1_LABEL, &sam_pwm_init, +DEVICE_AND_API_INIT(sam_pwm_1, DT_INST_1_ATMEL_SAM_PWM_LABEL, &sam_pwm_init, NULL, &sam_pwm_config_1, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &sam_pwm_driver_api); diff --git a/drivers/serial/leuart_gecko.c b/drivers/serial/leuart_gecko.c index 9c957634540a7b..0eecb09bbb27c9 100644 --- a/drivers/serial/leuart_gecko.c +++ b/drivers/serial/leuart_gecko.c @@ -397,7 +397,7 @@ static const struct leuart_gecko_config leuart_gecko_1_config = { static struct leuart_gecko_data leuart_gecko_1_data; -DEVICE_AND_API_INIT(leuart_1, DT_SILABS_GECKO_LEUART_1_LABEL, +DEVICE_AND_API_INIT(leuart_1, DT_INST_1_SILABS_GECKO_LEUART_LABEL, &leuart_gecko_init, &leuart_gecko_1_data, &leuart_gecko_1_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, diff --git a/drivers/serial/uart_gecko.c b/drivers/serial/uart_gecko.c index 3326083c289a61..aa3f8b1f91584d 100644 --- a/drivers/serial/uart_gecko.c +++ b/drivers/serial/uart_gecko.c @@ -351,30 +351,30 @@ static void uart_gecko_config_func_0(struct device *dev) #ifdef DT_SILABS_GECKO_UART_1 -#define PIN_UART1_RXD {DT_SILABS_GECKO_UART_1_LOCATION_RX_1, \ - DT_SILABS_GECKO_UART_1_LOCATION_RX_2, gpioModeInput, 1} -#define PIN_UART1_TXD {DT_SILABS_GECKO_UART_1_LOCATION_TX_1, \ - DT_SILABS_GECKO_UART_1_LOCATION_TX_2, gpioModePushPull, 1} +#define PIN_UART1_RXD {DT_INST_1_SILABS_GECKO_UART_LOCATION_RX_1, \ + DT_INST_1_SILABS_GECKO_UART_LOCATION_RX_2, gpioModeInput, 1} +#define PIN_UART1_TXD {DT_INST_1_SILABS_GECKO_UART_LOCATION_TX_1, \ + DT_INST_1_SILABS_GECKO_UART_LOCATION_TX_2, gpioModePushPull, 1} #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_gecko_config_func_1(struct device *dev); #endif static const struct uart_gecko_config uart_gecko_1_config = { - .base = (USART_TypeDef *)DT_SILABS_GECKO_UART_1_BASE_ADDRESS, + .base = (USART_TypeDef *)DT_INST_1_SILABS_GECKO_UART_BASE_ADDRESS, .clock = cmuClock_UART1, - .baud_rate = DT_SILABS_GECKO_UART_1_CURRENT_SPEED, + .baud_rate = DT_INST_1_SILABS_GECKO_UART_CURRENT_SPEED, .pin_rx = PIN_UART1_RXD, .pin_tx = PIN_UART1_TXD, #ifdef CONFIG_SOC_GECKO_HAS_INDIVIDUAL_PIN_LOCATION - .loc_rx = DT_SILABS_GECKO_UART_1_LOCATION_RX_0, - .loc_tx = DT_SILABS_GECKO_UART_1_LOCATION_TX_0, + .loc_rx = DT_INST_1_SILABS_GECKO_UART_LOCATION_RX_0, + .loc_tx = DT_INST_1_SILABS_GECKO_UART_LOCATION_TX_0, #else -#if DT_SILABS_GECKO_UART_1_LOCATION_RX_0 \ - != DT_SILABS_GECKO_UART_1_LOCATION_TX_0 +#if DT_INST_1_SILABS_GECKO_UART_LOCATION_RX_0 \ + != DT_INST_1_SILABS_GECKO_UART_LOCATION_TX_0 #error UART_1 DTS location-* properties must have identical value #endif - .loc = DT_SILABS_GECKO_UART_1_LOCATION_RX_0, + .loc = DT_INST_1_SILABS_GECKO_UART_LOCATION_RX_0, #endif #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = uart_gecko_config_func_1, @@ -383,22 +383,22 @@ static const struct uart_gecko_config uart_gecko_1_config = { static struct uart_gecko_data uart_gecko_1_data; -DEVICE_AND_API_INIT(uart_1, DT_SILABS_GECKO_UART_1_LABEL, &uart_gecko_init, +DEVICE_AND_API_INIT(uart_1, DT_INST_1_SILABS_GECKO_UART_LABEL, &uart_gecko_init, &uart_gecko_1_data, &uart_gecko_1_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &uart_gecko_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_gecko_config_func_1(struct device *dev) { - IRQ_CONNECT(DT_SILABS_GECKO_UART_1_IRQ_RX, - DT_SILABS_GECKO_UART_1_IRQ_RX_PRIORITY, uart_gecko_isr, + IRQ_CONNECT(DT_INST_1_SILABS_GECKO_UART_IRQ_RX, + DT_INST_1_SILABS_GECKO_UART_IRQ_RX_PRIORITY, uart_gecko_isr, DEVICE_GET(uart_1), 0); - IRQ_CONNECT(DT_SILABS_GECKO_UART_1_IRQ_TX, - DT_SILABS_GECKO_UART_1_IRQ_TX_PRIORITY, uart_gecko_isr, + IRQ_CONNECT(DT_INST_1_SILABS_GECKO_UART_IRQ_TX, + DT_INST_1_SILABS_GECKO_UART_IRQ_TX_PRIORITY, uart_gecko_isr, DEVICE_GET(uart_1), 0); - irq_enable(DT_SILABS_GECKO_UART_1_IRQ_RX); - irq_enable(DT_SILABS_GECKO_UART_1_IRQ_TX); + irq_enable(DT_INST_1_SILABS_GECKO_UART_IRQ_RX); + irq_enable(DT_INST_1_SILABS_GECKO_UART_IRQ_TX); } #endif @@ -462,30 +462,30 @@ static void usart_gecko_config_func_0(struct device *dev) #ifdef DT_SILABS_GECKO_USART_1 -#define PIN_USART1_RXD {DT_SILABS_GECKO_USART_1_LOCATION_RX_1, \ - DT_SILABS_GECKO_USART_1_LOCATION_RX_2, gpioModeInput, 1} -#define PIN_USART1_TXD {DT_SILABS_GECKO_USART_1_LOCATION_TX_1, \ - DT_SILABS_GECKO_USART_1_LOCATION_TX_2, gpioModePushPull, 1} +#define PIN_USART1_RXD {DT_INST_1_SILABS_GECKO_USART_LOCATION_RX_1, \ + DT_INST_1_SILABS_GECKO_USART_LOCATION_RX_2, gpioModeInput, 1} +#define PIN_USART1_TXD {DT_INST_1_SILABS_GECKO_USART_LOCATION_TX_1, \ + DT_INST_1_SILABS_GECKO_USART_LOCATION_TX_2, gpioModePushPull, 1} #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void usart_gecko_config_func_1(struct device *dev); #endif static const struct uart_gecko_config usart_gecko_1_config = { - .base = (USART_TypeDef *)DT_SILABS_GECKO_USART_1_BASE_ADDRESS, + .base = (USART_TypeDef *)DT_INST_1_SILABS_GECKO_USART_BASE_ADDRESS, .clock = cmuClock_USART1, - .baud_rate = DT_SILABS_GECKO_USART_1_CURRENT_SPEED, + .baud_rate = DT_INST_1_SILABS_GECKO_USART_CURRENT_SPEED, .pin_rx = PIN_USART1_RXD, .pin_tx = PIN_USART1_TXD, #ifdef CONFIG_SOC_GECKO_HAS_INDIVIDUAL_PIN_LOCATION - .loc_rx = DT_SILABS_GECKO_USART_1_LOCATION_RX_0, - .loc_tx = DT_SILABS_GECKO_USART_1_LOCATION_TX_0, + .loc_rx = DT_INST_1_SILABS_GECKO_USART_LOCATION_RX_0, + .loc_tx = DT_INST_1_SILABS_GECKO_USART_LOCATION_TX_0, #else -#if DT_SILABS_GECKO_USART_1_LOCATION_RX_0 \ - != DT_SILABS_GECKO_USART_1_LOCATION_TX_0 +#if DT_INST_1_SILABS_GECKO_USART_LOCATION_RX_0 \ + != DT_INST_1_SILABS_GECKO_USART_LOCATION_TX_0 #error USART_1 DTS location-* properties must have identical value #endif - .loc = DT_SILABS_GECKO_USART_1_LOCATION_RX_0, + .loc = DT_INST_1_SILABS_GECKO_USART_LOCATION_RX_0, #endif #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = usart_gecko_config_func_1, @@ -494,7 +494,7 @@ static const struct uart_gecko_config usart_gecko_1_config = { static struct uart_gecko_data usart_gecko_1_data; -DEVICE_AND_API_INIT(usart_1, DT_SILABS_GECKO_USART_1_LABEL, +DEVICE_AND_API_INIT(usart_1, DT_INST_1_SILABS_GECKO_USART_LABEL, &uart_gecko_init, &usart_gecko_1_data, &usart_gecko_1_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &uart_gecko_driver_api); @@ -502,15 +502,15 @@ DEVICE_AND_API_INIT(usart_1, DT_SILABS_GECKO_USART_1_LABEL, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void usart_gecko_config_func_1(struct device *dev) { - IRQ_CONNECT(DT_SILABS_GECKO_USART_1_IRQ_RX, - DT_SILABS_GECKO_USART_1_IRQ_RX_PRIORITY, + IRQ_CONNECT(DT_INST_1_SILABS_GECKO_USART_IRQ_RX, + DT_INST_1_SILABS_GECKO_USART_IRQ_RX_PRIORITY, uart_gecko_isr, DEVICE_GET(usart_1), 0); - IRQ_CONNECT(DT_SILABS_GECKO_USART_1_IRQ_TX, - DT_SILABS_GECKO_USART_1_IRQ_TX_PRIORITY, + IRQ_CONNECT(DT_INST_1_SILABS_GECKO_USART_IRQ_TX, + DT_INST_1_SILABS_GECKO_USART_IRQ_TX_PRIORITY, uart_gecko_isr, DEVICE_GET(usart_1), 0); - irq_enable(DT_SILABS_GECKO_USART_1_IRQ_RX); - irq_enable(DT_SILABS_GECKO_USART_1_IRQ_TX); + irq_enable(DT_INST_1_SILABS_GECKO_USART_IRQ_RX); + irq_enable(DT_INST_1_SILABS_GECKO_USART_IRQ_TX); } #endif @@ -518,30 +518,30 @@ static void usart_gecko_config_func_1(struct device *dev) #ifdef DT_SILABS_GECKO_USART_2 -#define PIN_USART2_RXD {DT_SILABS_GECKO_USART_2_LOCATION_RX_1, \ - DT_SILABS_GECKO_USART_2_LOCATION_RX_2, gpioModeInput, 1} -#define PIN_USART2_TXD {DT_SILABS_GECKO_USART_2_LOCATION_TX_1, \ - DT_SILABS_GECKO_USART_2_LOCATION_TX_2, gpioModePushPull, 1} +#define PIN_USART2_RXD {DT_INST_2_SILABS_GECKO_USART_LOCATION_RX_1, \ + DT_INST_2_SILABS_GECKO_USART_LOCATION_RX_2, gpioModeInput, 1} +#define PIN_USART2_TXD {DT_INST_2_SILABS_GECKO_USART_LOCATION_TX_1, \ + DT_INST_2_SILABS_GECKO_USART_LOCATION_TX_2, gpioModePushPull, 1} #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void usart_gecko_config_func_2(struct device *dev); #endif static const struct uart_gecko_config usart_gecko_2_config = { - .base = (USART_TypeDef *)DT_SILABS_GECKO_USART_2_BASE_ADDRESS, + .base = (USART_TypeDef *)DT_INST_2_SILABS_GECKO_USART_BASE_ADDRESS, .clock = cmuClock_USART2, - .baud_rate = DT_SILABS_GECKO_USART_2_CURRENT_SPEED, + .baud_rate = DT_INST_2_SILABS_GECKO_USART_CURRENT_SPEED, .pin_rx = PIN_USART2_RXD, .pin_tx = PIN_USART2_TXD, #ifdef CONFIG_SOC_GECKO_HAS_INDIVIDUAL_PIN_LOCATION - .loc_rx = DT_SILABS_GECKO_USART_2_LOCATION_RX_0, - .loc_tx = DT_SILABS_GECKO_USART_2_LOCATION_TX_0, + .loc_rx = DT_INST_2_SILABS_GECKO_USART_LOCATION_RX_0, + .loc_tx = DT_INST_2_SILABS_GECKO_USART_LOCATION_TX_0, #else -#if DT_SILABS_GECKO_USART_2_LOCATION_RX_0 \ - != DT_SILABS_GECKO_USART_2_LOCATION_TX_0 +#if DT_INST_2_SILABS_GECKO_USART_LOCATION_RX_0 \ + != DT_INST_2_SILABS_GECKO_USART_LOCATION_TX_0 #error USART_2 DTS location-* properties must have identical value #endif - .loc = DT_SILABS_GECKO_USART_2_LOCATION_RX_0, + .loc = DT_INST_2_SILABS_GECKO_USART_LOCATION_RX_0, #endif #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = usart_gecko_config_func_2, @@ -550,7 +550,7 @@ static const struct uart_gecko_config usart_gecko_2_config = { static struct uart_gecko_data usart_gecko_2_data; -DEVICE_AND_API_INIT(usart_2, DT_SILABS_GECKO_USART_2_LABEL, +DEVICE_AND_API_INIT(usart_2, DT_INST_2_SILABS_GECKO_USART_LABEL, &uart_gecko_init, &usart_gecko_2_data, &usart_gecko_2_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &uart_gecko_driver_api); @@ -558,15 +558,15 @@ DEVICE_AND_API_INIT(usart_2, DT_SILABS_GECKO_USART_2_LABEL, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void usart_gecko_config_func_2(struct device *dev) { - IRQ_CONNECT(DT_SILABS_GECKO_USART_2_IRQ_RX, - DT_SILABS_GECKO_USART_2_IRQ_RX_PRIORITY, + IRQ_CONNECT(DT_INST_2_SILABS_GECKO_USART_IRQ_RX, + DT_INST_2_SILABS_GECKO_USART_IRQ_RX_PRIORITY, uart_gecko_isr, DEVICE_GET(usart_2), 0); - IRQ_CONNECT(DT_SILABS_GECKO_USART_2_IRQ_TX, - DT_SILABS_GECKO_USART_2_IRQ_TX_PRIORITY, + IRQ_CONNECT(DT_INST_2_SILABS_GECKO_USART_IRQ_TX, + DT_INST_2_SILABS_GECKO_USART_IRQ_TX_PRIORITY, uart_gecko_isr, DEVICE_GET(usart_2), 0); - irq_enable(DT_SILABS_GECKO_USART_2_IRQ_RX); - irq_enable(DT_SILABS_GECKO_USART_2_IRQ_TX); + irq_enable(DT_INST_2_SILABS_GECKO_USART_IRQ_RX); + irq_enable(DT_INST_2_SILABS_GECKO_USART_IRQ_TX); } #endif @@ -574,30 +574,30 @@ static void usart_gecko_config_func_2(struct device *dev) #ifdef DT_SILABS_GECKO_USART_3 -#define PIN_USART3_RXD {DT_SILABS_GECKO_USART_3_LOCATION_RX_1, \ - DT_SILABS_GECKO_USART_3_LOCATION_RX_2, gpioModeInput, 1} -#define PIN_USART3_TXD {DT_SILABS_GECKO_USART_3_LOCATION_TX_1, \ - DT_SILABS_GECKO_USART_3_LOCATION_TX_2, gpioModePushPull, 1} +#define PIN_USART3_RXD {DT_INST_3_SILABS_GECKO_USART_LOCATION_RX_1, \ + DT_INST_3_SILABS_GECKO_USART_LOCATION_RX_2, gpioModeInput, 1} +#define PIN_USART3_TXD {DT_INST_3_SILABS_GECKO_USART_LOCATION_TX_1, \ + DT_INST_3_SILABS_GECKO_USART_LOCATION_TX_2, gpioModePushPull, 1} #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void usart_gecko_config_func_3(struct device *dev); #endif static const struct uart_gecko_config usart_gecko_3_config = { - .base = (USART_TypeDef *)DT_SILABS_GECKO_USART_3_BASE_ADDRESS, + .base = (USART_TypeDef *)DT_INST_3_SILABS_GECKO_USART_BASE_ADDRESS, .clock = cmuClock_USART3, - .baud_rate = DT_SILABS_GECKO_USART_3_CURRENT_SPEED, + .baud_rate = DT_INST_3_SILABS_GECKO_USART_CURRENT_SPEED, .pin_rx = PIN_USART3_RXD, .pin_tx = PIN_USART3_TXD, #ifdef CONFIG_SOC_GECKO_HAS_INDIVIDUAL_PIN_LOCATION - .loc_rx = DT_SILABS_GECKO_USART_3_LOCATION_RX_0, - .loc_tx = DT_SILABS_GECKO_USART_3_LOCATION_TX_0, + .loc_rx = DT_INST_3_SILABS_GECKO_USART_LOCATION_RX_0, + .loc_tx = DT_INST_3_SILABS_GECKO_USART_LOCATION_TX_0, #else -#if DT_SILABS_GECKO_USART_3_LOCATION_RX_0 \ - != DT_SILABS_GECKO_USART_3_LOCATION_TX_0 +#if DT_INST_3_SILABS_GECKO_USART_LOCATION_RX_0 \ + != DT_INST_3_SILABS_GECKO_USART_LOCATION_TX_0 #error USART_3 DTS location-* properties must have identical value #endif - .loc = DT_SILABS_GECKO_USART_3_LOCATION_RX_0, + .loc = DT_INST_3_SILABS_GECKO_USART_LOCATION_RX_0, #endif #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = usart_gecko_config_func_3, @@ -606,7 +606,7 @@ static const struct uart_gecko_config usart_gecko_3_config = { static struct uart_gecko_data usart_gecko_3_data; -DEVICE_AND_API_INIT(usart_3, DT_SILABS_GECKO_USART_3_LABEL, +DEVICE_AND_API_INIT(usart_3, DT_INST_3_SILABS_GECKO_USART_LABEL, &uart_gecko_init, &usart_gecko_3_data, &usart_gecko_3_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &uart_gecko_driver_api); @@ -614,15 +614,15 @@ DEVICE_AND_API_INIT(usart_3, DT_SILABS_GECKO_USART_3_LABEL, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void usart_gecko_config_func_3(struct device *dev) { - IRQ_CONNECT(DT_SILABS_GECKO_USART_3_IRQ_RX, - DT_SILABS_GECKO_USART_3_IRQ_RX_PRIORITY, + IRQ_CONNECT(DT_INST_3_SILABS_GECKO_USART_IRQ_RX, + DT_INST_3_SILABS_GECKO_USART_IRQ_RX_PRIORITY, uart_gecko_isr, DEVICE_GET(usart_3), 0); - IRQ_CONNECT(DT_SILABS_GECKO_USART_3_IRQ_TX, - DT_SILABS_GECKO_USART_3_IRQ_TX_PRIORITY, + IRQ_CONNECT(DT_INST_3_SILABS_GECKO_USART_IRQ_TX, + DT_INST_3_SILABS_GECKO_USART_IRQ_TX_PRIORITY, uart_gecko_isr, DEVICE_GET(usart_3), 0); - irq_enable(DT_SILABS_GECKO_USART_3_IRQ_RX); - irq_enable(DT_SILABS_GECKO_USART_3_IRQ_TX); + irq_enable(DT_INST_3_SILABS_GECKO_USART_IRQ_RX); + irq_enable(DT_INST_3_SILABS_GECKO_USART_IRQ_TX); } #endif diff --git a/samples/boards/intel_s1000_crb/audio/src/audio_driver.c b/samples/boards/intel_s1000_crb/audio/src/audio_driver.c index c6408b6211bb14..a7f9957f7ac391 100644 --- a/samples/boards/intel_s1000_crb/audio/src/audio_driver.c +++ b/samples/boards/intel_s1000_crb/audio/src/audio_driver.c @@ -303,9 +303,9 @@ static void audio_driver_config_periph_streams(void) return; } - codec_dev = device_get_binding(DT_TI_TLV320DAC_0_LABEL); + codec_dev = device_get_binding(DT_INST_0_TI_TLV320DAC_LABEL); if (!codec_dev) { - LOG_ERR("unable to find device %s", DT_TI_TLV320DAC_0_LABEL); + LOG_ERR("unable to find device %s", DT_INST_0_TI_TLV320DAC_LABEL); return; } diff --git a/samples/boards/intel_s1000_crb/i2s/src/i2s_sample.c b/samples/boards/intel_s1000_crb/i2s/src/i2s_sample.c index 477f646a623a0b..78401c8686aba5 100644 --- a/samples/boards/intel_s1000_crb/i2s/src/i2s_sample.c +++ b/samples/boards/intel_s1000_crb/i2s/src/i2s_sample.c @@ -140,9 +140,9 @@ static void i2s_audio_init(void) return; } - codec_device = device_get_binding(DT_TI_TLV320DAC_0_LABEL); + codec_device = device_get_binding(DT_INST_0_TI_TLV320DAC_LABEL); if (!codec_device) { - LOG_ERR("unable to find " DT_TI_TLV320DAC_0_LABEL " device"); + LOG_ERR("unable to find " DT_INST_0_TI_TLV320DAC_LABEL " device"); return; } diff --git a/tests/drivers/build_all/dts_fixup.h b/tests/drivers/build_all/dts_fixup.h index 04aa44a5ac30be..800c1d6584d309 100644 --- a/tests/drivers/build_all/dts_fixup.h +++ b/tests/drivers/build_all/dts_fixup.h @@ -276,20 +276,20 @@ #define DT_ST_LIS2DW12_BUS_SPI 1 #endif -#ifndef DT_MICROCHIP_ENC28J60_0_LABEL -#define DT_MICROCHIP_ENC28J60_0_BASE_ADDRESS 0 -#define DT_MICROCHIP_ENC28J60_0_BUS_NAME "" -#define DT_MICROCHIP_ENC28J60_0_INT_GPIOS_CONTROLLER "" -#define DT_MICROCHIP_ENC28J60_0_INT_GPIOS_FLAGS 0 -#define DT_MICROCHIP_ENC28J60_0_INT_GPIOS_PIN 0 -#define DT_MICROCHIP_ENC28J60_0_LABEL "" -#define DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_0 0 -#define DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_1 0 -#define DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_2 0 -#define DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_3 0 -#define DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_4 0 -#define DT_MICROCHIP_ENC28J60_0_LOCAL_MAC_ADDRESS_5 0 -#define DT_MICROCHIP_ENC28J60_0_SPI_MAX_FREQUENCY 0 +#ifndef DT_INST_0_MICROCHIP_ENC28J60_LABEL +#define DT_INST_0_MICROCHIP_ENC28J60_BASE_ADDRESS 0 +#define DT_INST_0_MICROCHIP_ENC28J60_BUS_NAME "" +#define DT_INST_0_MICROCHIP_ENC28J60_INT_GPIOS_CONTROLLER "" +#define DT_INST_0_MICROCHIP_ENC28J60_INT_GPIOS_FLAGS 0 +#define DT_INST_0_MICROCHIP_ENC28J60_INT_GPIOS_PIN 0 +#define DT_INST_0_MICROCHIP_ENC28J60_LABEL "" +#define DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_0 0 +#define DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_1 0 +#define DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_2 0 +#define DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_3 0 +#define DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_4 0 +#define DT_INST_0_MICROCHIP_ENC28J60_LOCAL_MAC_ADDRESS_5 0 +#define DT_INST_0_MICROCHIP_ENC28J60_SPI_MAX_FREQUENCY 0 #endif #endif /* CONFIG_HAS_DTS_SPI */