Skip to content

Commit

Permalink
drivers: dma: place api in interable sections
Browse files Browse the repository at this point in the history
This commit places dma driver class in iterable sections

Signed-off-by: Jilay Pandya <[email protected]>
  • Loading branch information
jilaypandya committed Nov 28, 2024
1 parent 0348270 commit ee1d1a4
Show file tree
Hide file tree
Showing 36 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion drivers/dma/dma_andes_atcdmac300.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ static int dma_atcdmac300_get_status(const struct device *dev,
return 0;
}

static const struct dma_driver_api dma_atcdmac300_api = {
static DEVICE_API(dma, dma_atcdmac300_api) = {
.config = dma_atcdmac300_config,
.reload = dma_atcdmac300_reload,
.start = dma_atcdmac300_transfer_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static int dw_dma_init(const struct device *dev)
return ret;
}

static const struct dma_driver_api dw_dma_driver_api = {
static DEVICE_API(dma, dw_dma_driver_api) = {
.config = dw_dma_config,
.start = dw_dma_start,
.stop = dw_dma_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_dw_axi.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ static int dma_dw_axi_init(const struct device *dev)
return 0;
}

static const struct dma_driver_api dma_dw_axi_driver_api = {
static DEVICE_API(dma, dma_dw_axi_driver_api) = {
.config = dma_dw_axi_config,
.start = dma_dw_axi_start,
.stop = dma_dw_axi_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_emul.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static bool dma_emul_chan_filter(const struct device *dev, int channel, void *fi
return success;
}

static const struct dma_driver_api dma_emul_driver_api = {
static DEVICE_API(dma, dma_emul_driver_api) = {
.config = dma_emul_configure,
.reload = dma_emul_reload,
.start = dma_emul_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_esp32_gdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ static int dma_esp32_init(const struct device *dev)
return 0;
}

static const struct dma_driver_api dma_esp32_api = {
static DEVICE_API(dma, dma_esp32_api) = {
.config = dma_esp32_config,
.start = dma_esp32_start,
.stop = dma_esp32_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_gd32.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ static void dma_gd32_isr(const struct device *dev)
}
}

static const struct dma_driver_api dma_gd32_driver_api = {
static DEVICE_API(dma, dma_gd32_driver_api) = {
.config = dma_gd32_config,
.reload = dma_gd32_reload,
.start = dma_gd32_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_intel_adsp_gpdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ static int gpdma_pm_action(const struct device *dev, enum pm_device_action actio
}
#endif

static const struct dma_driver_api intel_adsp_gpdma_driver_api = {
static DEVICE_API(dma, intel_adsp_gpdma_driver_api) = {
.config = intel_adsp_gpdma_config,
.reload = intel_adsp_gpdma_copy,
.start = intel_adsp_gpdma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_intel_adsp_hda_host_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <adsp_interrupt.h>
#include "dma_intel_adsp_hda.h"

static const struct dma_driver_api intel_adsp_hda_dma_host_in_api = {
static DEVICE_API(dma, intel_adsp_hda_dma_host_in_api) = {
.config = intel_adsp_hda_dma_host_in_config,
.reload = intel_adsp_hda_dma_host_reload,
.start = intel_adsp_hda_dma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_intel_adsp_hda_host_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(dma_intel_adsp_hda_dma_host_out);

static const struct dma_driver_api intel_adsp_hda_dma_host_out_api = {
static DEVICE_API(dma, intel_adsp_hda_dma_host_out_api) = {
.config = intel_adsp_hda_dma_host_out_config,
.reload = intel_adsp_hda_dma_host_reload,
.start = intel_adsp_hda_dma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_intel_adsp_hda_link_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(dma_intel_adsp_hda_dma_link_in);

static const struct dma_driver_api intel_adsp_hda_dma_link_in_api = {
static DEVICE_API(dma, intel_adsp_hda_dma_link_in_api) = {
.config = intel_adsp_hda_dma_link_in_config,
.reload = intel_adsp_hda_dma_link_reload,
.start = intel_adsp_hda_dma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_intel_adsp_hda_link_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(dma_intel_adsp_hda_dma_link_out);

static const struct dma_driver_api intel_adsp_hda_dma_link_out_api = {
static DEVICE_API(dma, intel_adsp_hda_dma_link_out_api) = {
.config = intel_adsp_hda_dma_link_out_config,
.reload = intel_adsp_hda_dma_link_reload,
.start = intel_adsp_hda_dma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_intel_lpss.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void dma_intel_lpss_isr(const struct device *dev)
dw_dma_isr(dev);
}

static const struct dma_driver_api dma_intel_lpss_driver_api = {
static DEVICE_API(dma, dma_intel_lpss_driver_api) = {
.config = dw_dma_config,
.start = dw_dma_start,
.reload = dma_intel_lpss_reload,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_iproc_pax_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ static int dma_iproc_pax_transfer_stop(const struct device *dev,
return 0;
}

static const struct dma_driver_api pax_dma_driver_api = {
static DEVICE_API(dma, pax_dma_driver_api) = {
.config = dma_iproc_pax_configure,
.start = dma_iproc_pax_transfer_start,
.stop = dma_iproc_pax_transfer_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_iproc_pax_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ static int dma_iproc_pax_transfer_stop(const struct device *dev,
return 0;
}

static const struct dma_driver_api pax_dma_driver_api = {
static DEVICE_API(dma, pax_dma_driver_api) = {
.config = dma_iproc_pax_configure,
.start = dma_iproc_pax_transfer_start,
.stop = dma_iproc_pax_transfer_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_max32.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int max32_dma_init(const struct device *dev)
return 0;
}

static const struct dma_driver_api max32_dma_driver_api = {
static DEVICE_API(dma, max32_dma_driver_api) = {
.config = max32_dma_config,
.reload = max32_dma_reload,
.start = max32_dma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_mchp_xec.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ static bool dma_xec_chan_filter(const struct device *dev, int ch, void *filter_p
}

/* API - HW does not stupport suspend/resume */
static const struct dma_driver_api dma_xec_api = {
static DEVICE_API(dma, dma_xec_api) = {
.config = dma_xec_configure,
.reload = dma_xec_reload,
.start = dma_xec_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_mcux_edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ static bool dma_mcux_edma_channel_filter(const struct device *dev,
return true;
}

static const struct dma_driver_api dma_mcux_edma_api = {
static DEVICE_API(dma, dma_mcux_edma_api) = {
.reload = dma_mcux_edma_reload,
.config = dma_mcux_edma_configure,
.start = dma_mcux_edma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_mcux_lpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ static int dma_mcux_lpc_init(const struct device *dev)
return 0;
}

static const struct dma_driver_api dma_mcux_lpc_api = {
static DEVICE_API(dma, dma_mcux_lpc_api) = {
.config = dma_mcux_lpc_configure,
.start = dma_mcux_lpc_start,
.stop = dma_mcux_lpc_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_mcux_pxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static int dma_mcux_pxp_start(const struct device *dev, uint32_t channel)
return 0;
}

static const struct dma_driver_api dma_mcux_pxp_api = {
static DEVICE_API(dma, dma_mcux_pxp_api) = {
.config = dma_mcux_pxp_configure,
.start = dma_mcux_pxp_start,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_mcux_smartdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void dma_smartdma_install_fw(const struct device *dev, uint8_t *firmware,
SMARTDMA_InstallFirmware((uint32_t)config->smartdma_progs, firmware, len);
}

static const struct dma_driver_api dma_mcux_smartdma_api = {
static DEVICE_API(dma, dma_mcux_smartdma_api) = {
.config = dma_mcux_smartdma_configure,
.start = dma_mcux_smartdma_start,
.stop = dma_mcux_smartdma_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_nios2_msgdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static int nios2_msgdma_transfer_stop(const struct device *dev,
return status;
}

static const struct dma_driver_api nios2_msgdma_driver_api = {
static DEVICE_API(dma, nios2_msgdma_driver_api) = {
.config = nios2_msgdma_config,
.start = nios2_msgdma_transfer_start,
.stop = nios2_msgdma_transfer_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_nxp_edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ static bool edma_channel_filter(const struct device *dev, int chan_id, void *par
return false;
}

static const struct dma_driver_api edma_api = {
static DEVICE_API(dma, edma_api) = {
.reload = edma_reload,
.config = edma_config,
.start = edma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_nxp_sof_host_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static int sof_host_dma_get_attribute(const struct device *dev, uint32_t type, u
return 0;
}

static const struct dma_driver_api sof_host_dma_api = {
static DEVICE_API(dma, sof_host_dma_api) = {
.reload = sof_host_dma_reload,
.config = sof_host_dma_config,
.start = sof_host_dma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_pl330.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ static int dma_pl330_initialize(const struct device *dev)
return 0;
}

static const struct dma_driver_api pl330_driver_api = {
static DEVICE_API(dma, pl330_driver_api) = {
.config = dma_pl330_configure,
.start = dma_pl330_transfer_start,
.stop = dma_pl330_transfer_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_rpi_pico.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ static void dma_rpi_pico_isr(const struct device *dev)
}
}

static const struct dma_driver_api dma_rpi_pico_driver_api = {
static DEVICE_API(dma, dma_rpi_pico_driver_api) = {
.config = dma_rpi_pico_config,
.reload = dma_rpi_pico_reload,
.start = dma_rpi_pico_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_sam0.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ static int dma_sam0_init(const struct device *dev)

static struct dma_sam0_data dmac_data;

static const struct dma_driver_api dma_sam0_api = {
static DEVICE_API(dma, dma_sam0_api) = {
.config = dma_sam0_config,
.start = dma_sam0_start,
.stop = dma_sam0_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_sam_xdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ static int sam_xdmac_get_status(const struct device *dev, uint32_t channel,
return 0;
}

static const struct dma_driver_api sam_xdmac_driver_api = {
static DEVICE_API(dma, sam_xdmac_driver_api) = {
.config = sam_xdmac_config,
.reload = sam_xdmac_transfer_reload,
.start = sam_xdmac_transfer_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_sedi.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ static int dma_sedi_stop(const struct device *dev, uint32_t channel)
return 0;
}

static const struct dma_driver_api dma_funcs = { .config = dma_sedi_chan_config,
static DEVICE_API(dma, dma_funcs) = { .config = dma_sedi_chan_config,
.start = dma_sedi_start,
.stop = dma_sedi_stop,
.reload = dma_sedi_reload,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_si32.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static int dma_si32_stop(const struct device *dev, const uint32_t channel)
return 0;
}

static const struct dma_driver_api dma_si32_driver_api = {
static DEVICE_API(dma, dma_si32_driver_api) = {
.config = dma_si32_config,
.start = dma_si32_start,
.stop = dma_si32_stop,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_smartbond.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ static bool dma_smartbond_chan_filter(const struct device *dev, int channel, voi
return false;
}

static struct dma_driver_api dma_smartbond_driver_api = {
static DEVICE_API(dma, dma_smartbond_driver_api) = {
.config = dma_smartbond_config,
.reload = dma_smartbond_reload,
.start = dma_smartbond_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ DMA_STM32_EXPORT_API int dma_stm32_get_status(const struct device *dev,
return 0;
}

static const struct dma_driver_api dma_funcs = {
static DEVICE_API(dma, dma_funcs) = {
.reload = dma_stm32_reload,
.config = dma_stm32_configure,
.start = dma_stm32_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_stm32_bdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ BDMA_STM32_EXPORT_API int bdma_stm32_get_status(const struct device *dev,
return 0;
}

static const struct dma_driver_api dma_funcs = {
static DEVICE_API(dma, dma_funcs) = {
.reload = bdma_stm32_reload,
.config = bdma_stm32_configure,
.start = bdma_stm32_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_stm32u5.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ static int dma_stm32_get_status(const struct device *dev,
return 0;
}

static const struct dma_driver_api dma_funcs = {
static DEVICE_API(dma, dma_funcs) = {
.reload = dma_stm32_reload,
.config = dma_stm32_configure,
.start = dma_stm32_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_xilinx_axi_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ static bool dma_xilinx_axi_dma_chan_filter(const struct device *dev, int channel
}

/* DMA API callbacks */
static const struct dma_driver_api dma_xilinx_axi_dma_driver_api = {
static DEVICE_API(dma, dma_xilinx_axi_dma_driver_api) = {
.config = dma_xilinx_axi_dma_configure,
.reload = dma_xilinx_axi_dma_config_reload,
.start = dma_xilinx_axi_dma_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_xmc4xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ static int dma_xmc4xxx_init(const struct device *dev)
return 0;
}

static const struct dma_driver_api dma_xmc4xxx_driver_api = {
static DEVICE_API(dma, dma_xmc4xxx_driver_api) = {
.config = dma_xmc4xxx_config,
.reload = dma_xmc4xxx_reload,
.start = dma_xmc4xxx_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dmamux_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static int dmamux_stm32_init(const struct device *dev)
return 0;
}

static const struct dma_driver_api dma_funcs = {
static DEVICE_API(dma, dma_funcs) = {
.reload = dmamux_stm32_reload,
.config = dmamux_stm32_configure,
.start = dmamux_stm32_start,
Expand Down

0 comments on commit ee1d1a4

Please sign in to comment.