#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/firmware.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/debugfs.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/wm2000.h>
#include "wm2000.h"
#define WM2000_NUM_SUPPLIES …
static const char *wm2000_supplies[WM2000_NUM_SUPPLIES] = …;
enum wm2000_anc_mode { … };
struct wm2000_priv { … };
static int wm2000_write(struct i2c_client *i2c, unsigned int reg,
unsigned int value)
{ … }
static void wm2000_reset(struct wm2000_priv *wm2000)
{ … }
static int wm2000_poll_bit(struct i2c_client *i2c,
unsigned int reg, u8 mask)
{ … }
static int wm2000_power_up(struct i2c_client *i2c, int analogue)
{ … }
static int wm2000_power_down(struct i2c_client *i2c, int analogue)
{ … }
static int wm2000_enter_bypass(struct i2c_client *i2c, int analogue)
{ … }
static int wm2000_exit_bypass(struct i2c_client *i2c, int analogue)
{ … }
static int wm2000_enter_standby(struct i2c_client *i2c, int analogue)
{ … }
static int wm2000_exit_standby(struct i2c_client *i2c, int analogue)
{ … }
wm2000_mode_fn;
static struct { … } anc_transitions[] = …;
static int wm2000_anc_transition(struct wm2000_priv *wm2000,
enum wm2000_anc_mode mode)
{ … }
static int wm2000_anc_set_mode(struct wm2000_priv *wm2000)
{ … }
static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm2000_speaker_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new wm2000_controls[] = …;
static int wm2000_anc_power_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget wm2000_dapm_widgets[] = …;
static const struct snd_soc_dapm_route wm2000_audio_map[] = …;
#ifdef CONFIG_PM
static int wm2000_suspend(struct snd_soc_component *component)
{ … }
static int wm2000_resume(struct snd_soc_component *component)
{ … }
#else
#define wm2000_suspend …
#define wm2000_resume …
#endif
static bool wm2000_readable_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config wm2000_regmap = …;
static int wm2000_probe(struct snd_soc_component *component)
{ … }
static void wm2000_remove(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_dev_wm2000 = …;
static int wm2000_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id wm2000_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, wm2000_i2c_id);
static struct i2c_driver wm2000_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;