#include <linux/acpi.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/regmap.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>
#define SSM4567_REG_POWER_CTRL …
#define SSM4567_REG_AMP_SNS_CTRL …
#define SSM4567_REG_DAC_CTRL …
#define SSM4567_REG_DAC_VOLUME …
#define SSM4567_REG_SAI_CTRL_1 …
#define SSM4567_REG_SAI_CTRL_2 …
#define SSM4567_REG_SAI_PLACEMENT_1 …
#define SSM4567_REG_SAI_PLACEMENT_2 …
#define SSM4567_REG_SAI_PLACEMENT_3 …
#define SSM4567_REG_SAI_PLACEMENT_4 …
#define SSM4567_REG_SAI_PLACEMENT_5 …
#define SSM4567_REG_SAI_PLACEMENT_6 …
#define SSM4567_REG_BATTERY_V_OUT …
#define SSM4567_REG_LIMITER_CTRL_1 …
#define SSM4567_REG_LIMITER_CTRL_2 …
#define SSM4567_REG_LIMITER_CTRL_3 …
#define SSM4567_REG_STATUS_1 …
#define SSM4567_REG_STATUS_2 …
#define SSM4567_REG_FAULT_CTRL …
#define SSM4567_REG_PDM_CTRL …
#define SSM4567_REG_MCLK_RATIO …
#define SSM4567_REG_BOOST_CTRL_1 …
#define SSM4567_REG_BOOST_CTRL_2 …
#define SSM4567_REG_SOFT_RESET …
#define SSM4567_POWER_APWDN_EN …
#define SSM4567_POWER_BSNS_PWDN …
#define SSM4567_POWER_VSNS_PWDN …
#define SSM4567_POWER_ISNS_PWDN …
#define SSM4567_POWER_BOOST_PWDN …
#define SSM4567_POWER_AMP_PWDN …
#define SSM4567_POWER_VBAT_ONLY …
#define SSM4567_POWER_SPWDN …
#define SSM4567_DAC_HV …
#define SSM4567_DAC_MUTE …
#define SSM4567_DAC_HPF …
#define SSM4567_DAC_LPM …
#define SSM4567_DAC_FS_MASK …
#define SSM4567_DAC_FS_8000_12000 …
#define SSM4567_DAC_FS_16000_24000 …
#define SSM4567_DAC_FS_32000_48000 …
#define SSM4567_DAC_FS_64000_96000 …
#define SSM4567_DAC_FS_128000_192000 …
#define SSM4567_SAI_CTRL_1_BCLK …
#define SSM4567_SAI_CTRL_1_TDM_BLCKS_MASK …
#define SSM4567_SAI_CTRL_1_TDM_BLCKS_32 …
#define SSM4567_SAI_CTRL_1_TDM_BLCKS_48 …
#define SSM4567_SAI_CTRL_1_TDM_BLCKS_64 …
#define SSM4567_SAI_CTRL_1_FSYNC …
#define SSM4567_SAI_CTRL_1_LJ …
#define SSM4567_SAI_CTRL_1_TDM …
#define SSM4567_SAI_CTRL_1_PDM …
#define SSM4567_SAI_CTRL_2_AUTO_SLOT …
#define SSM4567_SAI_CTRL_2_TDM_SLOT_MASK …
#define SSM4567_SAI_CTRL_2_TDM_SLOT(x) …
struct ssm4567 { … };
static const struct reg_default ssm4567_reg_defaults[] = …;
static bool ssm4567_readable_reg(struct device *dev, unsigned int reg)
{ … }
static bool ssm4567_writeable_reg(struct device *dev, unsigned int reg)
{ … }
static bool ssm4567_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const DECLARE_TLV_DB_MINMAX_MUTE(ssm4567_vol_tlv, -7125, 2400);
static const struct snd_kcontrol_new ssm4567_snd_controls[] = …;
static const struct snd_kcontrol_new ssm4567_amplifier_boost_control = …;
static const struct snd_soc_dapm_widget ssm4567_dapm_widgets[] = …;
static const struct snd_soc_dapm_route ssm4567_routes[] = …;
static int ssm4567_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int ssm4567_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int ssm4567_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
unsigned int rx_mask, int slots, int width)
{ … }
static int ssm4567_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int ssm4567_set_power(struct ssm4567 *ssm4567, bool enable)
{ … }
static int ssm4567_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
static const struct snd_soc_dai_ops ssm4567_dai_ops = …;
static struct snd_soc_dai_driver ssm4567_dai = …;
static const struct snd_soc_component_driver ssm4567_component_driver = …;
static const struct regmap_config ssm4567_regmap_config = …;
static int ssm4567_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id ssm4567_i2c_ids[] = …;
MODULE_DEVICE_TABLE(i2c, ssm4567_i2c_ids);
#ifdef CONFIG_OF
static const struct of_device_id ssm4567_of_match[] = …;
MODULE_DEVICE_TABLE(of, ssm4567_of_match);
#endif
#ifdef CONFIG_ACPI
static const struct acpi_device_id ssm4567_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, ssm4567_acpi_match);
#endif
static struct i2c_driver ssm4567_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;