linux/sound/soc/codecs/max98926.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * max98926.c -- ALSA SoC MAX98926 driver
 * Copyright 2013-15 Maxim Integrated Products
 */
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/cdev.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include "max98926.h"

static const char * const max98926_boost_voltage_txt[] =;

static const char *const max98926_pdm_ch_text[] =;

static const char *const max98926_hpf_cutoff_txt[] =;

static const struct reg_default max98926_reg[] =;

static const struct soc_enum max98926_voltage_enum[] =;

static const struct snd_kcontrol_new max98926_voltage_control =;

static const struct soc_enum max98926_current_enum[] =;

static const struct snd_kcontrol_new max98926_current_control =;

static const struct snd_kcontrol_new max98926_mixer_controls[] =;

static const struct snd_kcontrol_new max98926_dai_controls[] =;

static const struct snd_soc_dapm_widget max98926_dapm_widgets[] =;

static const struct snd_soc_dapm_route max98926_audio_map[] =;

static bool max98926_volatile_register(struct device *dev, unsigned int reg)
{}

static bool max98926_readable_register(struct device *dev, unsigned int reg)
{
	switch (reg) {
	case MAX98926_IRQ_CLEAR0:
	case MAX98926_IRQ_CLEAR1:
	case MAX98926_IRQ_CLEAR2:
	case MAX98926_ALC_HOLD_RLS:
		return false;
	default:
		return true;
	}
};

static DECLARE_TLV_DB_SCALE(max98926_spk_tlv, -600, 100, 0);
static DECLARE_TLV_DB_RANGE(max98926_current_tlv,
	0, 11, TLV_DB_SCALE_ITEM(20, 20, 0),
	12, 15, TLV_DB_SCALE_ITEM(320, 40, 0),
);

static SOC_ENUM_SINGLE_DECL(max98926_dac_hpf_cutoff,
		MAX98926_FILTERS, MAX98926_DAC_HPF_SHIFT,
		max98926_hpf_cutoff_txt);

static SOC_ENUM_SINGLE_DECL(max98926_boost_voltage,
		MAX98926_CONFIGURATION, MAX98926_BST_VOUT_SHIFT,
		max98926_boost_voltage_txt);

static const struct snd_kcontrol_new max98926_snd_controls[] =;

static const struct {} rate_table[] =;

static void max98926_set_sense_data(struct max98926_priv *max98926)
{}

static int max98926_dai_set_fmt(struct snd_soc_dai *codec_dai,
		unsigned int fmt)
{}

static int max98926_dai_hw_params(struct snd_pcm_substream *substream,
		struct snd_pcm_hw_params *params,
		struct snd_soc_dai *dai)
{}

#define MAX98926_FORMATS

static const struct snd_soc_dai_ops max98926_dai_ops =;

static struct snd_soc_dai_driver max98926_dai[] =;

static int max98926_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_dev_max98926 =;

static const struct regmap_config max98926_regmap =;

static int max98926_i2c_probe(struct i2c_client *i2c)
{}

static const struct i2c_device_id max98926_i2c_id[] =;
MODULE_DEVICE_TABLE(i2c, max98926_i2c_id);

#ifdef CONFIG_OF
static const struct of_device_id max98926_of_match[] =;
MODULE_DEVICE_TABLE(of, max98926_of_match);
#endif

static struct i2c_driver max98926_i2c_driver =;

module_i2c_driver()
MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();