Skip to content
Permalink
Browse files

dts: Convert new/missed DT_<COMPAT>_<INSTANCE>_<PROP> to DT_INST...

Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information...
galak authored and nashif committed Jun 14, 2019
1 parent 4396dc9 commit d4a0c3a2aa9b1b99949caa9f0ad34a0e8e3883db
@@ -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 */
@@ -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);
@@ -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);

@@ -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;
@@ -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, &eth_enc28j60_0_runtime,
&eth_enc28j60_0_config, CONFIG_ETH_INIT_PRIORITY, &api_funcs,
ETHERNET_L2, NET_L2_GET_CTX_TYPE(ETHERNET_L2),
@@ -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);
@@ -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,

0 comments on commit d4a0c3a

Please sign in to comment.
You can’t perform that action at this time.