linux/sound/soc/codecs/rt5645.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * rt5645.c  --  RT5645 ALSA SoC audio codec driver
 *
 * Copyright 2013 Realtek Semiconductor Corp.
 * Author: Bard Liao <[email protected]>
 */

#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/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/gpio/consumer.h>
#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/regulator/consumer.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/jack.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include <sound/tlv.h>

#include "rl6231.h"
#include "rt5645.h"

#define QUIRK_INV_JD1_1(q)
#define QUIRK_LEVEL_IRQ(q)
#define QUIRK_IN2_DIFF(q)
#define QUIRK_INV_HP_POL(q)
#define QUIRK_JD_MODE(q)
#define QUIRK_DMIC1_DATA_PIN(q)
#define QUIRK_DMIC2_DATA_PIN(q)

static unsigned int quirk =;
module_param(quirk, uint, 0444);
MODULE_PARM_DESC();

static const struct acpi_gpio_mapping *cht_rt5645_gpios;

#define RT5645_DEVICE_ID
#define RT5650_DEVICE_ID

#define RT5645_PR_RANGE_BASE
#define RT5645_PR_SPACING

#define RT5645_PR_BASE

#define RT5645_HWEQ_NUM

#define TIME_TO_POWER_MS

static const struct regmap_range_cfg rt5645_ranges[] =;

static const struct reg_sequence init_list[] =;

static const struct reg_sequence rt5650_init_list[] =;

static const struct reg_default rt5645_reg[] =;

static const struct reg_default rt5650_reg[] =;

struct rt5645_eq_param_s {};

struct rt5645_eq_param_s_be16 {};

static const char *const rt5645_supply_names[] =;

struct rt5645_platform_data {};

struct rt5645_priv {};

static int rt5645_reset(struct snd_soc_component *component)
{}

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

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

static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -6525, 75, 0);
static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -1725, 75, 0);
static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);

/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */
static const DECLARE_TLV_DB_RANGE(bst_tlv,
	0, 0, TLV_DB_SCALE_ITEM(0, 0, 0),
	1, 1, TLV_DB_SCALE_ITEM(2000, 0, 0),
	2, 2, TLV_DB_SCALE_ITEM(2400, 0, 0),
	3, 5, TLV_DB_SCALE_ITEM(3000, 500, 0),
	6, 6, TLV_DB_SCALE_ITEM(4400, 0, 0),
	7, 7, TLV_DB_SCALE_ITEM(5000, 0, 0),
	8, 8, TLV_DB_SCALE_ITEM(5200, 0, 0)
);

/* {-6, -4.5, -3, -1.5, 0, 0.82, 1.58, 2.28} dB */
static const DECLARE_TLV_DB_RANGE(spk_clsd_tlv,
	0, 4, TLV_DB_SCALE_ITEM(-600, 150, 0),
	5, 5, TLV_DB_SCALE_ITEM(82, 0, 0),
	6, 6, TLV_DB_SCALE_ITEM(158, 0, 0),
	7, 7, TLV_DB_SCALE_ITEM(228, 0, 0)
);

static int rt5645_hweq_info(struct snd_kcontrol *kcontrol,
			 struct snd_ctl_elem_info *uinfo)
{}

static int rt5645_hweq_get(struct snd_kcontrol *kcontrol,
			struct snd_ctl_elem_value *ucontrol)
{}

static bool rt5645_validate_hweq(unsigned short reg)
{}

static int rt5645_hweq_put(struct snd_kcontrol *kcontrol,
			struct snd_ctl_elem_value *ucontrol)
{}

#define RT5645_HWEQ(xname)

static int rt5645_spk_put_volsw(struct snd_kcontrol *kcontrol,
		struct snd_ctl_elem_value *ucontrol)
{}

static const char * const rt5645_dac1_vol_ctrl_mode_text[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_dac1_vol_ctrl_mode, RT5645_PR_BASE,
	RT5645_DA1_ZDET_SFT, rt5645_dac1_vol_ctrl_mode_text);

static const struct snd_kcontrol_new rt5645_snd_controls[] =;

/**
 * set_dmic_clk - Set parameter of dmic.
 *
 * @w: DAPM widget.
 * @kcontrol: The kcontrol of this widget.
 * @event: Event id.
 *
 */
static int set_dmic_clk(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source,
			 struct snd_soc_dapm_widget *sink)
{}

static int is_using_asrc(struct snd_soc_dapm_widget *source,
			 struct snd_soc_dapm_widget *sink)
{}

static int rt5645_enable_hweq(struct snd_soc_component *component)
{}

/**
 * rt5645_sel_asrc_clk_src - select ASRC clock source for a set of filters
 * @component: SoC audio component device.
 * @filter_mask: mask of filters.
 * @clk_src: clock source
 *
 * The ASRC function is for asynchronous MCLK and LRCK. Also, since RT5645 can
 * only support standard 32fs or 64fs i2s format, ASRC should be enabled to
 * support special i2s clock format such as Intel's 100fs(100 * sampling rate).
 * ASRC function will track i2s clock and generate a corresponding system clock
 * for codec. This function provides an API to select the clock source for a
 * set of filters specified by the mask. And the codec driver will turn on ASRC
 * for these filters if ASRC is selected as their clock source.
 */
int rt5645_sel_asrc_clk_src(struct snd_soc_component *component,
		unsigned int filter_mask, unsigned int clk_src)
{}
EXPORT_SYMBOL_GPL();

/* Digital Mixer */
static const struct snd_kcontrol_new rt5645_sto1_adc_l_mix[] =;

static const struct snd_kcontrol_new rt5645_sto1_adc_r_mix[] =;

static const struct snd_kcontrol_new rt5645_mono_adc_l_mix[] =;

static const struct snd_kcontrol_new rt5645_mono_adc_r_mix[] =;

static const struct snd_kcontrol_new rt5645_dac_l_mix[] =;

static const struct snd_kcontrol_new rt5645_dac_r_mix[] =;

static const struct snd_kcontrol_new rt5645_sto_dac_l_mix[] =;

static const struct snd_kcontrol_new rt5645_sto_dac_r_mix[] =;

static const struct snd_kcontrol_new rt5645_mono_dac_l_mix[] =;

static const struct snd_kcontrol_new rt5645_mono_dac_r_mix[] =;

static const struct snd_kcontrol_new rt5645_dig_l_mix[] =;

static const struct snd_kcontrol_new rt5645_dig_r_mix[] =;

/* Analog Input Mixer */
static const struct snd_kcontrol_new rt5645_rec_l_mix[] =;

static const struct snd_kcontrol_new rt5645_rec_r_mix[] =;

static const struct snd_kcontrol_new rt5645_spk_l_mix[] =;

static const struct snd_kcontrol_new rt5645_spk_r_mix[] =;

static const struct snd_kcontrol_new rt5645_out_l_mix[] =;

static const struct snd_kcontrol_new rt5645_out_r_mix[] =;

static const struct snd_kcontrol_new rt5645_spo_l_mix[] =;

static const struct snd_kcontrol_new rt5645_spo_r_mix[] =;

static const struct snd_kcontrol_new rt5645_hpo_mix[] =;

static const struct snd_kcontrol_new rt5645_hpvoll_mix[] =;

static const struct snd_kcontrol_new rt5645_hpvolr_mix[] =;

static const struct snd_kcontrol_new rt5645_lout_mix[] =;

/*DAC1 L/R source*/ /* MX-29 [9:8] [11:10] */
static const char * const rt5645_dac1_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_dac1l_enum, RT5645_AD_DA_MIXER,
	RT5645_DAC1_L_SEL_SFT, rt5645_dac1_src);

static const struct snd_kcontrol_new rt5645_dac1l_mux =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_dac1r_enum, RT5645_AD_DA_MIXER,
	RT5645_DAC1_R_SEL_SFT, rt5645_dac1_src);

static const struct snd_kcontrol_new rt5645_dac1r_mux =;

/*DAC2 L/R source*/ /* MX-1B [6:4] [2:0] */
static const char * const rt5645_dac12_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_dac2l_enum, RT5645_DAC_CTRL,
	RT5645_DAC2_L_SEL_SFT, rt5645_dac12_src);

static const struct snd_kcontrol_new rt5645_dac_l2_mux =;

static const char * const rt5645_dacr2_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_dac2r_enum, RT5645_DAC_CTRL,
	RT5645_DAC2_R_SEL_SFT, rt5645_dacr2_src);

static const struct snd_kcontrol_new rt5645_dac_r2_mux =;

/* Stereo1 ADC source */
/* MX-27 [12] */
static const char * const rt5645_stereo_adc1_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_stereo1_adc1_enum, RT5645_STO1_ADC_MIXER,
	RT5645_ADC_1_SRC_SFT, rt5645_stereo_adc1_src);

static const struct snd_kcontrol_new rt5645_sto_adc1_mux =;

/* MX-27 [11] */
static const char * const rt5645_stereo_adc2_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_stereo1_adc2_enum, RT5645_STO1_ADC_MIXER,
	RT5645_ADC_2_SRC_SFT, rt5645_stereo_adc2_src);

static const struct snd_kcontrol_new rt5645_sto_adc2_mux =;

/* MX-27 [8] */
static const char * const rt5645_stereo_dmic_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_stereo1_dmic_enum, RT5645_STO1_ADC_MIXER,
	RT5645_DMIC_SRC_SFT, rt5645_stereo_dmic_src);

static const struct snd_kcontrol_new rt5645_sto1_dmic_mux =;

/* Mono ADC source */
/* MX-28 [12] */
static const char * const rt5645_mono_adc_l1_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_mono_adc_l1_enum, RT5645_MONO_ADC_MIXER,
	RT5645_MONO_ADC_L1_SRC_SFT, rt5645_mono_adc_l1_src);

static const struct snd_kcontrol_new rt5645_mono_adc_l1_mux =;
/* MX-28 [11] */
static const char * const rt5645_mono_adc_l2_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_mono_adc_l2_enum, RT5645_MONO_ADC_MIXER,
	RT5645_MONO_ADC_L2_SRC_SFT, rt5645_mono_adc_l2_src);

static const struct snd_kcontrol_new rt5645_mono_adc_l2_mux =;

/* MX-28 [8] */
static const char * const rt5645_mono_dmic_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_mono_dmic_l_enum, RT5645_MONO_ADC_MIXER,
	RT5645_MONO_DMIC_L_SRC_SFT, rt5645_mono_dmic_src);

static const struct snd_kcontrol_new rt5645_mono_dmic_l_mux =;
/* MX-28 [1:0] */
static SOC_ENUM_SINGLE_DECL(
	rt5645_mono_dmic_r_enum, RT5645_MONO_ADC_MIXER,
	RT5645_MONO_DMIC_R_SRC_SFT, rt5645_mono_dmic_src);

static const struct snd_kcontrol_new rt5645_mono_dmic_r_mux =;
/* MX-28 [4] */
static const char * const rt5645_mono_adc_r1_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_mono_adc_r1_enum, RT5645_MONO_ADC_MIXER,
	RT5645_MONO_ADC_R1_SRC_SFT, rt5645_mono_adc_r1_src);

static const struct snd_kcontrol_new rt5645_mono_adc_r1_mux =;
/* MX-28 [3] */
static const char * const rt5645_mono_adc_r2_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_mono_adc_r2_enum, RT5645_MONO_ADC_MIXER,
	RT5645_MONO_ADC_R2_SRC_SFT, rt5645_mono_adc_r2_src);

static const struct snd_kcontrol_new rt5645_mono_adc_r2_mux =;

/* MX-77 [9:8] */
static const char * const rt5645_if1_adc_in_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_if1_adc_in_enum, RT5645_TDM_CTRL_1,
	RT5645_IF1_ADC_IN_SFT, rt5645_if1_adc_in_src);

static const struct snd_kcontrol_new rt5645_if1_adc_in_mux =;

/* MX-78 [4:0] */
static const char * const rt5650_if1_adc_in_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5650_if1_adc_in_enum, RT5645_TDM_CTRL_2,
	0, rt5650_if1_adc_in_src);

static const struct snd_kcontrol_new rt5650_if1_adc_in_mux =;

/* MX-78 [15:14][13:12][11:10] */
static const char * const rt5645_tdm_adc_swap_select[] =;

static SOC_ENUM_SINGLE_DECL(rt5650_tdm_adc_slot0_1_enum,
	RT5645_TDM_CTRL_2, 14, rt5645_tdm_adc_swap_select);

static const struct snd_kcontrol_new rt5650_if1_adc1_in_mux =;

static SOC_ENUM_SINGLE_DECL(rt5650_tdm_adc_slot2_3_enum,
	RT5645_TDM_CTRL_2, 12, rt5645_tdm_adc_swap_select);

static const struct snd_kcontrol_new rt5650_if1_adc2_in_mux =;

static SOC_ENUM_SINGLE_DECL(rt5650_tdm_adc_slot4_5_enum,
	RT5645_TDM_CTRL_2, 10, rt5645_tdm_adc_swap_select);

static const struct snd_kcontrol_new rt5650_if1_adc3_in_mux =;

/* MX-77 [7:6][5:4][3:2] */
static SOC_ENUM_SINGLE_DECL(rt5645_tdm_adc_slot0_1_enum,
	RT5645_TDM_CTRL_1, 6, rt5645_tdm_adc_swap_select);

static const struct snd_kcontrol_new rt5645_if1_adc1_in_mux =;

static SOC_ENUM_SINGLE_DECL(rt5645_tdm_adc_slot2_3_enum,
	RT5645_TDM_CTRL_1, 4, rt5645_tdm_adc_swap_select);

static const struct snd_kcontrol_new rt5645_if1_adc2_in_mux =;

static SOC_ENUM_SINGLE_DECL(rt5645_tdm_adc_slot4_5_enum,
	RT5645_TDM_CTRL_1, 2, rt5645_tdm_adc_swap_select);

static const struct snd_kcontrol_new rt5645_if1_adc3_in_mux =;

/* MX-79 [14:12][10:8][6:4][2:0] */
static const char * const rt5645_tdm_dac_swap_select[] =;

static SOC_ENUM_SINGLE_DECL(rt5645_tdm_dac0_enum,
	RT5645_TDM_CTRL_3, 12, rt5645_tdm_dac_swap_select);

static const struct snd_kcontrol_new rt5645_if1_dac0_tdm_sel_mux =;

static SOC_ENUM_SINGLE_DECL(rt5645_tdm_dac1_enum,
	RT5645_TDM_CTRL_3, 8, rt5645_tdm_dac_swap_select);

static const struct snd_kcontrol_new rt5645_if1_dac1_tdm_sel_mux =;

static SOC_ENUM_SINGLE_DECL(rt5645_tdm_dac2_enum,
	RT5645_TDM_CTRL_3, 4, rt5645_tdm_dac_swap_select);

static const struct snd_kcontrol_new rt5645_if1_dac2_tdm_sel_mux =;

static SOC_ENUM_SINGLE_DECL(rt5645_tdm_dac3_enum,
	RT5645_TDM_CTRL_3, 0, rt5645_tdm_dac_swap_select);

static const struct snd_kcontrol_new rt5645_if1_dac3_tdm_sel_mux =;

/* MX-7a [14:12][10:8][6:4][2:0] */
static SOC_ENUM_SINGLE_DECL(rt5650_tdm_dac0_enum,
	RT5650_TDM_CTRL_4, 12, rt5645_tdm_dac_swap_select);

static const struct snd_kcontrol_new rt5650_if1_dac0_tdm_sel_mux =;

static SOC_ENUM_SINGLE_DECL(rt5650_tdm_dac1_enum,
	RT5650_TDM_CTRL_4, 8, rt5645_tdm_dac_swap_select);

static const struct snd_kcontrol_new rt5650_if1_dac1_tdm_sel_mux =;

static SOC_ENUM_SINGLE_DECL(rt5650_tdm_dac2_enum,
	RT5650_TDM_CTRL_4, 4, rt5645_tdm_dac_swap_select);

static const struct snd_kcontrol_new rt5650_if1_dac2_tdm_sel_mux =;

static SOC_ENUM_SINGLE_DECL(rt5650_tdm_dac3_enum,
	RT5650_TDM_CTRL_4, 0, rt5645_tdm_dac_swap_select);

static const struct snd_kcontrol_new rt5650_if1_dac3_tdm_sel_mux =;

/* MX-2d [3] [2] */
static const char * const rt5650_a_dac1_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5650_a_dac1_l_enum, RT5650_A_DAC_SOUR,
	RT5650_A_DAC1_L_IN_SFT, rt5650_a_dac1_src);

static const struct snd_kcontrol_new rt5650_a_dac1_l_mux =;

static SOC_ENUM_SINGLE_DECL(
	rt5650_a_dac1_r_enum, RT5650_A_DAC_SOUR,
	RT5650_A_DAC1_R_IN_SFT, rt5650_a_dac1_src);

static const struct snd_kcontrol_new rt5650_a_dac1_r_mux =;

/* MX-2d [1] [0] */
static const char * const rt5650_a_dac2_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5650_a_dac2_l_enum, RT5650_A_DAC_SOUR,
	RT5650_A_DAC2_L_IN_SFT, rt5650_a_dac2_src);

static const struct snd_kcontrol_new rt5650_a_dac2_l_mux =;

static SOC_ENUM_SINGLE_DECL(
	rt5650_a_dac2_r_enum, RT5650_A_DAC_SOUR,
	RT5650_A_DAC2_R_IN_SFT, rt5650_a_dac2_src);

static const struct snd_kcontrol_new rt5650_a_dac2_r_mux =;

/* MX-2F [13:12] */
static const char * const rt5645_if2_adc_in_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_if2_adc_in_enum, RT5645_DIG_INF1_DATA,
	RT5645_IF2_ADC_IN_SFT, rt5645_if2_adc_in_src);

static const struct snd_kcontrol_new rt5645_if2_adc_in_mux =;

/* MX-31 [15] [13] [11] [9] */
static const char * const rt5645_pdm_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_pdm1_l_enum, RT5645_PDM_OUT_CTRL,
	RT5645_PDM1_L_SFT, rt5645_pdm_src);

static const struct snd_kcontrol_new rt5645_pdm1_l_mux =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_pdm1_r_enum, RT5645_PDM_OUT_CTRL,
	RT5645_PDM1_R_SFT, rt5645_pdm_src);

static const struct snd_kcontrol_new rt5645_pdm1_r_mux =;

/* MX-9D [9:8] */
static const char * const rt5645_vad_adc_src[] =;

static SOC_ENUM_SINGLE_DECL(
	rt5645_vad_adc_enum, RT5645_VAD_CTRL4,
	RT5645_VAD_SEL_SFT, rt5645_vad_adc_src);

static const struct snd_kcontrol_new rt5645_vad_adc_mux =;

static const struct snd_kcontrol_new spk_l_vol_control =;

static const struct snd_kcontrol_new spk_r_vol_control =;

static const struct snd_kcontrol_new hp_l_vol_control =;

static const struct snd_kcontrol_new hp_r_vol_control =;

static const struct snd_kcontrol_new pdm1_l_vol_control =;

static const struct snd_kcontrol_new pdm1_r_vol_control =;

static void hp_amp_power(struct snd_soc_component *component, int on)
{}

static int rt5645_hp_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static int rt5645_spk_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static int rt5645_lout_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static int rt5645_bst2_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static int rt5645_set_micbias1_event(struct snd_soc_dapm_widget *w,
		struct snd_kcontrol *k, int  event)
{}

static int rt5645_set_micbias2_event(struct snd_soc_dapm_widget *w,
		struct snd_kcontrol *k, int  event)
{}

static const struct snd_soc_dapm_widget rt5645_dapm_widgets[] =;

static const struct snd_soc_dapm_widget rt5645_specific_dapm_widgets[] =;

static const struct snd_soc_dapm_widget rt5650_specific_dapm_widgets[] =;

static const struct snd_soc_dapm_route rt5645_dapm_routes[] =;

static const struct snd_soc_dapm_route rt5650_specific_dapm_routes[] =;

static const struct snd_soc_dapm_route rt5645_specific_dapm_routes[] =;

static const struct snd_soc_dapm_route rt5645_old_dapm_routes[] =;

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

static int rt5645_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{}

static int rt5645_set_dai_sysclk(struct snd_soc_dai *dai,
		int clk_id, unsigned int freq, int dir)
{}

static int rt5645_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source,
			unsigned int freq_in, unsigned int freq_out)
{}

static int rt5645_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
			unsigned int rx_mask, int slots, int slot_width)
{}

static int rt5645_set_bias_level(struct snd_soc_component *component,
			enum snd_soc_bias_level level)
{}

static void rt5645_enable_push_button_irq(struct snd_soc_component *component,
	bool enable)
{}

static int rt5645_jack_detect(struct snd_soc_component *component, int jack_insert)
{}

static int rt5645_button_detect(struct snd_soc_component *component)
{}

static irqreturn_t rt5645_irq(int irq, void *data);

int rt5645_set_jack_detect(struct snd_soc_component *component,
	struct snd_soc_jack *hp_jack, struct snd_soc_jack *mic_jack,
	struct snd_soc_jack *btn_jack)
{}
EXPORT_SYMBOL_GPL();

static int rt5645_component_set_jack(struct snd_soc_component *component,
	struct snd_soc_jack *hs_jack, void *data)
{}

static void rt5645_jack_detect_work(struct work_struct *work)
{}

static void rt5645_rcclock_work(struct work_struct *work)
{}

static irqreturn_t rt5645_irq(int irq, void *data)
{}

static void rt5645_btn_check_callback(struct timer_list *t)
{}

static int rt5645_probe(struct snd_soc_component *component)
{}

static void rt5645_remove(struct snd_soc_component *component)
{}

#ifdef CONFIG_PM
static int rt5645_suspend(struct snd_soc_component *component)
{}

static int rt5645_resume(struct snd_soc_component *component)
{}
#else
#define rt5645_suspend
#define rt5645_resume
#endif

#define RT5645_STEREO_RATES
#define RT5645_FORMATS

static const struct snd_soc_dai_ops rt5645_aif_dai_ops =;

static struct snd_soc_dai_driver rt5645_dai[] =;

static const struct snd_soc_component_driver soc_component_dev_rt5645 =;

static const struct regmap_config rt5645_regmap =;

static const struct regmap_config rt5650_regmap =;

static const struct regmap_config temp_regmap =;

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

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

#ifdef CONFIG_ACPI
static const struct acpi_device_id rt5645_acpi_match[] =;
MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match);
#endif

static const struct rt5645_platform_data intel_braswell_platform_data =;

static const struct rt5645_platform_data buddy_platform_data =;

static const struct rt5645_platform_data gpd_win_platform_data =;

static const struct rt5645_platform_data asus_t100ha_platform_data =;

static const struct rt5645_platform_data asus_t101ha_platform_data =;

static const struct rt5645_platform_data lenovo_ideapad_miix_310_pdata =;

static const struct rt5645_platform_data jd_mode3_monospk_platform_data =;

static const struct rt5645_platform_data jd_mode3_inv_data =;

static const struct rt5645_platform_data jd_mode3_platform_data =;

static const struct rt5645_platform_data lattepanda_board_platform_data =;

static const struct rt5645_platform_data kahlee_platform_data =;

static const struct rt5645_platform_data ecs_ef20_platform_data =;

static const struct acpi_gpio_params ef20_hp_detect =;

static const struct acpi_gpio_mapping cht_rt5645_ef20_gpios[] =;

static int cht_rt5645_ef20_quirk_cb(const struct dmi_system_id *id)
{}

static const struct dmi_system_id dmi_platform_data[] =;

static bool rt5645_check_dp(struct device *dev)
{}

static void rt5645_parse_dt(struct device *dev, struct rt5645_platform_data *pdata)
{}

static void rt5645_get_pdata(struct device *codec_dev, struct rt5645_platform_data *pdata)
{}

const char *rt5645_components(struct device *codec_dev)
{}
EXPORT_SYMBOL_GPL();

static int rt5645_i2c_probe(struct i2c_client *i2c)
{}

static void rt5645_i2c_remove(struct i2c_client *i2c)
{}

static void rt5645_i2c_shutdown(struct i2c_client *i2c)
{}

static int __maybe_unused rt5645_sys_suspend(struct device *dev)
{}

static int __maybe_unused rt5645_sys_resume(struct device *dev)
{}

static const struct dev_pm_ops rt5645_pm =;

static struct i2c_driver rt5645_i2c_driver =;
module_i2c_driver();

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