#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/pm_runtime.h>
#include <linux/delay.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include <sound/pcm_params.h>
#include "mt6660.h"
struct reg_size_table { … };
static const struct reg_size_table mt6660_reg_size_table[] = …;
static int mt6660_get_reg_size(uint32_t addr)
{ … }
static int mt6660_reg_write(void *context, unsigned int reg, unsigned int val)
{ … }
static int mt6660_reg_read(void *context, unsigned int reg, unsigned int *val)
{ … }
static const struct regmap_config mt6660_regmap_config = …;
static int mt6660_codec_dac_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int mt6660_codec_classd_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget mt6660_component_dapm_widgets[] = …;
static const struct snd_soc_dapm_route mt6660_component_dapm_routes[] = …;
static int mt6660_component_get_volsw(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const DECLARE_TLV_DB_SCALE(vol_ctl_tlv, -1155, 5, 0);
static const struct snd_kcontrol_new mt6660_component_snd_controls[] = …;
static int _mt6660_chip_power_on(struct mt6660_chip *chip, int on_off)
{ … }
struct reg_table { … };
static const struct reg_table mt6660_setting_table[] = …;
static int mt6660_component_setting(struct snd_soc_component *component)
{ … }
static int mt6660_component_probe(struct snd_soc_component *component)
{ … }
static void mt6660_component_remove(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver mt6660_component_driver = …;
static int mt6660_component_aif_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params, struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops mt6660_component_aif_ops = …;
#define STUB_RATES …
#define STUB_FORMATS …
static struct snd_soc_dai_driver mt6660_codec_dai = …;
static int _mt6660_chip_id_check(struct mt6660_chip *chip)
{ … }
static int _mt6660_chip_sw_reset(struct mt6660_chip *chip)
{ … }
static int _mt6660_read_chip_revision(struct mt6660_chip *chip)
{ … }
static int mt6660_i2c_probe(struct i2c_client *client)
{ … }
static void mt6660_i2c_remove(struct i2c_client *client)
{ … }
static int __maybe_unused mt6660_i2c_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused mt6660_i2c_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops mt6660_dev_pm_ops = …;
static const struct of_device_id __maybe_unused mt6660_of_id[] = …;
MODULE_DEVICE_TABLE(of, mt6660_of_id);
static const struct i2c_device_id mt6660_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, mt6660_i2c_id);
static struct i2c_driver mt6660_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…) …;