drivers: uart: Convert drivers to new DT device macros
Convert uart drivers from: DEVICE_AND_API_INIT -> DEVICE_DT_INST_DEFINE DEVICE_GET -> DEVICE_DT_INST_GET DEVICE_DECLARE -> DEVICE_DT_INST_DECLARE etc.. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
055a01b962
commit
c49b162214
33 changed files with 150 additions and 136 deletions
|
@ -317,8 +317,9 @@ static const struct uart_liteuart_device_config uart_liteuart_dev_cfg_0 = {
|
|||
.baud_rate = DT_INST_PROP(0, current_speed)
|
||||
};
|
||||
|
||||
DEVICE_AND_API_INIT(uart_liteuart_0, DT_INST_LABEL(0),
|
||||
DEVICE_DT_INST_DEFINE(0,
|
||||
uart_liteuart_init,
|
||||
device_pm_control_nop,
|
||||
&uart_liteuart_data_0, &uart_liteuart_dev_cfg_0,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
(void *)&uart_liteuart_driver_api);
|
||||
|
@ -329,7 +330,7 @@ static int uart_liteuart_init(const struct device *dev)
|
|||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
IRQ_CONNECT(UART_IRQ, DT_INST_IRQ(0, priority),
|
||||
liteuart_uart_irq_handler, DEVICE_GET(uart_liteuart_0),
|
||||
liteuart_uart_irq_handler, DEVICE_DT_INST_GET(0),
|
||||
0);
|
||||
irq_enable(UART_IRQ);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue