#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_SPDIF_OUT_TX_FIFO …
#define IMG_SPDIF_OUT_CTL …
#define IMG_SPDIF_OUT_CTL_FS_MASK …
#define IMG_SPDIF_OUT_CTL_CLK_MASK …
#define IMG_SPDIF_OUT_CTL_SRT_MASK …
#define IMG_SPDIF_OUT_CSL …
#define IMG_SPDIF_OUT_CSH_UV …
#define IMG_SPDIF_OUT_CSH_UV_CSH_SHIFT …
#define IMG_SPDIF_OUT_CSH_UV_CSH_MASK …
struct img_spdif_out { … };
static int img_spdif_out_runtime_suspend(struct device *dev)
{ … }
static int img_spdif_out_runtime_resume(struct device *dev)
{ … }
static inline void img_spdif_out_writel(struct img_spdif_out *spdif, u32 val,
u32 reg)
{ … }
static inline u32 img_spdif_out_readl(struct img_spdif_out *spdif, u32 reg)
{ … }
static void img_spdif_out_reset(struct img_spdif_out *spdif)
{ … }
static int img_spdif_out_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int img_spdif_out_get_status_mask(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int img_spdif_out_get_status(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int img_spdif_out_set_status(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static struct snd_kcontrol_new img_spdif_out_controls[] = …;
static int img_spdif_out_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{ … }
static int img_spdif_out_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int img_spdif_out_dai_probe(struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops img_spdif_out_dai_ops = …;
static struct snd_soc_dai_driver img_spdif_out_dai = …;
static const struct snd_soc_component_driver img_spdif_out_component = …;
static int img_spdif_out_probe(struct platform_device *pdev)
{ … }
static void img_spdif_out_dev_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int img_spdif_out_suspend(struct device *dev)
{ … }
static int img_spdif_out_resume(struct device *dev)
{ … }
#endif
static const struct of_device_id img_spdif_out_of_match[] = …;
MODULE_DEVICE_TABLE(of, img_spdif_out_of_match);
static const struct dev_pm_ops img_spdif_out_pm_ops = …;
static struct platform_driver img_spdif_out_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;