#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/regulator/machine.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <linux/gpio/consumer.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include <sound/cs35l34.h>
#include "cs35l34.h"
#include "cirrus_legacy.h"
#define PDN_DONE_ATTEMPTS …
#define CS35L34_START_DELAY …
struct cs35l34_private { … };
static const struct reg_default cs35l34_reg[] = …;
static bool cs35l34_volatile_register(struct device *dev, unsigned int reg)
{ … }
static bool cs35l34_readable_register(struct device *dev, unsigned int reg)
{ … }
static bool cs35l34_precious_register(struct device *dev, unsigned int reg)
{ … }
static int cs35l34_sdin_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int cs35l34_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
unsigned int rx_mask, int slots, int slot_width)
{ … }
static int cs35l34_main_amp_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static DECLARE_TLV_DB_SCALE(dig_vol_tlv, -10200, 50, 0);
static DECLARE_TLV_DB_SCALE(amp_gain_tlv, 300, 100, 0);
static const struct snd_kcontrol_new cs35l34_snd_controls[] = …;
static int cs35l34_mclk_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget cs35l34_dapm_widgets[] = …;
static const struct snd_soc_dapm_route cs35l34_audio_map[] = …;
struct cs35l34_mclk_div { … };
static struct cs35l34_mclk_div cs35l34_mclk_coeffs[] = …;
static int cs35l34_get_mclk_coeff(int mclk, int srate)
{ … }
static int cs35l34_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{ … }
static int cs35l34_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static const unsigned int cs35l34_src_rates[] = …;
static const struct snd_pcm_hw_constraint_list cs35l34_constraints = …;
static int cs35l34_pcm_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int cs35l34_set_tristate(struct snd_soc_dai *dai, int tristate)
{ … }
static int cs35l34_dai_set_sysclk(struct snd_soc_dai *dai,
int clk_id, unsigned int freq, int dir)
{ … }
static const struct snd_soc_dai_ops cs35l34_ops = …;
static struct snd_soc_dai_driver cs35l34_dai = …;
static int cs35l34_boost_inductor(struct cs35l34_private *cs35l34,
unsigned int inductor)
{ … }
static int cs35l34_probe(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_dev_cs35l34 = …;
static const struct regmap_config cs35l34_regmap = …;
static int cs35l34_handle_of_data(struct i2c_client *i2c_client,
struct cs35l34_platform_data *pdata)
{ … }
static irqreturn_t cs35l34_irq_thread(int irq, void *data)
{ … }
static const char * const cs35l34_core_supplies[] = …;
static int cs35l34_i2c_probe(struct i2c_client *i2c_client)
{ … }
static void cs35l34_i2c_remove(struct i2c_client *client)
{ … }
static int __maybe_unused cs35l34_runtime_resume(struct device *dev)
{ … }
static int __maybe_unused cs35l34_runtime_suspend(struct device *dev)
{ … }
static const struct dev_pm_ops cs35l34_pm_ops = …;
static const struct of_device_id cs35l34_of_match[] = …;
MODULE_DEVICE_TABLE(of, cs35l34_of_match);
static const struct i2c_device_id cs35l34_id[] = …;
MODULE_DEVICE_TABLE(i2c, cs35l34_id);
static struct i2c_driver cs35l34_i2c_driver = …;
static int __init cs35l34_modinit(void)
{ … }
module_init(…) …;
static void __exit cs35l34_exit(void)
{ … }
module_exit(cs35l34_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;