#include <linux/clk.h>
#include <linux/dmaengine.h>
#include <linux/module.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/pm_runtime.h>
#include <sound/dmaengine_pcm.h>
#include <sound/pcm_params.h>
#include "fsl_esai.h"
#include "imx-pcm.h"
#define FSL_ESAI_FORMATS …
struct fsl_esai_soc_data { … };
struct fsl_esai { … };
static struct fsl_esai_soc_data fsl_esai_vf610 = …;
static struct fsl_esai_soc_data fsl_esai_imx35 = …;
static struct fsl_esai_soc_data fsl_esai_imx6ull = …;
static irqreturn_t esai_isr(int irq, void *devid)
{ … }
static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio,
bool usefp, u32 fp)
{ … }
static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
unsigned int freq, int dir)
{ … }
static int fsl_esai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)
{ … }
static int fsl_esai_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{ … }
static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int fsl_esai_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int fsl_esai_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int fsl_esai_hw_init(struct fsl_esai *esai_priv)
{ … }
static int fsl_esai_register_restore(struct fsl_esai *esai_priv)
{ … }
static void fsl_esai_trigger_start(struct fsl_esai *esai_priv, bool tx)
{ … }
static void fsl_esai_trigger_stop(struct fsl_esai *esai_priv, bool tx)
{ … }
static void fsl_esai_hw_reset(struct work_struct *work)
{ … }
static int fsl_esai_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{ … }
static int fsl_esai_dai_probe(struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops fsl_esai_dai_ops = …;
static struct snd_soc_dai_driver fsl_esai_dai = …;
static const struct snd_soc_component_driver fsl_esai_component = …;
static const struct reg_default fsl_esai_reg_defaults[] = …;
static bool fsl_esai_readable_reg(struct device *dev, unsigned int reg)
{ … }
static bool fsl_esai_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static bool fsl_esai_writeable_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config fsl_esai_regmap_config = …;
static int fsl_esai_runtime_resume(struct device *dev);
static int fsl_esai_runtime_suspend(struct device *dev);
static int fsl_esai_probe(struct platform_device *pdev)
{ … }
static void fsl_esai_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id fsl_esai_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, fsl_esai_dt_ids);
static int fsl_esai_runtime_resume(struct device *dev)
{ … }
static int fsl_esai_runtime_suspend(struct device *dev)
{ … }
static const struct dev_pm_ops fsl_esai_pm_ops = …;
static struct platform_driver fsl_esai_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;