#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/i2c.h>
#include <linux/spi/spi.h>
#include <linux/of.h>
#include <linux/regmap.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 "wm8741.h"
#define WM8741_NUM_SUPPLIES …
static const char *wm8741_supply_names[WM8741_NUM_SUPPLIES] = …;
struct wm8741_priv { … };
static const struct reg_default wm8741_reg_defaults[] = …;
static int wm8741_reset(struct snd_soc_component *component)
{ … }
static const DECLARE_TLV_DB_SCALE(dac_tlv_fine, -12700, 13, 0);
static const DECLARE_TLV_DB_SCALE(dac_tlv, -12700, 400, 0);
static const struct snd_kcontrol_new wm8741_snd_controls_stereo[] = …;
static const struct snd_kcontrol_new wm8741_snd_controls_mono_left[] = …;
static const struct snd_kcontrol_new wm8741_snd_controls_mono_right[] = …;
static const struct snd_soc_dapm_widget wm8741_dapm_widgets[] = …;
static const struct snd_soc_dapm_route wm8741_dapm_routes[] = …;
static const unsigned int rates_11289[] = …;
static const struct snd_pcm_hw_constraint_list constraints_11289 = …;
static const unsigned int rates_12288[] = …;
static const struct snd_pcm_hw_constraint_list constraints_12288 = …;
static const unsigned int rates_16384[] = …;
static const struct snd_pcm_hw_constraint_list constraints_16384 = …;
static const unsigned int rates_16934[] = …;
static const struct snd_pcm_hw_constraint_list constraints_16934 = …;
static const unsigned int rates_18432[] = …;
static const struct snd_pcm_hw_constraint_list constraints_18432 = …;
static const unsigned int rates_22579[] = …;
static const struct snd_pcm_hw_constraint_list constraints_22579 = …;
static const unsigned int rates_24576[] = …;
static const struct snd_pcm_hw_constraint_list constraints_24576 = …;
static const unsigned int rates_36864[] = …;
static const struct snd_pcm_hw_constraint_list constraints_36864 = …;
static int wm8741_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int wm8741_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int wm8741_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{ … }
static int wm8741_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{ … }
#define WM8741_RATES …
#define WM8741_FORMATS …
static const struct snd_soc_dai_ops wm8741_dai_ops = …;
static struct snd_soc_dai_driver wm8741_dai = …;
#ifdef CONFIG_PM
static int wm8741_resume(struct snd_soc_component *component)
{ … }
#else
#define wm8741_resume …
#endif
static int wm8741_configure(struct snd_soc_component *component)
{ … }
static int wm8741_add_controls(struct snd_soc_component *component)
{ … }
static int wm8741_probe(struct snd_soc_component *component)
{ … }
static void wm8741_remove(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_dev_wm8741 = …;
static const struct of_device_id wm8741_of_match[] = …;
MODULE_DEVICE_TABLE(of, wm8741_of_match);
static const struct regmap_config wm8741_regmap = …;
static int wm8741_set_pdata(struct device *dev, struct wm8741_priv *wm8741)
{ … }
#if IS_ENABLED(CONFIG_I2C)
static int wm8741_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id wm8741_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, wm8741_i2c_id);
static struct i2c_driver wm8741_i2c_driver = …;
#endif
#if defined(CONFIG_SPI_MASTER)
static int wm8741_spi_probe(struct spi_device *spi)
{ … }
static struct spi_driver wm8741_spi_driver = …;
#endif
static int __init wm8741_modinit(void)
{ … }
module_init(…) …;
static void __exit wm8741_exit(void)
{ … }
module_exit(wm8741_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;