drivers: display: Convert drivers to new DT device macros

Convert display drivers from:

    DEVICE_AND_API_INIT -> DEVICE_DT_INST_DEFINE
    DEVICE_DEFINE -> DEVICE_DT_INST_DEFINE
    DEVICE_GET -> DEVICE_DT_INST_GET

etc..

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-12-16 06:51:32 -06:00 committed by Anas Nashif
parent ead46e029f
commit bdb773c1c4
6 changed files with 9 additions and 8 deletions

View file

@ -477,8 +477,8 @@ static const struct display_driver_api ili9xxx_api = {
\
static struct ili9xxx_data ili9xxx_data_##n; \
\
DEVICE_AND_API_INIT(ili9xxx_##n, DT_LABEL(INST_DT_ILI9XXX(n, t)), \
ili9xxx_init, &ili9xxx_data_##n, \
DEVICE_DT_DEFINE(INST_DT_ILI9XXX(n, t), ili9xxx_init, \
device_pm_control_nop, &ili9xxx_data_##n, \
&ili9xxx_config_##n, POST_KERNEL, \
CONFIG_APPLICATION_INIT_PRIORITY, &ili9xxx_api);

View file

@ -256,8 +256,9 @@ static struct mcux_elcdif_config mcux_elcdif_config_1 = {
static struct mcux_elcdif_data mcux_elcdif_data_1;
DEVICE_AND_API_INIT(mcux_elcdif_1, DT_INST_LABEL(0),
DEVICE_DT_INST_DEFINE(0,
&mcux_elcdif_init,
device_pm_control_nop,
&mcux_elcdif_data_1, &mcux_elcdif_config_1,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&mcux_elcdif_api);
@ -266,7 +267,7 @@ static void mcux_elcdif_config_func_1(const struct device *dev)
{
IRQ_CONNECT(DT_INST_IRQN(0),
DT_INST_IRQ(0, priority),
mcux_elcdif_isr, DEVICE_GET(mcux_elcdif_1), 0);
mcux_elcdif_isr, DEVICE_DT_INST_GET(0), 0);
irq_enable(DT_INST_IRQN(0));
}

View file

@ -460,6 +460,6 @@ static struct st7789v_data st7789v_data = {
.y_offset = DT_INST_PROP(0, y_offset),
};
DEVICE_DEFINE(st7789v, DT_INST_LABEL(0), &st7789v_init,
DEVICE_DT_INST_DEFINE(0, &st7789v_init,
st7789v_pm_control, &st7789v_data, NULL, APPLICATION,
CONFIG_APPLICATION_INIT_PRIORITY, &st7789v_api);

View file

@ -466,7 +466,7 @@ static struct display_driver_api gd7965_driver_api = {
};
DEVICE_AND_API_INIT(gd7965, DT_INST_LABEL(0), gd7965_init,
DEVICE_DT_INST_DEFINE(0, gd7965_init, device_pm_control_nop,
&gd7965_driver, NULL,
POST_KERNEL, CONFIG_APPLICATION_INIT_PRIORITY,
&gd7965_driver_api);

View file

@ -455,7 +455,7 @@ static struct display_driver_api ssd1306_driver_api = {
.set_orientation = ssd1306_set_orientation,
};
DEVICE_AND_API_INIT(ssd1306, DT_INST_LABEL(0), ssd1306_init,
DEVICE_DT_INST_DEFINE(0, ssd1306_init, device_pm_control_nop,
&ssd1306_driver, NULL,
POST_KERNEL, CONFIG_APPLICATION_INIT_PRIORITY,
&ssd1306_driver_api);

View file

@ -717,7 +717,7 @@ static struct display_driver_api ssd16xx_driver_api = {
};
DEVICE_AND_API_INIT(ssd16xx, DT_INST_LABEL(0), ssd16xx_init,
DEVICE_DT_INST_DEFINE(0, ssd16xx_init, device_pm_control_nop,
&ssd16xx_driver, NULL,
POST_KERNEL, CONFIG_APPLICATION_INIT_PRIORITY,
&ssd16xx_driver_api);