From be0cb45e1abdcb02a6b83079696dff868c2f313b Mon Sep 17 00:00:00 2001 From: Ning Yang Date: Wed, 8 Nov 2023 13:54:28 +0800 Subject: [PATCH] drivers: dma: fix build warning issue for dma sedi driver Remove unused functions to avoid build warning check. Signed-off-by: Ning Yang --- drivers/dma/dma_sedi.c | 52 ------------------------------------------ 1 file changed, 52 deletions(-) diff --git a/drivers/dma/dma_sedi.c b/drivers/dma/dma_sedi.c index 96ae8bbf8fb..7c4ffa72e57 100644 --- a/drivers/dma/dma_sedi.c +++ b/drivers/dma/dma_sedi.c @@ -366,58 +366,6 @@ static int dma_sedi_init(const struct device *dev) return 0; } -#ifdef CONFIG_PM_DEVICE - -static bool is_dma_busy(sedi_dma_t dev) -{ - sedi_dma_status_t chn_status; - - for (int chn = 0; chn < DMA_CHANNEL_NUM; chn++) { - sedi_dma_get_status(dev, chn, &chn_status); - if (chn_status.busy == 1) { - return true; - } - } - return false; -} - -static int dma_change_device_power(const struct device *dev, - enum pm_device_action action) -{ - struct dma_sedi_driver_data *const data = DEV_DATA(dev); - const struct dma_sedi_config_info *const info = DEV_CFG(dev); - sedi_dma_t dma_dev = info->peripheral_id; - int ret; - - sedi_power_state_t state; - - switch (action) { - case PM_DEVICE_ACTION_RESUME: - state = SEDI_POWER_FULL; - break; - case PM_DEVICE_ACTION_SUSPEND: - if (is_dma_busy(dma_dev)) { - return -EBUSY; - } - state = SEDI_POWER_SUSPEND; - break; - - default: - return -ENOTSUP; - } - - for (uint8_t chn = 0; chn < DMA_CHANNEL_NUM; chn++) { - ret = sedi_dma_set_power(dma_dev, chn, state); - if (ret != SEDI_DRIVER_OK) { - return -EIO; - } - } - - return 0; -} - -#endif - #define DMA_DEVICE_INIT_SEDI(inst) \ static void dma_sedi_##inst##_irq_config(void); \ \