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:
Kumar Gala 2020-12-11 10:12:30 -06:00 committed by Maureen Helm
commit c49b162214
33 changed files with 150 additions and 136 deletions

View file

@ -1173,13 +1173,13 @@ static const struct uart_driver_api uart_xlnx_ps_driver_api = {
.irq_config_func = uart_xlnx_ps_irq_config_##port,
#define UART_XLNX_PS_IRQ_CONF_FUNC(port) \
DEVICE_DECLARE(uart_xlnx_ps_##port); \
DEVICE_DT_INST_DECLARE(port); \
\
static void uart_xlnx_ps_irq_config_##port(const struct device *dev) \
{ \
IRQ_CONNECT(DT_INST_IRQN(port), \
DT_INST_IRQ(port, priority), \
uart_xlnx_ps_isr, DEVICE_GET(uart_xlnx_ps_##port), \
uart_xlnx_ps_isr, DEVICE_DT_INST_GET(port), \
0); \
irq_enable(DT_INST_IRQN(port)); \
}
@ -1205,8 +1205,9 @@ static struct uart_xlnx_ps_dev_config uart_xlnx_ps_dev_cfg_##port = { \
}
#define UART_XLNX_PS_INIT(port) \
DEVICE_AND_API_INIT(uart_xlnx_ps_##port, DT_INST_LABEL(port), \
DEVICE_DT_INST_DEFINE(port, \
uart_xlnx_ps_init, \
device_pm_control_nop, \
&uart_xlnx_ps_dev_data_##port, \
&uart_xlnx_ps_dev_cfg_##port, \
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \