Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: i2c+i3c: Place API into iterable section #82207

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/i2c/gpio_i2c_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ambiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_andes_atciic100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_b91.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_bcm_iproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_cc13xx_cc26xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_cc32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_emul.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ene_kb1200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_esp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_gd32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_gecko.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ifx_cat1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ifx_xmc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ite_enhance.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ite_it8xxx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_litex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ll_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_lpc11u6x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_max32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_mchp_mss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_mchp_xec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_mchp_xec_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_mcux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_mcux_flexcomm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_mcux_lpi2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_mcux_lpi2c_rtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_nios2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_npcx_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_nrfx_twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_nrfx_twi_rtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_nrfx_twim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_nrfx_twim_rtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_numaker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_rcar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_renesas_ra_iic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_rv32m1_lpi2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_sam0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_sam4l_twim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_sam_twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_sam_twihs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
Loading
Loading