#include <linux/of_device.h>
#include <linux/of_dma.h>
#include <linux/list.h>
-#include <linux/pm_runtime.h>
#include <asm/irq.h>
#include "dmaengine.h"
return 0;
}
-static int mxs_dma_runtime_suspend(struct device *dev)
-{
- struct mxs_dma_engine *mxs_dma = dev_get_drvdata(dev);
-
- if (mxs_dma->dev_id == IMX7D_DMA)
- clk_disable(mxs_dma->clk_io);
-
- clk_disable(mxs_dma->clk);
- return 0;
-}
-
-static int mxs_dma_runtime_resume(struct device *dev)
-{
- struct mxs_dma_engine *mxs_dma = dev_get_drvdata(dev);
- int ret;
-
- ret = clk_enable(mxs_dma->clk);
- if (ret < 0)
- goto err_out;
-
- if (mxs_dma->dev_id == IMX7D_DMA) {
- ret = clk_enable(mxs_dma->clk_io);
- if (ret < 0)
- goto err_out;
- }
-
- return 0;
-
-err_out:
- dev_err(dev, "clk_enable failed: %d\n", ret);
- return ret;
-}
-
static int mxs_dma_pm_suspend(struct device *dev)
{
/*
}
static const struct dev_pm_ops mxs_dma_pm_ops = {
- SET_RUNTIME_PM_OPS(mxs_dma_runtime_suspend, mxs_dma_runtime_resume, NULL)
SET_SYSTEM_SLEEP_PM_OPS(mxs_dma_pm_suspend, mxs_dma_pm_resume)
};