#include <linux/clk.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <sound/core.h>
#include <sound/dmaengine_pcm.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#define IMG_I2S_OUT_TX_FIFO …
#define IMG_I2S_OUT_CTL …
#define IMG_I2S_OUT_CTL_DATA_EN_MASK …
#define IMG_I2S_OUT_CTL_ACTIVE_CHAN_MASK …
#define IMG_I2S_OUT_CTL_ACTIVE_CHAN_SHIFT …
#define IMG_I2S_OUT_CTL_FRM_SIZE_MASK …
#define IMG_I2S_OUT_CTL_MASTER_MASK …
#define IMG_I2S_OUT_CTL_CLK_MASK …
#define IMG_I2S_OUT_CTL_CLK_EN_MASK …
#define IMG_I2S_OUT_CTL_FRM_CLK_POL_MASK …
#define IMG_I2S_OUT_CTL_BCLK_POL_MASK …
#define IMG_I2S_OUT_CTL_ME_MASK …
#define IMG_I2S_OUT_CH_CTL …
#define IMG_I2S_OUT_CHAN_CTL_CH_MASK …
#define IMG_I2S_OUT_CHAN_CTL_LT_MASK …
#define IMG_I2S_OUT_CHAN_CTL_FMT_MASK …
#define IMG_I2S_OUT_CHAN_CTL_FMT_SHIFT …
#define IMG_I2S_OUT_CHAN_CTL_JUST_MASK …
#define IMG_I2S_OUT_CHAN_CTL_CLKT_MASK …
#define IMG_I2S_OUT_CHAN_CTL_ME_MASK …
#define IMG_I2S_OUT_CH_STRIDE …
struct img_i2s_out { … };
static int img_i2s_out_runtime_suspend(struct device *dev)
{ … }
static int img_i2s_out_runtime_resume(struct device *dev)
{ … }
static inline void img_i2s_out_writel(struct img_i2s_out *i2s, u32 val,
u32 reg)
{ … }
static inline u32 img_i2s_out_readl(struct img_i2s_out *i2s, u32 reg)
{ … }
static inline void img_i2s_out_ch_writel(struct img_i2s_out *i2s,
u32 chan, u32 val, u32 reg)
{ … }
static inline u32 img_i2s_out_ch_readl(struct img_i2s_out *i2s, u32 chan,
u32 reg)
{ … }
static inline void img_i2s_out_ch_disable(struct img_i2s_out *i2s, u32 chan)
{ … }
static inline void img_i2s_out_ch_enable(struct img_i2s_out *i2s, u32 chan)
{ … }
static inline void img_i2s_out_disable(struct img_i2s_out *i2s)
{ … }
static inline void img_i2s_out_enable(struct img_i2s_out *i2s)
{ … }
static void img_i2s_out_reset(struct img_i2s_out *i2s)
{ … }
static int img_i2s_out_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{ … }
static int img_i2s_out_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int img_i2s_out_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int img_i2s_out_dai_probe(struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops img_i2s_out_dai_ops = …;
static const struct snd_soc_component_driver img_i2s_out_component = …;
static int img_i2s_out_dma_prepare_slave_config(struct snd_pcm_substream *st,
struct snd_pcm_hw_params *params, struct dma_slave_config *sc)
{ … }
static const struct snd_dmaengine_pcm_config img_i2s_out_dma_config = …;
static int img_i2s_out_probe(struct platform_device *pdev)
{ … }
static void img_i2s_out_dev_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int img_i2s_out_suspend(struct device *dev)
{ … }
static int img_i2s_out_resume(struct device *dev)
{ … }
#endif
static const struct of_device_id img_i2s_out_of_match[] = …;
MODULE_DEVICE_TABLE(of, img_i2s_out_of_match);
static const struct dev_pm_ops img_i2s_out_pm_ops = …;
static struct platform_driver img_i2s_out_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;