#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include <sound/soc-dapm.h>
#include "wm8804.h"
#define WM8804_NUM_SUPPLIES …
static const char *wm8804_supply_names[WM8804_NUM_SUPPLIES] = …;
static const struct reg_default wm8804_reg_defaults[] = …;
struct wm8804_priv { … };
static int txsrc_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
static int wm8804_aif_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event);
#define WM8804_REGULATOR_EVENT(n) …
WM8804_REGULATOR_EVENT(…)
WM8804_REGULATOR_EVENT(…)
static const char *txsrc_text[] = …;
static SOC_ENUM_SINGLE_DECL(txsrc, WM8804_SPDTX4, 6, txsrc_text);
static const struct snd_kcontrol_new wm8804_tx_source_mux[] = …;
static const struct snd_soc_dapm_widget wm8804_dapm_widgets[] = …;
static const struct snd_soc_dapm_route wm8804_dapm_routes[] = …;
static int wm8804_aif_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int txsrc_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static bool wm8804_volatile(struct device *dev, unsigned int reg)
{ … }
static int wm8804_soft_reset(struct wm8804_priv *wm8804)
{ … }
static int wm8804_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int wm8804_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
struct pll_div { … };
static struct { … } post_table[] = …;
#define FIXED_PLL_SIZE …
static int pll_factors(struct pll_div *pll_div, unsigned int target,
unsigned int source, unsigned int mclk_div)
{ … }
static int wm8804_set_pll(struct snd_soc_dai *dai, int pll_id,
int source, unsigned int freq_in,
unsigned int freq_out)
{ … }
static int wm8804_set_sysclk(struct snd_soc_dai *dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int wm8804_set_clkdiv(struct snd_soc_dai *dai,
int div_id, int div)
{ … }
static const struct snd_soc_dai_ops wm8804_dai_ops = …;
#define WM8804_FORMATS …
#define WM8804_RATES …
static struct snd_soc_dai_driver wm8804_dai = …;
static const struct snd_soc_component_driver soc_component_dev_wm8804 = …;
const struct regmap_config wm8804_regmap_config = …;
EXPORT_SYMBOL_GPL(…);
int wm8804_probe(struct device *dev, struct regmap *regmap)
{ … }
EXPORT_SYMBOL_GPL(…);
void wm8804_remove(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
#if IS_ENABLED(CONFIG_PM)
static int wm8804_runtime_resume(struct device *dev)
{ … }
static int wm8804_runtime_suspend(struct device *dev)
{ … }
#endif
const struct dev_pm_ops wm8804_pm = …;
EXPORT_SYMBOL_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;