diff --git a/drivers/i2c/gpio_i2c_switch.c b/drivers/i2c/gpio_i2c_switch.c index 1564f37006679a..a0b8166edbb72f 100644 --- a/drivers/i2c/gpio_i2c_switch.c +++ b/drivers/i2c/gpio_i2c_switch.c @@ -64,7 +64,7 @@ static int gpio_i2c_switch_transfer(const struct device *dev, struct i2c_msg *ms return res; } -static const struct i2c_driver_api gpio_i2c_switch_api_funcs = { +static DEVICE_API(i2c, gpio_i2c_switch_api_funcs) = { .configure = gpio_i2c_switch_configure, .transfer = gpio_i2c_switch_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_ambiq.c b/drivers/i2c/i2c_ambiq.c index 69492b5a60861d..50536a5dd53135 100644 --- a/drivers/i2c/i2c_ambiq.c +++ b/drivers/i2c/i2c_ambiq.c @@ -381,7 +381,7 @@ static int i2c_ambiq_init(const struct device *dev) return ret; } -static const struct i2c_driver_api i2c_ambiq_driver_api = { +static DEVICE_API(i2c, i2c_ambiq_driver_api) = { .configure = i2c_ambiq_configure, .transfer = i2c_ambiq_transfer, #if CONFIG_I2C_AMBIQ_BUS_RECOVERY diff --git a/drivers/i2c/i2c_andes_atciic100.c b/drivers/i2c/i2c_andes_atciic100.c index 3f1b4b9c3d2897..60e39c040c60da 100644 --- a/drivers/i2c/i2c_andes_atciic100.c +++ b/drivers/i2c/i2c_andes_atciic100.c @@ -732,7 +732,7 @@ static void i2c_atciic100_irq_handler(void *arg) } } -static const struct i2c_driver_api i2c_atciic100_driver = { +static DEVICE_API(i2c, i2c_atciic100_driver) = { .configure = (i2c_api_configure_t)i2c_atciic100_configure, .transfer = (i2c_api_full_io_t)i2c_atciic100_transfer, #if defined(CONFIG_I2C_TARGET) diff --git a/drivers/i2c/i2c_b91.c b/drivers/i2c/i2c_b91.c index f7b25f54fd1e2c..2681ef6e26fb46 100644 --- a/drivers/i2c/i2c_b91.c +++ b/drivers/i2c/i2c_b91.c @@ -147,7 +147,7 @@ static int i2c_b91_init(const struct device *dev) } /* I2C driver APIs structure */ -static const struct i2c_driver_api i2c_b91_api = { +static DEVICE_API(i2c, i2c_b91_api) = { .configure = i2c_b91_configure, .transfer = i2c_b91_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_bcm_iproc.c b/drivers/i2c/i2c_bcm_iproc.c index 18f6afb0ae68de..f424ab97e648d6 100644 --- a/drivers/i2c/i2c_bcm_iproc.c +++ b/drivers/i2c/i2c_bcm_iproc.c @@ -916,7 +916,7 @@ static int iproc_i2c_init(const struct device *dev) return 0; } -static const struct i2c_driver_api iproc_i2c_driver_api = { +static DEVICE_API(i2c, iproc_i2c_driver_api) = { .configure = iproc_i2c_configure, .transfer = iproc_i2c_transfer_multi, #ifdef CONFIG_I2C_TARGET diff --git a/drivers/i2c/i2c_cc13xx_cc26xx.c b/drivers/i2c/i2c_cc13xx_cc26xx.c index d06ffe3c5cb6cd..e475be674ca7e4 100644 --- a/drivers/i2c/i2c_cc13xx_cc26xx.c +++ b/drivers/i2c/i2c_cc13xx_cc26xx.c @@ -419,7 +419,7 @@ static int i2c_cc13xx_cc26xx_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_cc13xx_cc26xx_driver_api = { +static DEVICE_API(i2c, i2c_cc13xx_cc26xx_driver_api) = { .configure = i2c_cc13xx_cc26xx_configure, .transfer = i2c_cc13xx_cc26xx_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_cc32xx.c b/drivers/i2c/i2c_cc32xx.c index 57fee761799053..a5ce43b4a7aa43 100644 --- a/drivers/i2c/i2c_cc32xx.c +++ b/drivers/i2c/i2c_cc32xx.c @@ -379,7 +379,7 @@ static int i2c_cc32xx_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_cc32xx_driver_api = { +static DEVICE_API(i2c, i2c_cc32xx_driver_api) = { .configure = i2c_cc32xx_configure, .transfer = i2c_cc32xx_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_dw.c b/drivers/i2c/i2c_dw.c index 5d274dcf0adcd0..029fc1e58a1efd 100644 --- a/drivers/i2c/i2c_dw.c +++ b/drivers/i2c/i2c_dw.c @@ -1023,7 +1023,7 @@ static void i2c_dw_slave_read_clear_intr_bits(const struct device *dev) } #endif /* CONFIG_I2C_TARGET */ -static const struct i2c_driver_api funcs = { +static DEVICE_API(i2c, funcs) = { .configure = i2c_dw_runtime_configure, .transfer = i2c_dw_transfer, #ifdef CONFIG_I2C_TARGET diff --git a/drivers/i2c/i2c_emul.c b/drivers/i2c/i2c_emul.c index 5554ce81b5c65d..ee2ae8d3975b75 100644 --- a/drivers/i2c/i2c_emul.c +++ b/drivers/i2c/i2c_emul.c @@ -292,7 +292,7 @@ static int i2c_emul_target_unregister(const struct device *dev, struct i2c_targe /* Device instantiation */ -static const struct i2c_driver_api i2c_emul_api = { +static DEVICE_API(i2c, i2c_emul_api) = { .configure = i2c_emul_configure, .get_config = i2c_emul_get_config, .transfer = i2c_emul_transfer, diff --git a/drivers/i2c/i2c_ene_kb1200.c b/drivers/i2c/i2c_ene_kb1200.c index 322efd2e30c51e..359f99793e42e2 100644 --- a/drivers/i2c/i2c_ene_kb1200.c +++ b/drivers/i2c/i2c_ene_kb1200.c @@ -293,7 +293,7 @@ static int i2c_kb1200_transfer(const struct device *dev, struct i2c_msg *msgs, u } /* I2C Master driver registration */ -static const struct i2c_driver_api i2c_kb1200_api = { +static DEVICE_API(i2c, i2c_kb1200_api) = { .configure = i2c_kb1200_configure, .get_config = i2c_kb1200_get_config, .transfer = i2c_kb1200_transfer, diff --git a/drivers/i2c/i2c_esp32.c b/drivers/i2c/i2c_esp32.c index 07c8ea536caf65..a46e76f31a77f1 100644 --- a/drivers/i2c/i2c_esp32.c +++ b/drivers/i2c/i2c_esp32.c @@ -722,7 +722,7 @@ static void IRAM_ATTR i2c_esp32_isr(void *arg) k_sem_give(&data->cmd_sem); } -static const struct i2c_driver_api i2c_esp32_driver_api = { +static DEVICE_API(i2c, i2c_esp32_driver_api) = { .configure = i2c_esp32_configure, .get_config = i2c_esp32_get_config, .transfer = i2c_esp32_transfer, diff --git a/drivers/i2c/i2c_gd32.c b/drivers/i2c/i2c_gd32.c index 9b6d6f5e4e6166..381911fafb79c1 100644 --- a/drivers/i2c/i2c_gd32.c +++ b/drivers/i2c/i2c_gd32.c @@ -641,7 +641,7 @@ static int i2c_gd32_configure(const struct device *dev, return err; } -static const struct i2c_driver_api i2c_gd32_driver_api = { +static DEVICE_API(i2c, i2c_gd32_driver_api) = { .configure = i2c_gd32_configure, .transfer = i2c_gd32_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_gecko.c b/drivers/i2c/i2c_gecko.c index e2d44f3989c40e..373eb231f9ac49 100644 --- a/drivers/i2c/i2c_gecko.c +++ b/drivers/i2c/i2c_gecko.c @@ -216,7 +216,7 @@ static int i2c_gecko_target_unregister(const struct device *dev, struct i2c_targ } #endif -static const struct i2c_driver_api i2c_gecko_driver_api = { +static DEVICE_API(i2c, i2c_gecko_driver_api) = { .configure = i2c_gecko_configure, .transfer = i2c_gecko_transfer, #if defined(CONFIG_I2C_TARGET) diff --git a/drivers/i2c/i2c_gpio.c b/drivers/i2c/i2c_gpio.c index 80a1a221490f35..406b10af8634f0 100644 --- a/drivers/i2c/i2c_gpio.c +++ b/drivers/i2c/i2c_gpio.c @@ -140,7 +140,7 @@ static int i2c_gpio_recover_bus(const struct device *dev) return rc; } -static const struct i2c_driver_api api = { +static DEVICE_API(i2c, api) = { .configure = i2c_gpio_configure, .get_config = i2c_gpio_get_config, .transfer = i2c_gpio_transfer, diff --git a/drivers/i2c/i2c_ifx_cat1.c b/drivers/i2c/i2c_ifx_cat1.c index 90bf9c1e68b45e..3759be1d981f72 100644 --- a/drivers/i2c/i2c_ifx_cat1.c +++ b/drivers/i2c/i2c_ifx_cat1.c @@ -492,7 +492,7 @@ static int ifx_cat1_i2c_target_unregister(const struct device *dev, struct i2c_t } /* I2C API structure */ -static const struct i2c_driver_api i2c_cat1_driver_api = { +static DEVICE_API(i2c, i2c_cat1_driver_api) = { .configure = ifx_cat1_i2c_configure, .transfer = ifx_cat1_i2c_transfer, .get_config = ifx_cat1_i2c_get_config, diff --git a/drivers/i2c/i2c_ifx_xmc4.c b/drivers/i2c/i2c_ifx_xmc4.c index 253445809c3834..789f4f408f714e 100644 --- a/drivers/i2c/i2c_ifx_xmc4.c +++ b/drivers/i2c/i2c_ifx_xmc4.c @@ -425,7 +425,7 @@ static void i2c_xmc4_isr(const struct device *dev) /* I2C API structure */ -static const struct i2c_driver_api i2c_xmc4_driver_api = { +static DEVICE_API(i2c, i2c_xmc4_driver_api) = { .configure = ifx_xmc4_i2c_configure, .transfer = ifx_xmc4_i2c_transfer, .get_config = ifx_xmc4_i2c_get_config, diff --git a/drivers/i2c/i2c_imx.c b/drivers/i2c/i2c_imx.c index eba04101693f8d..d2c99ef9a8022c 100644 --- a/drivers/i2c/i2c_imx.c +++ b/drivers/i2c/i2c_imx.c @@ -360,7 +360,7 @@ static int i2c_imx_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_imx_driver_api = { +static DEVICE_API(i2c, i2c_imx_driver_api) = { .configure = i2c_imx_configure, .transfer = i2c_imx_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_ite_enhance.c b/drivers/i2c/i2c_ite_enhance.c index 1264bcec844914..e67083218ff793 100644 --- a/drivers/i2c/i2c_ite_enhance.c +++ b/drivers/i2c/i2c_ite_enhance.c @@ -1452,7 +1452,7 @@ static int i2c_enhance_target_unregister(const struct device *dev, } #endif -static const struct i2c_driver_api i2c_enhance_driver_api = { +static DEVICE_API(i2c, i2c_enhance_driver_api) = { .configure = i2c_enhance_configure, .get_config = i2c_enhance_get_config, .transfer = i2c_enhance_transfer, diff --git a/drivers/i2c/i2c_ite_it8xxx2.c b/drivers/i2c/i2c_ite_it8xxx2.c index a9247734be3fc8..203eaaa3d339ea 100644 --- a/drivers/i2c/i2c_ite_it8xxx2.c +++ b/drivers/i2c/i2c_ite_it8xxx2.c @@ -1250,7 +1250,7 @@ static int i2c_it8xxx2_recover_bus(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_it8xxx2_driver_api = { +static DEVICE_API(i2c, i2c_it8xxx2_driver_api) = { .configure = i2c_it8xxx2_configure, .get_config = i2c_it8xxx2_get_config, .transfer = i2c_it8xxx2_transfer, diff --git a/drivers/i2c/i2c_litex.c b/drivers/i2c/i2c_litex.c index 38e0cfa8cfd7f2..104829b6f7981d 100644 --- a/drivers/i2c/i2c_litex.c +++ b/drivers/i2c/i2c_litex.c @@ -136,7 +136,7 @@ static int i2c_litex_recover_bus(const struct device *dev) return i2c_bitbang_recover_bus(bitbang); } -static const struct i2c_driver_api i2c_litex_driver_api = { +static DEVICE_API(i2c, i2c_litex_driver_api) = { .configure = i2c_litex_configure, .get_config = i2c_litex_get_config, .transfer = i2c_litex_transfer, diff --git a/drivers/i2c/i2c_ll_stm32.c b/drivers/i2c/i2c_ll_stm32.c index 677d1f688e5a27..36aa57482ff78c 100644 --- a/drivers/i2c/i2c_ll_stm32.c +++ b/drivers/i2c/i2c_ll_stm32.c @@ -310,7 +310,7 @@ static int i2c_stm32_recover_bus(const struct device *dev) } #endif /* CONFIG_I2C_STM32_BUS_RECOVERY */ -static const struct i2c_driver_api api_funcs = { +static DEVICE_API(i2c, api_funcs) = { .configure = i2c_stm32_runtime_configure, .transfer = i2c_stm32_transfer, .get_config = i2c_stm32_get_config, diff --git a/drivers/i2c/i2c_lpc11u6x.c b/drivers/i2c/i2c_lpc11u6x.c index 2a32822be5c3cd..a00ac10dd5c6f3 100644 --- a/drivers/i2c/i2c_lpc11u6x.c +++ b/drivers/i2c/i2c_lpc11u6x.c @@ -340,7 +340,7 @@ static int lpc11u6x_i2c_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_api = { +static DEVICE_API(i2c, i2c_api) = { .configure = lpc11u6x_i2c_configure, .transfer = lpc11u6x_i2c_transfer, .target_register = lpc11u6x_i2c_slave_register, diff --git a/drivers/i2c/i2c_max32.c b/drivers/i2c/i2c_max32.c index e08612114323b7..c42f837bf3efe7 100644 --- a/drivers/i2c/i2c_max32.c +++ b/drivers/i2c/i2c_max32.c @@ -832,7 +832,7 @@ static void i2c_max32_isr(const struct device *dev) } #endif /* CONFIG_I2C_TARGET || CONFIG_I2C_MAX32_INTERRUPT */ -static const struct i2c_driver_api api = { +static DEVICE_API(i2c, api) = { .configure = api_configure, .transfer = api_transfer, #ifdef CONFIG_I2C_TARGET diff --git a/drivers/i2c/i2c_mchp_mss.c b/drivers/i2c/i2c_mchp_mss.c index ef132c6182cbf2..25e4e7c094a5f2 100644 --- a/drivers/i2c/i2c_mchp_mss.c +++ b/drivers/i2c/i2c_mchp_mss.c @@ -232,7 +232,7 @@ static int mss_i2c_transfer(const struct device *dev, struct i2c_msg *msgs, uint return 0; } -static const struct i2c_driver_api mss_i2c_driver_api = { +static DEVICE_API(i2c, mss_i2c_driver_api) = { .configure = mss_i2c_configure, .transfer = mss_i2c_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_mchp_xec.c b/drivers/i2c/i2c_mchp_xec.c index 6f48e9404b15c3..e1376470ff405d 100644 --- a/drivers/i2c/i2c_mchp_xec.c +++ b/drivers/i2c/i2c_mchp_xec.c @@ -829,7 +829,7 @@ static int i2c_xec_target_unregister(const struct device *dev, } #endif -static const struct i2c_driver_api i2c_xec_driver_api = { +static DEVICE_API(i2c, i2c_xec_driver_api) = { .configure = i2c_xec_configure, .transfer = i2c_xec_transfer, #ifdef CONFIG_I2C_TARGET diff --git a/drivers/i2c/i2c_mchp_xec_v2.c b/drivers/i2c/i2c_mchp_xec_v2.c index c0ab170ba03ef6..4feda66823ef69 100644 --- a/drivers/i2c/i2c_mchp_xec_v2.c +++ b/drivers/i2c/i2c_mchp_xec_v2.c @@ -1033,7 +1033,7 @@ static int i2c_xec_target_unregister(const struct device *dev, } #endif -static const struct i2c_driver_api i2c_xec_driver_api = { +static DEVICE_API(i2c, i2c_xec_driver_api) = { .configure = i2c_xec_configure, .transfer = i2c_xec_transfer, #ifdef CONFIG_I2C_TARGET diff --git a/drivers/i2c/i2c_mcux.c b/drivers/i2c/i2c_mcux.c index aaf6b0116a6de5..1ef10cc402060a 100644 --- a/drivers/i2c/i2c_mcux.c +++ b/drivers/i2c/i2c_mcux.c @@ -342,7 +342,7 @@ static int i2c_mcux_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_mcux_driver_api = { +static DEVICE_API(i2c, i2c_mcux_driver_api) = { .configure = i2c_mcux_configure, .transfer = i2c_mcux_transfer, #ifdef CONFIG_I2C_CALLBACK diff --git a/drivers/i2c/i2c_mcux_flexcomm.c b/drivers/i2c/i2c_mcux_flexcomm.c index 158deacc6dedd7..51b8bfe1f0d132 100644 --- a/drivers/i2c/i2c_mcux_flexcomm.c +++ b/drivers/i2c/i2c_mcux_flexcomm.c @@ -519,7 +519,7 @@ static int mcux_flexcomm_init(const struct device *dev) return 0; } -static const struct i2c_driver_api mcux_flexcomm_driver_api = { +static DEVICE_API(i2c, mcux_flexcomm_driver_api) = { .configure = mcux_flexcomm_configure, .transfer = mcux_flexcomm_transfer, #if defined(CONFIG_I2C_TARGET) diff --git a/drivers/i2c/i2c_mcux_lpi2c.c b/drivers/i2c/i2c_mcux_lpi2c.c index 74881543ede07a..86dc6303e25123 100644 --- a/drivers/i2c/i2c_mcux_lpi2c.c +++ b/drivers/i2c/i2c_mcux_lpi2c.c @@ -550,7 +550,7 @@ static int mcux_lpi2c_init(const struct device *dev) return 0; } -static const struct i2c_driver_api mcux_lpi2c_driver_api = { +static DEVICE_API(i2c, mcux_lpi2c_driver_api) = { .configure = mcux_lpi2c_configure, .transfer = mcux_lpi2c_transfer, #if CONFIG_I2C_MCUX_LPI2C_BUS_RECOVERY diff --git a/drivers/i2c/i2c_mcux_lpi2c_rtio.c b/drivers/i2c/i2c_mcux_lpi2c_rtio.c index c88cdf3b78f7ea..f267b7ada4ce12 100644 --- a/drivers/i2c/i2c_mcux_lpi2c_rtio.c +++ b/drivers/i2c/i2c_mcux_lpi2c_rtio.c @@ -332,7 +332,7 @@ static int mcux_lpi2c_init(const struct device *dev) return 0; } -static const struct i2c_driver_api mcux_lpi2c_driver_api = { +static DEVICE_API(i2c, mcux_lpi2c_driver_api) = { .configure = mcux_lpi2c_configure, .transfer = mcux_lpi2c_transfer, .iodev_submit = mcux_lpi2c_submit, diff --git a/drivers/i2c/i2c_nios2.c b/drivers/i2c/i2c_nios2.c index bbd1cf2223a5e6..c146aa210c6746 100644 --- a/drivers/i2c/i2c_nios2.c +++ b/drivers/i2c/i2c_nios2.c @@ -152,7 +152,7 @@ static void i2c_nios2_isr(const struct device *dev) static int i2c_nios2_init(const struct device *dev); -static const struct i2c_driver_api i2c_nios2_driver_api = { +static DEVICE_API(i2c, i2c_nios2_driver_api) = { .configure = i2c_nios2_configure, .transfer = i2c_nios2_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_npcx_port.c b/drivers/i2c/i2c_npcx_port.c index 17638909561723..8a3d98c07e765b 100644 --- a/drivers/i2c/i2c_npcx_port.c +++ b/drivers/i2c/i2c_npcx_port.c @@ -200,7 +200,7 @@ static int i2c_npcx_port_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_port_npcx_driver_api = { +static DEVICE_API(i2c, i2c_port_npcx_driver_api) = { .configure = i2c_npcx_port_configure, .get_config = i2c_npcx_port_get_config, .transfer = i2c_npcx_port_transfer, diff --git a/drivers/i2c/i2c_nrfx_twi.c b/drivers/i2c/i2c_nrfx_twi.c index 56d3727e125ef7..c2c0a28d8756e5 100644 --- a/drivers/i2c/i2c_nrfx_twi.c +++ b/drivers/i2c/i2c_nrfx_twi.c @@ -125,7 +125,7 @@ static void event_handler(nrfx_twi_evt_t const *p_event, void *p_context) k_sem_give(&dev_data->completion_sync); } -static const struct i2c_driver_api i2c_nrfx_twi_driver_api = { +static DEVICE_API(i2c, i2c_nrfx_twi_driver_api) = { .configure = i2c_nrfx_twi_configure, .transfer = i2c_nrfx_twi_transfer, .recover_bus = i2c_nrfx_twi_recover_bus, diff --git a/drivers/i2c/i2c_nrfx_twi_rtio.c b/drivers/i2c/i2c_nrfx_twi_rtio.c index 1eb9b3762b297d..9dc1b54914cd6a 100644 --- a/drivers/i2c/i2c_nrfx_twi_rtio.c +++ b/drivers/i2c/i2c_nrfx_twi_rtio.c @@ -152,7 +152,7 @@ static void i2c_nrfx_twi_rtio_submit(const struct device *dev, struct rtio_iodev } } -static const struct i2c_driver_api i2c_nrfx_twi_rtio_driver_api = { +static DEVICE_API(i2c, i2c_nrfx_twi_rtio_driver_api) = { .configure = i2c_nrfx_twi_rtio_configure, .transfer = i2c_nrfx_twi_rtio_transfer, .recover_bus = i2c_nrfx_twi_rtio_recover_bus, diff --git a/drivers/i2c/i2c_nrfx_twim.c b/drivers/i2c/i2c_nrfx_twim.c index 9609709d8c354f..f3d23521dd6eb9 100644 --- a/drivers/i2c/i2c_nrfx_twim.c +++ b/drivers/i2c/i2c_nrfx_twim.c @@ -204,7 +204,7 @@ static int i2c_nrfx_twim_init(const struct device *dev) return i2c_nrfx_twim_common_init(dev); } -static const struct i2c_driver_api i2c_nrfx_twim_driver_api = { +static DEVICE_API(i2c, i2c_nrfx_twim_driver_api) = { .configure = i2c_nrfx_twim_configure, .transfer = i2c_nrfx_twim_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_nrfx_twim_rtio.c b/drivers/i2c/i2c_nrfx_twim_rtio.c index ad4554332639b9..39c0380fb4cdb7 100644 --- a/drivers/i2c/i2c_nrfx_twim_rtio.c +++ b/drivers/i2c/i2c_nrfx_twim_rtio.c @@ -148,7 +148,7 @@ static void event_handler(nrfx_twim_evt_t const *p_event, void *p_context) i2c_nrfx_twim_rtio_complete(dev, status); } -static const struct i2c_driver_api i2c_nrfx_twim_driver_api = { +static DEVICE_API(i2c, i2c_nrfx_twim_driver_api) = { .configure = i2c_nrfx_twim_rtio_configure, .transfer = i2c_nrfx_twim_rtio_transfer, .recover_bus = i2c_nrfx_twim_rtio_recover_bus, diff --git a/drivers/i2c/i2c_numaker.c b/drivers/i2c/i2c_numaker.c index 9441db55ca0e5b..df2076becac35d 100644 --- a/drivers/i2c/i2c_numaker.c +++ b/drivers/i2c/i2c_numaker.c @@ -732,7 +732,7 @@ static int i2c_numaker_init(const struct device *dev) return err; } -static const struct i2c_driver_api i2c_numaker_driver_api = { +static DEVICE_API(i2c, i2c_numaker_driver_api) = { .configure = i2c_numaker_configure, .get_config = i2c_numaker_get_config, .transfer = i2c_numaker_transfer, diff --git a/drivers/i2c/i2c_rcar.c b/drivers/i2c/i2c_rcar.c index 495579bb1e4315..e8b7cd89505450 100644 --- a/drivers/i2c/i2c_rcar.c +++ b/drivers/i2c/i2c_rcar.c @@ -344,7 +344,7 @@ static int i2c_rcar_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_rcar_driver_api = { +static DEVICE_API(i2c, i2c_rcar_driver_api) = { .configure = i2c_rcar_configure, .transfer = i2c_rcar_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_renesas_ra_iic.c b/drivers/i2c/i2c_renesas_ra_iic.c index 98eb46f625d59e..8643b0c3d2e70a 100644 --- a/drivers/i2c/i2c_renesas_ra_iic.c +++ b/drivers/i2c/i2c_renesas_ra_iic.c @@ -473,7 +473,7 @@ static void calc_iic_master_clock_setting(const struct device *dev, const uint32 clk_cfg->brl_value, clk_cfg->brh_value, clk_cfg->cks_value); } -static const struct i2c_driver_api i2c_ra_iic_driver_api = { +static DEVICE_API(i2c, i2c_ra_iic_driver_api) = { .configure = i2c_ra_iic_configure, .get_config = i2c_ra_iic_get_config, .transfer = i2c_ra_iic_transfer, diff --git a/drivers/i2c/i2c_rv32m1_lpi2c.c b/drivers/i2c/i2c_rv32m1_lpi2c.c index a7bffef4d4b4d4..db378f7f104e9a 100644 --- a/drivers/i2c/i2c_rv32m1_lpi2c.c +++ b/drivers/i2c/i2c_rv32m1_lpi2c.c @@ -255,7 +255,7 @@ static int rv32m1_lpi2c_init(const struct device *dev) return 0; } -static const struct i2c_driver_api rv32m1_lpi2c_driver_api = { +static DEVICE_API(i2c, rv32m1_lpi2c_driver_api) = { .configure = rv32m1_lpi2c_configure, .transfer = rv32m1_lpi2c_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_sam0.c b/drivers/i2c/i2c_sam0.c index ff0b6c67fb652c..0f66844840795d 100644 --- a/drivers/i2c/i2c_sam0.c +++ b/drivers/i2c/i2c_sam0.c @@ -772,7 +772,7 @@ static int i2c_sam0_initialize(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_sam0_driver_api = { +static DEVICE_API(i2c, i2c_sam0_driver_api) = { .configure = i2c_sam0_configure, .transfer = i2c_sam0_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_sam4l_twim.c b/drivers/i2c/i2c_sam4l_twim.c index 3f8551267f76a9..3abd1b8c3fdf55 100644 --- a/drivers/i2c/i2c_sam4l_twim.c +++ b/drivers/i2c/i2c_sam4l_twim.c @@ -588,7 +588,7 @@ static int i2c_sam_twim_initialize(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_sam_twim_driver_api = { +static DEVICE_API(i2c, i2c_sam_twim_driver_api) = { .configure = i2c_sam_twim_configure, .transfer = i2c_sam_twim_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_sam_twi.c b/drivers/i2c/i2c_sam_twi.c index ad6a3277859889..2ef99caa907817 100644 --- a/drivers/i2c/i2c_sam_twi.c +++ b/drivers/i2c/i2c_sam_twi.c @@ -350,7 +350,7 @@ static int i2c_sam_twi_initialize(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_sam_twi_driver_api = { +static DEVICE_API(i2c, i2c_sam_twi_driver_api) = { .configure = i2c_sam_twi_configure, .transfer = i2c_sam_twi_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_sam_twihs.c b/drivers/i2c/i2c_sam_twihs.c index 4b1fda4ce573c7..0a5f4e0ade9daa 100644 --- a/drivers/i2c/i2c_sam_twihs.c +++ b/drivers/i2c/i2c_sam_twihs.c @@ -321,7 +321,7 @@ static int i2c_sam_twihs_initialize(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_sam_twihs_driver_api = { +static DEVICE_API(i2c, i2c_sam_twihs_driver_api) = { .configure = i2c_sam_twihs_configure, .transfer = i2c_sam_twihs_transfer, }; diff --git a/drivers/i2c/i2c_sam_twihs_rtio.c b/drivers/i2c/i2c_sam_twihs_rtio.c index bbece9d50e5065..0f8cf5730d0982 100644 --- a/drivers/i2c/i2c_sam_twihs_rtio.c +++ b/drivers/i2c/i2c_sam_twihs_rtio.c @@ -327,7 +327,7 @@ static int i2c_sam_twihs_initialize(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_sam_twihs_driver_api = { +static DEVICE_API(i2c, i2c_sam_twihs_driver_api) = { .configure = i2c_sam_twihs_configure, .transfer = i2c_sam_twihs_transfer, .iodev_submit = i2c_sam_twihs_submit, diff --git a/drivers/i2c/i2c_sbcon.c b/drivers/i2c/i2c_sbcon.c index 0212593ed3e530..bf77fcdf352bcc 100644 --- a/drivers/i2c/i2c_sbcon.c +++ b/drivers/i2c/i2c_sbcon.c @@ -113,7 +113,7 @@ static int i2c_sbcon_recover_bus(const struct device *dev) return i2c_bitbang_recover_bus(&context->bitbang); } -static const struct i2c_driver_api api = { +static DEVICE_API(i2c, api) = { .configure = i2c_sbcon_configure, .get_config = i2c_sbcon_get_config, .transfer = i2c_sbcon_transfer, diff --git a/drivers/i2c/i2c_sc18im704.c b/drivers/i2c/i2c_sc18im704.c index 64ea3482b28afe..722772931ba286 100644 --- a/drivers/i2c/i2c_sc18im704.c +++ b/drivers/i2c/i2c_sc18im704.c @@ -320,7 +320,7 @@ static int i2c_sc18im_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_sc18im_driver_api = { +static DEVICE_API(i2c, i2c_sc18im_driver_api) = { .configure = i2c_sc18im_configure, .get_config = i2c_sc18im_get_config, .transfer = i2c_sc18im_transfer, diff --git a/drivers/i2c/i2c_sedi.c b/drivers/i2c/i2c_sedi.c index 00ec5e06d4a0f6..e2646dc6b2385e 100644 --- a/drivers/i2c/i2c_sedi.c +++ b/drivers/i2c/i2c_sedi.c @@ -112,7 +112,7 @@ static int i2c_sedi_api_full_io(const struct device *dev, struct i2c_msg *msgs, return ret; } -static const struct i2c_driver_api i2c_sedi_apis = { +static DEVICE_API(i2c, i2c_sedi_apis) = { .configure = i2c_sedi_api_configure, .transfer = i2c_sedi_api_full_io, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_sifive.c b/drivers/i2c/i2c_sifive.c index 54ba5a779e462b..2677e530c09612 100644 --- a/drivers/i2c/i2c_sifive.c +++ b/drivers/i2c/i2c_sifive.c @@ -316,7 +316,7 @@ static int i2c_sifive_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_sifive_api = { +static DEVICE_API(i2c, i2c_sifive_api) = { .configure = i2c_sifive_configure, .transfer = i2c_sifive_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_smartbond.c b/drivers/i2c/i2c_smartbond.c index c402251e49b0e2..f7f2a5a0f1a7ef 100644 --- a/drivers/i2c/i2c_smartbond.c +++ b/drivers/i2c/i2c_smartbond.c @@ -548,7 +548,7 @@ static void i2c_smartbond_isr(const struct device *dev) #define I2C_SMARTBOND_CONFIGURE(id) #endif -static const struct i2c_driver_api i2c_smartbond_driver_api = { +static DEVICE_API(i2c, i2c_smartbond_driver_api) = { .configure = i2c_smartbond_configure, .get_config = i2c_smartbond_get_config, .transfer = i2c_smartbond_transfer, diff --git a/drivers/i2c/i2c_tca954x.c b/drivers/i2c/i2c_tca954x.c index 572b8daaf62e01..ab8c3f0101341e 100644 --- a/drivers/i2c/i2c_tca954x.c +++ b/drivers/i2c/i2c_tca954x.c @@ -153,7 +153,7 @@ static int tca954x_channel_init(const struct device *dev) return 0; } -static const struct i2c_driver_api tca954x_api_funcs = { +static DEVICE_API(i2c, tca954x_api_funcs) = { .configure = tca954x_configure, .transfer = tca954x_transfer, #ifdef CONFIG_I2C_RTIO diff --git a/drivers/i2c/i2c_test.c b/drivers/i2c/i2c_test.c index 89001f617827e2..dfe994deae6e70 100644 --- a/drivers/i2c/i2c_test.c +++ b/drivers/i2c/i2c_test.c @@ -27,7 +27,7 @@ static int vnd_i2c_transfer(const struct device *dev, return -ENOTSUP; } -static const struct i2c_driver_api vnd_i2c_api = { +static DEVICE_API(i2c, vnd_i2c_api) = { .configure = vnd_i2c_configure, .transfer = vnd_i2c_transfer, }; diff --git a/drivers/i2c/i2c_xilinx_axi.c b/drivers/i2c/i2c_xilinx_axi.c index 715deaa6bb71dc..61f9108b536071 100644 --- a/drivers/i2c/i2c_xilinx_axi.c +++ b/drivers/i2c/i2c_xilinx_axi.c @@ -620,7 +620,7 @@ static int i2c_xilinx_axi_init(const struct device *dev) return 0; } -static const struct i2c_driver_api i2c_xilinx_axi_driver_api = { +static DEVICE_API(i2c, i2c_xilinx_axi_driver_api) = { .configure = i2c_xilinx_axi_configure, .transfer = i2c_xilinx_axi_transfer, #if defined(CONFIG_I2C_TARGET) diff --git a/tests/drivers/i2c/i2c_target_api/common/i2c_virtual.c b/tests/drivers/i2c/i2c_target_api/common/i2c_virtual.c index d8833b69c0a128..d647061185c69c 100644 --- a/tests/drivers/i2c/i2c_target_api/common/i2c_virtual.c +++ b/tests/drivers/i2c/i2c_target_api/common/i2c_virtual.c @@ -204,7 +204,7 @@ static int i2c_virtual_transfer(const struct device *dev, struct i2c_msg *msg, return ret; } -static const struct i2c_driver_api api_funcs = { +static DEVICE_API(i2c, api_funcs) = { .configure = i2c_virtual_runtime_configure, .transfer = i2c_virtual_transfer, .target_register = i2c_virtual_target_register,