#include <linux/bitfield.h>
#include <linux/device.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_registers.h>
#include <linux/soundwire/sdw_type.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc-dapm.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#define WSA884X_BASE …
#define WSA884X_ANA_BG_TSADC_BASE …
#define WSA884X_BG_CTRL …
#define WSA884X_ADC_CTRL …
#define WSA884X_BOP1_PROG …
#define WSA884X_BOP2_PROG …
#define WSA884X_BOP2_PROG_BOP2_VTH_MASK …
#define WSA884X_BOP2_PROG_BOP2_VTH_SHIFT …
#define WSA884X_BOP2_PROG_BOP2_HYST_MASK …
#define WSA884X_BOP2_PROG_BOP2_HYST_SHIFT …
#define WSA884X_UVLO_PROG …
#define WSA884X_UVLO_PROG1 …
#define WSA884X_SPARE_CTRL_0 …
#define WSA884X_SPARE_CTRL_1 …
#define WSA884X_SPARE_CTRL_2 …
#define WSA884X_SPARE_CTRL_3 …
#define WSA884X_REF_CTRL …
#define WSA884X_REF_CTRL_BG_RDY_SEL_MASK …
#define WSA884X_REF_CTRL_BG_RDY_SEL_SHIFT …
#define WSA884X_BG_TEST_CTL …
#define WSA884X_BG_BIAS …
#define WSA884X_ADC_PROG …
#define WSA884X_ADC_IREF_CTL …
#define WSA884X_ADC_ISENS_CTL …
#define WSA884X_ADC_CLK_CTL …
#define WSA884X_ADC_TEST_CTL …
#define WSA884X_ADC_BIAS …
#define WSA884X_VBAT_SNS …
#define WSA884X_DOUT_MSB …
#define WSA884X_DOUT_LSB …
#define WSA884X_BOP_ATEST_SEL …
#define WSA884X_MISC0 …
#define WSA884X_MISC1 …
#define WSA884X_MISC2 …
#define WSA884X_MISC3 …
#define WSA884X_SPARE_TSBG_0 …
#define WSA884X_SPARE_TUNE_0 …
#define WSA884X_SPARE_TUNE_1 …
#define WSA884X_ANA_IVSENSE_BASE …
#define WSA884X_VSENSE1 …
#define WSA884X_VSENSE1_GAIN_VSENSE_FE_MASK …
#define WSA884X_VSENSE1_GAIN_VSENSE_FE_SHIFT …
#define WSA884X_ISENSE2 …
#define WSA884X_ISENSE2_ISENSE_GAIN_CTL_MASK …
#define WSA884X_ISENSE2_ISENSE_GAIN_CTL_SHIFT …
#define WSA884X_SPARE_CTL_1 …
#define WSA884X_SPARE_CTL_2 …
#define WSA884X_SPARE_CTL_3 …
#define WSA884X_SPARE_CTL_4 …
#define WSA884X_EN …
#define WSA884X_OVERRIDE1 …
#define WSA884X_OVERRIDE2 …
#define WSA884X_ISENSE1 …
#define WSA884X_ISENSE_CAL …
#define WSA884X_MISC …
#define WSA884X_ADC_0 …
#define WSA884X_ADC_1 …
#define WSA884X_ADC_2 …
#define WSA884X_ADC_3 …
#define WSA884X_ADC_4 …
#define WSA884X_ADC_5 …
#define WSA884X_ADC_6 …
#define WSA884X_ADC_7 …
#define WSA884X_STATUS …
#define WSA884X_IVSENSE_SPARE_TUNE_1 …
#define WSA884X_SPARE_TUNE_2 …
#define WSA884X_SPARE_TUNE_3 …
#define WSA884X_SPARE_TUNE_4 …
#define WSA884X_ANA_SPK_TOP_BASE …
#define WSA884X_TOP_CTRL1 …
#define WSA884X_TOP_CTRL1_OCP_LOWVBAT_ITH_EN_MASK …
#define WSA884X_CLIP_DET_CTRL1 …
#define WSA884X_CLIP_DET_CTRL2 …
#define WSA884X_DAC_CTRL1 …
#define WSA884X_DAC_VCM_CTRL_REG1 …
#define WSA884X_DAC_VCM_CTRL_REG2 …
#define WSA884X_DAC_VCM_CTRL_REG3 …
#define WSA884X_DAC_VCM_CTRL_REG4 …
#define WSA884X_DAC_VCM_CTRL_REG5 …
#define WSA884X_DAC_VCM_CTRL_REG6 …
#define WSA884X_PWM_CLK_CTL …
#define WSA884X_PWM_CLK_CTL_VCMO_INT1_IDLE_MODE_OVRT_MASK …
#define WSA884X_PWM_CLK_CTL_VCMO_INT1_IDLE_MODE_OVRT_SHIFT …
#define WSA884X_PWM_CLK_CTL_REG_MCLK_DIV_RATIO_MASK …
#define WSA884X_PWM_CLK_CTL_REG_MCLK_DIV_RATIO_SHIFT …
#define WSA884X_PWM_CLK_CTL_PWM_DEGLITCH_CLK_DELAY_CTRL_MASK …
#define WSA884X_PWM_CLK_CTL_PWM_DEGLITCH_CLK_DELAY_CTRL_SHIFT …
#define WSA884X_PWM_CLK_CTL_PWM_CLK_FREQ_SEL_MASK …
#define WSA884X_PWM_CLK_CTL_PWM_CLK_FREQ_SEL_SHIFT …
#define WSA884X_PWM_CLK_CTL_PWM_CLK_DIV_RATIO_MASK …
#define WSA884X_PWM_CLK_CTL_PWM_CLK_DIV_RATIO_SHIFT …
#define WSA884X_PWM_CLK_CTL_PWM_CLK_DIV_BYPASS_MASK …
#define WSA884X_PWM_CLK_CTL_PWM_CLK_DIV_BYPASS_SHIFT …
#define WSA884X_DRV_LF_LDO_SEL …
#define WSA884X_OCP_CTL …
#define WSA884X_PDRV_HS_CTL …
#define WSA884X_PDRV_LS_CTL …
#define WSA884X_SPK_TOP_SPARE_CTL_1 …
#define WSA884X_SPK_TOP_SPARE_CTL_2 …
#define WSA884X_SPK_TOP_SPARE_CTL_3 …
#define WSA884X_SPK_TOP_SPARE_CTL_4 …
#define WSA884X_SPARE_CTL_5 …
#define WSA884X_DAC_EN_DEBUG_REG …
#define WSA884X_DAC_OPAMP_BIAS1_REG …
#define WSA884X_DAC_OPAMP_BIAS2_REG …
#define WSA884X_DAC_TUNE1 …
#define WSA884X_DAC_VOLTAGE_CTRL_REG …
#define WSA884X_ATEST1_REG …
#define WSA884X_ATEST2_REG …
#define WSA884X_TOP_BIAS_REG1 …
#define WSA884X_TOP_BIAS_REG2 …
#define WSA884X_TOP_BIAS_REG3 …
#define WSA884X_TOP_BIAS_REG4 …
#define WSA884X_PWRSTG_DBG2 …
#define WSA884X_DRV_LF_BLK_EN …
#define WSA884X_DRV_LF_EN …
#define WSA884X_DRV_LF_MASK_DCC_CTL …
#define WSA884X_DRV_LF_MISC_CTL1 …
#define WSA884X_DRV_LF_REG_GAIN …
#define WSA884X_DRV_OS_CAL_CTL …
#define WSA884X_DRV_OS_CAL_CTL1 …
#define WSA884X_PWRSTG_DBG …
#define WSA884X_BBM_CTL …
#define WSA884X_TOP_MISC1 …
#define WSA884X_DAC_VCM_CTRL_REG7 …
#define WSA884X_TOP_BIAS_REG5 …
#define WSA884X_DRV_LF_MISC_CTL2 …
#define WSA884X_SPK_TOP_SPARE_TUNE_2 …
#define WSA884X_SPK_TOP_SPARE_TUNE_3 …
#define WSA884X_SPK_TOP_SPARE_TUNE_4 …
#define WSA884X_SPARE_TUNE_5 …
#define WSA884X_SPARE_TUNE_6 …
#define WSA884X_SPARE_TUNE_7 …
#define WSA884X_SPARE_TUNE_8 …
#define WSA884X_SPARE_TUNE_9 …
#define WSA884X_SPARE_TUNE_10 …
#define WSA884X_PA_STATUS0 …
#define WSA884X_PA_STATUS1 …
#define WSA884X_PA_STATUS2 …
#define WSA884X_PA_STATUS3 …
#define WSA884X_PA_STATUS4 …
#define WSA884X_PA_STATUS5 …
#define WSA884X_SPARE_RO_1 …
#define WSA884X_SPARE_RO_2 …
#define WSA884X_SPARE_RO_3 …
#define WSA884X_ANA_BOOST_BASE …
#define WSA884X_STB_CTRL1 …
#define WSA884X_STB_CTRL1_SLOPE_COMP_CURRENT_MASK …
#define WSA884X_STB_CTRL1_SLOPE_COMP_CURRENT_SHIFT …
#define WSA884X_STB_CTRL1_VOUT_FS_MASK …
#define WSA884X_STB_CTRL1_VOUT_FS_SHIFT …
#define WSA884X_CURRENT_LIMIT …
#define WSA884X_CURRENT_LIMIT_CURRENT_LIMIT_OVRD_EN_MASK …
#define WSA884X_CURRENT_LIMIT_CURRENT_LIMIT_OVRD_EN_SHIFT …
#define WSA884X_CURRENT_LIMIT_CURRENT_LIMIT_MASK …
#define WSA884X_CURRENT_LIMIT_CURRENT_LIMIT_SHIFT …
#define WSA884X_CURRENT_LIMIT_CLK_PHASE_SHIFT …
#define WSA884X_BYP_CTRL1 …
#define WSA884X_SPARE_CTL_0 …
#define WSA884X_BOOST_SPARE_CTL_1 …
#define WSA884X_SPARE_RO_0 …
#define WSA884X_BOOST_SPARE_RO_1 …
#define WSA884X_IBIAS1 …
#define WSA884X_IBIAS2 …
#define WSA884X_IBIAS3 …
#define WSA884X_EN_CTRL …
#define WSA884X_STB_CTRL2 …
#define WSA884X_STB_CTRL3 …
#define WSA884X_STB_CTRL4 …
#define WSA884X_BYP_CTRL2 …
#define WSA884X_BYP_CTRL3 …
#define WSA884X_ZX_CTRL1 …
#define WSA884X_ZX_CTRL1_ZX_DET_EN_MASK …
#define WSA884X_ZX_CTRL1_ZX_DET_EN_SHIFT …
#define WSA884X_ZX_CTRL1_ZX_DET_SW_EN_MASK …
#define WSA884X_ZX_CTRL1_ZX_DET_SW_EN_SHIFT …
#define WSA884X_ZX_CTRL1_ZX_DET_STAGE_DEFAULT_MASK …
#define WSA884X_ZX_CTRL1_ZX_DET_STAGE_DEFAULT_SHIFT …
#define WSA884X_ZX_CTRL1_ZX_DET_SW_SEL_MASK …
#define WSA884X_ZX_CTRL1_ZX_DET_SW_SEL_SHIFT …
#define WSA884X_ZX_CTRL1_ZX_BYP_MASK_IGNORE_MASK …
#define WSA884X_ZX_CTRL1_ZX_BYP_MASK_IGNORE_SHIFT …
#define WSA884X_ZX_CTRL1_ZX_BYP_MASK_DEL_MASK …
#define WSA884X_ZX_CTRL1_ZX_BYP_MASK_DEL_SHIFT …
#define WSA884X_ZX_CTRL1_BOOTCAP_REFRESH_DIS_MASK …
#define WSA884X_ZX_CTRL1_BOOTCAP_REFRESH_DIS_SHIFT …
#define WSA884X_ZX_CTRL2 …
#define WSA884X_BLEEDER_CTRL …
#define WSA884X_BOOST_MISC …
#define WSA884X_PWRSTAGE_CTRL1 …
#define WSA884X_PWRSTAGE_CTRL2 …
#define WSA884X_PWRSTAGE_CTRL3 …
#define WSA884X_PWRSTAGE_CTRL4 …
#define WSA884X_MAXD_REG1 …
#define WSA884X_MAXD_REG2 …
#define WSA884X_ILIM_CTRL1 …
#define WSA884X_ILIM_CTRL1_EN_AUTO_MAXD_SEL_MASK …
#define WSA884X_ILIM_CTRL1_EN_AUTO_MAXD_SEL_SHIFT …
#define WSA884X_ILIM_CTRL1_EN_ILIM_SW_CLH_MASK …
#define WSA884X_ILIM_CTRL1_EN_ILIM_SW_CLH_SHIFT …
#define WSA884X_ILIM_CTRL1_ILIM_OFFSET_CLH_MASK …
#define WSA884X_ILIM_CTRL1_ILIM_OFFSET_CLH_SHIFT …
#define WSA884X_ILIM_CTRL1_ILIM_OFFSET_PB_MASK …
#define WSA884X_ILIM_CTRL1_ILIM_OFFSET_PB_SHIFT …
#define WSA884X_ILIM_CTRL2 …
#define WSA884X_TEST_CTRL1 …
#define WSA884X_TEST_CTRL2 …
#define WSA884X_SPARE1 …
#define WSA884X_BOOT_CAP_CHECK …
#define WSA884X_ANA_PON_LDOL_BASE …
#define WSA884X_PON_CTL_0 …
#define WSA884X_PWRSAV_CTL …
#define WSA884X_PON_LDOL_SPARE_CTL_0 …
#define WSA884X_PON_LDOL_SPARE_CTL_1 …
#define WSA884X_PON_LDOL_SPARE_CTL_2 …
#define WSA884X_PON_LDOL_SPARE_CTL_3 …
#define WSA884X_PON_CLT_1 …
#define WSA884X_PON_CTL_2 …
#define WSA884X_PON_CTL_3 …
#define WSA884X_CKWD_CTL_0 …
#define WSA884X_CKWD_CTL_1 …
#define WSA884X_CKWD_CTL_1_VPP_SW_CTL_MASK …
#define WSA884X_CKWD_CTL_1_VPP_SW_CTL_SHIFT …
#define WSA884X_CKWD_CTL_1_CKWD_VCOMP_VREF_SEL_MASK …
#define WSA884X_CKWD_CTL_1_CKWD_VCOMP_VREF_SEL_SHIFT …
#define WSA884X_CKWD_CTL_2 …
#define WSA884X_CKSK_CTL_0 …
#define WSA884X_PADSW_CTL_0 …
#define WSA884X_TEST_0 …
#define WSA884X_TEST_1 …
#define WSA884X_STATUS_0 …
#define WSA884X_STATUS_1 …
#define WSA884X_PON_LDOL_SPARE_TUNE_0 …
#define WSA884X_PON_LDOL_SPARE_TUNE_1 …
#define WSA884X_PON_LDOL_SPARE_TUNE_2 …
#define WSA884X_PON_LDOL_SPARE_TUNE_3 …
#define WSA884X_PON_LDOL_SPARE_TUNE_4 …
#define WSA884X_DIG_CTRL0_BASE …
#define WSA884X_DIG_CTRL0_PAGE …
#define WSA884X_CHIP_ID0 …
#define WSA884X_CHIP_ID1 …
#define WSA884X_CHIP_ID2 …
#define WSA884X_CHIP_ID3 …
#define WSA884X_BUS_ID …
#define WSA884X_CDC_RST_CTL …
#define WSA884X_SWR_RESET_EN …
#define WSA884X_TOP_CLK_CFG …
#define WSA884X_SWR_CLK_RATE …
#define WSA884X_CDC_PATH_MODE …
#define WSA884X_CDC_PATH_MODE_RXD_MODE_MASK …
#define WSA884X_CDC_PATH_MODE_RXD_MODE_SHIFT …
#define WSA884X_CDC_PATH_MODE_TXD_MODE_MASK …
#define WSA884X_CDC_PATH_MODE_TXD_MODE_SHIFT …
#define WSA884X_CDC_CLK_CTL …
#define WSA884X_PA_FSM_EN …
#define WSA884X_PA_FSM_EN_GLOBAL_PA_EN_MASK …
#define WSA884X_PA_FSM_EN_GLOBAL_PA_EN_SHIFT …
#define WSA884X_PA_FSM_CTL0 …
#define WSA884X_PA_FSM_CTL1 …
#define WSA884X_PA_FSM_CTL1_NOISE_GATE_BLOCK_MASK …
#define WSA884X_PA_FSM_TIMER0 …
#define WSA884X_PA_FSM_TIMER1 …
#define WSA884X_PA_FSM_STA0 …
#define WSA884X_PA_FSM_STA1 …
#define WSA884X_PA_FSM_ERR_CTL …
#define WSA884X_PA_FSM_ERR_COND0 …
#define WSA884X_PA_FSM_ERR_COND1 …
#define WSA884X_PA_FSM_MSK0 …
#define WSA884X_PA_FSM_MSK1 …
#define WSA884X_PA_FSM_BYP_CTL …
#define WSA884X_PA_FSM_BYP0 …
#define WSA884X_PA_FSM_BYP1 …
#define WSA884X_TADC_VALUE_CTL …
#define WSA884X_TEMP_DETECT_CTL …
#define WSA884X_TEMP_DIN_MSB …
#define WSA884X_TEMP_DIN_LSB …
#define WSA884X_TEMP_DOUT_MSB …
#define WSA884X_TEMP_DOUT_LSB …
#define WSA884X_TEMP_CONFIG0 …
#define WSA884X_TEMP_CONFIG1 …
#define WSA884X_VBAT_THRM_FLT_CTL …
#define WSA884X_VBAT_THRM_FLT_CTL_THRM_COEF_SEL_MASK …
#define WSA884X_VBAT_THRM_FLT_CTL_THRM_COEF_SEL_SHIFT …
#define WSA884X_VBAT_THRM_FLT_CTL_THRM_FLT_EN_SHIFT …
#define WSA884X_VBAT_THRM_FLT_CTL_VBAT_COEF_SEL_MASK …
#define WSA884X_VBAT_THRM_FLT_CTL_VBAT_COEF_SEL_SHIFT …
#define WSA884X_VBAT_THRM_FLT_CTL_VBAT_FLT_EN_SHIFT …
#define WSA884X_VBAT_CAL_CTL …
#define WSA884X_VBAT_CAL_CTL_RESERVE_MASK …
#define WSA884X_VBAT_CAL_CTL_VBAT_CAL_EN_MASK …
#define WSA884X_VBAT_DIN_MSB …
#define WSA884X_VBAT_DIN_LSB …
#define WSA884X_VBAT_DOUT_MSB …
#define WSA884X_VBAT_DOUT_LSB …
#define WSA884X_VBAT_CAL_MSB …
#define WSA884X_VBAT_CAL_LSB …
#define WSA884X_UVLO_DEGLITCH_CTL …
#define WSA884X_BOP_DEGLITCH_CTL …
#define WSA884X_BOP_DEGLITCH_CTL_BOP_DEGLITCH_SETTING_MASK …
#define WSA884X_BOP_DEGLITCH_CTL_BOP_DEGLITCH_SETTING_SHIFT …
#define WSA884X_BOP_DEGLITCH_CTL_BOP_DEGLITCH_EN_MASK …
#define WSA884X_BOP_DEGLITCH_CTL_BOP_DEGLITCH_EN_SHIFT …
#define WSA884X_VBAT_ZONE_DETC_CTL …
#define WSA884X_CPS_CTL …
#define WSA884X_CDC_RX_CTL …
#define WSA884X_CDC_SPK_DSM_A1_0 …
#define WSA884X_CDC_SPK_DSM_A1_1 …
#define WSA884X_CDC_SPK_DSM_A2_0 …
#define WSA884X_CDC_SPK_DSM_A2_1 …
#define WSA884X_CDC_SPK_DSM_A3_0 …
#define WSA884X_CDC_SPK_DSM_A3_1 …
#define WSA884X_CDC_SPK_DSM_A4_0 …
#define WSA884X_CDC_SPK_DSM_A4_1 …
#define WSA884X_CDC_SPK_DSM_A5_0 …
#define WSA884X_CDC_SPK_DSM_A5_1 …
#define WSA884X_CDC_SPK_DSM_A6_0 …
#define WSA884X_CDC_SPK_DSM_A7_0 …
#define WSA884X_CDC_SPK_DSM_C_0 …
#define WSA884X_CDC_SPK_DSM_C_0_COEF_C3_MASK …
#define WSA884X_CDC_SPK_DSM_C_0_COEF_C3_SHIFT …
#define WSA884X_CDC_SPK_DSM_C_0_COEF_C2_MASK …
#define WSA884X_CDC_SPK_DSM_C_0_COEF_C2_SHIFT …
#define WSA884X_CDC_SPK_DSM_C_1 …
#define WSA884X_CDC_SPK_DSM_C_2 …
#define WSA884X_CDC_SPK_DSM_C_2_COEF_C7_MASK …
#define WSA884X_CDC_SPK_DSM_C_2_COEF_C7_SHIFT …
#define WSA884X_CDC_SPK_DSM_C_2_COEF_C6_MASK …
#define WSA884X_CDC_SPK_DSM_C_2_COEF_C6_SHIFT …
#define WSA884X_CDC_SPK_DSM_C_3 …
#define WSA884X_CDC_SPK_DSM_C_3_COEF_C7_MASK …
#define WSA884X_CDC_SPK_DSM_C_3_COEF_C7_SHIFT …
#define WSA884X_CDC_SPK_DSM_R1 …
#define WSA884X_CDC_SPK_DSM_R2 …
#define WSA884X_CDC_SPK_DSM_R3 …
#define WSA884X_CDC_SPK_DSM_R4 …
#define WSA884X_CDC_SPK_DSM_R5 …
#define WSA884X_CDC_SPK_DSM_R6 …
#define WSA884X_CDC_SPK_DSM_R7 …
#define WSA884X_CDC_SPK_GAIN_PDM_0 …
#define WSA884X_CDC_SPK_GAIN_PDM_1 …
#define WSA884X_CDC_SPK_GAIN_PDM_2 …
#define WSA884X_PDM_WD_CTL …
#define WSA884X_PDM_WD_CTL_HOLD_OFF_MASK …
#define WSA884X_PDM_WD_CTL_HOLD_OFF_SHIFT …
#define WSA884X_PDM_WD_CTL_TIME_OUT_SEL_MASK …
#define WSA884X_PDM_WD_CTL_TIME_OUT_SEL_SHIFT …
#define WSA884X_PDM_WD_CTL_PDM_WD_EN_MASK …
#define WSA884X_PDM_WD_CTL_PDM_WD_EN_SHIFT …
#define WSA884X_DEM_BYPASS_DATA0 …
#define WSA884X_DEM_BYPASS_DATA1 …
#define WSA884X_DEM_BYPASS_DATA2 …
#define WSA884X_DEM_BYPASS_DATA3 …
#define WSA884X_DRE_CTL_0 …
#define WSA884X_DRE_CTL_0_PROG_DELAY_MASK …
#define WSA884X_DRE_CTL_0_PROG_DELAY_SHIFT …
#define WSA884X_DRE_CTL_0_OFFSET_MASK …
#define WSA884X_DRE_CTL_0_OFFSET_SHIFT …
#define WSA884X_DRE_CTL_1 …
#define WSA884X_DRE_CTL_1_CSR_GAIN_MASK …
#define WSA884X_DRE_CTL_1_CSR_GAIN_SHIFT …
#define WSA884X_DRE_CTL_1_CSR_GAIN_EN_MASK …
#define WSA884X_DRE_CTL_1_CSR_GAIN_EN_SHIFT …
#define WSA884X_DRE_IDLE_DET_CTL …
#define WSA884X_GAIN_RAMPING_CTL …
#define WSA884X_GAIN_RAMPING_MIN …
#define WSA884X_GAIN_RAMPING_MIN_MIN_GAIN_MASK …
#define WSA884X_GAIN_RAMPING_MIN_MIN_GAIN_SHIFT …
#define WSA884X_TAGC_CTL …
#define WSA884X_TAGC_TIME …
#define WSA884X_TAGC_FORCE_VAL …
#define WSA884X_VAGC_CTL …
#define WSA884X_VAGC_TIME …
#define WSA884X_VAGC_ATTN_LVL_1 …
#define WSA884X_VAGC_ATTN_LVL_2 …
#define WSA884X_VAGC_ATTN_LVL_3 …
#define WSA884X_CLSH_CTL_0 …
#define WSA884X_CLSH_CTL_0_CSR_GAIN_EN_SHIFT …
#define WSA884X_CLSH_CTL_0_DLY_CODE_MASK …
#define WSA884X_CLSH_CTL_0_DLY_CODE_SHIFT …
#define WSA884X_CLSH_CTL_0_DLY_RST_SHIFT …
#define WSA884X_CLSH_CTL_0_DLY_EN_SHIFT …
#define WSA884X_CLSH_CTL_0_INPUT_EN_SHIFT …
#define WSA884X_CLSH_CTL_0_CLSH_EN_SHIFT …
#define WSA884X_CLSH_CTL_1 …
#define WSA884X_CLSH_V_HD_PA …
#define WSA884X_CLSH_V_PA_MIN …
#define WSA884X_CLSH_OVRD_VAL …
#define WSA884X_CLSH_HARD_MAX …
#define WSA884X_CLSH_SOFT_MAX …
#define WSA884X_CLSH_SIG_DP …
#define WSA884X_PBR_DELAY_CTL …
#define WSA884X_CLSH_SRL_MAX_PBR …
#define WSA884X_PBR_MAX_VOLTAGE …
#define WSA884X_PBR_MAX_CODE …
#define WSA884X_VTH_TO_REG(vth) …
#define WSA884X_CLSH_VTH1 …
#define WSA884X_CLSH_VTH2 …
#define WSA884X_CLSH_VTH3 …
#define WSA884X_CLSH_VTH4 …
#define WSA884X_CLSH_VTH5 …
#define WSA884X_CLSH_VTH6 …
#define WSA884X_CLSH_VTH7 …
#define WSA884X_CLSH_VTH8 …
#define WSA884X_CLSH_VTH9 …
#define WSA884X_CLSH_VTH10 …
#define WSA884X_CLSH_VTH11 …
#define WSA884X_CLSH_VTH12 …
#define WSA884X_CLSH_VTH13 …
#define WSA884X_CLSH_VTH14 …
#define WSA884X_CLSH_VTH15 …
#define WSA884X_DIG_CTRL1_BASE …
#define WSA884X_DIG_CTRL1_PAGE …
#define WSA884X_VPHX_SYS_EN_STATUS …
#define WSA884X_ANA_WO_CTL_0 …
#define WSA884X_ANA_WO_CTL_0_MODE_SHIFT …
#define WSA884X_ANA_WO_CTL_0_VPHX_SYS_EN_MASK …
#define WSA884X_ANA_WO_CTL_0_PA_AUX_DISABLE …
#define WSA884X_ANA_WO_CTL_0_PA_AUX_18_DB …
#define WSA884X_ANA_WO_CTL_0_PA_AUX_0_DB …
#define WSA884X_ANA_WO_CTL_0_PA_AUX_GAIN_MASK …
#define WSA884X_ANA_WO_CTL_0_PA_MIN_GAIN_BYP_MASK …
#define WSA884X_ANA_WO_CTL_0_DAC_CM_CLAMP_EN_MODE_SPEAKER …
#define WSA884X_ANA_WO_CTL_0_DAC_CM_CLAMP_EN_MASK …
#define WSA884X_ANA_WO_CTL_1 …
#define WSA884X_PIN_CTL …
#define WSA884X_PIN_CTL_OE …
#define WSA884X_PIN_WDATA_IOPAD …
#define WSA884X_PIN_STATUS …
#define WSA884X_I2C_SLAVE_CTL …
#define WSA884X_SPMI_PAD_CTL0 …
#define WSA884X_SPMI_PAD_CTL1 …
#define WSA884X_SPMI_PAD_CTL2 …
#define WSA884X_MEM_CTL …
#define WSA884X_SWR_HM_TEST0 …
#define WSA884X_SWR_HM_TEST1 …
#define WSA884X_OTP_CTRL0 …
#define WSA884X_OTP_CTRL1 …
#define WSA884X_OTP_CTRL2 …
#define WSA884X_OTP_STAT …
#define WSA884X_OTP_PRG_TCSP0 …
#define WSA884X_OTP_PRG_TCSP1 …
#define WSA884X_OTP_PRG_TPPS …
#define WSA884X_OTP_PRG_TVPS …
#define WSA884X_OTP_PRG_TVPH …
#define WSA884X_OTP_PRG_TPPR0 …
#define WSA884X_OTP_PRG_TPPR1 …
#define WSA884X_OTP_PRG_TPPH …
#define WSA884X_OTP_PRG_END …
#define WSA884X_WAVG_PLAY …
#define WSA884X_WAVG_CTL …
#define WSA884X_WAVG_LRA_PER_0 …
#define WSA884X_WAVG_LRA_PER_1 …
#define WSA884X_WAVG_DELTA_THETA_0 …
#define WSA884X_WAVG_DELTA_THETA_1 …
#define WSA884X_WAVG_DIRECT_AMP_0 …
#define WSA884X_WAVG_DIRECT_AMP_1 …
#define WSA884X_WAVG_PTRN_AMP0_0 …
#define WSA884X_WAVG_PTRN_AMP0_1 …
#define WSA884X_WAVG_PTRN_AMP1_0 …
#define WSA884X_WAVG_PTRN_AMP1_1 …
#define WSA884X_WAVG_PTRN_AMP2_0 …
#define WSA884X_WAVG_PTRN_AMP2_1 …
#define WSA884X_WAVG_PTRN_AMP3_0 …
#define WSA884X_WAVG_PTRN_AMP3_1 …
#define WSA884X_WAVG_PTRN_AMP4_0 …
#define WSA884X_WAVG_PTRN_AMP4_1 …
#define WSA884X_WAVG_PTRN_AMP5_0 …
#define WSA884X_WAVG_PTRN_AMP5_1 …
#define WSA884X_WAVG_PTRN_AMP6_0 …
#define WSA884X_WAVG_PTRN_AMP6_1 …
#define WSA884X_WAVG_PTRN_AMP7_0 …
#define WSA884X_WAVG_PTRN_AMP7_1 …
#define WSA884X_WAVG_PER_0_1 …
#define WSA884X_WAVG_PER_2_3 …
#define WSA884X_WAVG_PER_4_5 …
#define WSA884X_WAVG_PER_6_7 …
#define WSA884X_WAVG_STA …
#define WSA884X_INTR_MODE …
#define WSA884X_INTR_MASK0 …
#define WSA884X_INTR_MASK1 …
#define WSA884X_INTR_STATUS0 …
#define WSA884X_INTR_STATUS1 …
#define WSA884X_INTR_CLEAR0 …
#define WSA884X_INTR_CLEAR1 …
#define WSA884X_INTR_LEVEL0 …
#define WSA884X_INTR_LEVEL1 …
#define WSA884X_INTR_SET0 …
#define WSA884X_INTR_SET1 …
#define WSA884X_INTR_TEST0 …
#define WSA884X_INTR_TEST1 …
#define WSA884X_PDM_TEST_MODE …
#define WSA884X_ATE_TEST_MODE …
#define WSA884X_PA_FSM_DBG …
#define WSA884X_DIG_DEBUG_MODE …
#define WSA884X_DIG_DEBUG_SEL …
#define WSA884X_DIG_DEBUG_EN …
#define WSA884X_TADC_DETECT_DBG_CTL …
#define WSA884X_TADC_DEBUG_MSB …
#define WSA884X_TADC_DEBUG_LSB …
#define WSA884X_SAMPLE_EDGE_SEL …
#define WSA884X_SWR_EDGE_SEL …
#define WSA884X_TEST_MODE_CTL …
#define WSA884X_IOPAD_CTL …
#define WSA884X_ANA_CSR_DBG_ADD …
#define WSA884X_ANA_CSR_DBG_CTL …
#define WSA884X_CLK_DBG_CTL …
#define WSA884X_SPARE_R …
#define WSA884X_SPARE_0 …
#define WSA884X_SPARE_1 …
#define WSA884X_SPARE_2 …
#define WSA884X_SCODE …
#define WSA884X_DIG_TRIM_BASE …
#define WSA884X_DIG_TRIM_PAGE …
#define WSA884X_OTP_REG_0 …
#define WSA884X_OTP_ID_WSA8840 …
#define WSA884X_OTP_ID_WSA8845 …
#define WSA884X_OTP_ID_WSA8845H …
#define WSA884X_OTP_REG_0_ID_MASK …
#define WSA884X_OTP_REG_1 …
#define WSA884X_OTP_REG_2 …
#define WSA884X_OTP_REG_3 …
#define WSA884X_OTP_REG_4 …
#define WSA884X_OTP_REG_5 …
#define WSA884X_OTP_REG_6 …
#define WSA884X_OTP_REG_7 …
#define WSA884X_OTP_REG_8 …
#define WSA884X_OTP_REG_9 …
#define WSA884X_OTP_REG_10 …
#define WSA884X_OTP_REG_11 …
#define WSA884X_OTP_REG_12 …
#define WSA884X_OTP_REG_13 …
#define WSA884X_OTP_REG_14 …
#define WSA884X_OTP_REG_15 …
#define WSA884X_OTP_REG_16 …
#define WSA884X_OTP_REG_17 …
#define WSA884X_OTP_REG_18 …
#define WSA884X_OTP_REG_19 …
#define WSA884X_OTP_REG_20 …
#define WSA884X_OTP_REG_21 …
#define WSA884X_OTP_REG_22 …
#define WSA884X_OTP_REG_23 …
#define WSA884X_OTP_REG_24 …
#define WSA884X_OTP_REG_25 …
#define WSA884X_OTP_REG_26 …
#define WSA884X_OTP_REG_27 …
#define WSA884X_OTP_REG_28 …
#define WSA884X_OTP_REG_29 …
#define WSA884X_OTP_REG_30 …
#define WSA884X_OTP_REG_31 …
#define WSA884X_OTP_REG_32 …
#define WSA884X_OTP_REG_33 …
#define WSA884X_OTP_REG_34 …
#define WSA884X_OTP_REG_35 …
#define WSA884X_OTP_REG_36 …
#define WSA884X_OTP_REG_37 …
#define WSA884X_OTP_REG_38 …
#define WSA884X_OTP_REG_38_RESERVER_MASK …
#define WSA884X_OTP_REG_38_RESERVER_SHIFT …
#define WSA884X_OTP_REG_38_BST_CFG_SEL_MASK …
#define WSA884X_OTP_REG_38_BST_CFG_SEL_SHIFT …
#define WSA884X_OTP_REG_38_BOOST_ILIM_TUNE_MASK …
#define WSA884X_OTP_REG_38_BOOST_ILIM_TUNE_SHIFT …
#define WSA884X_OTP_REG_39 …
#define WSA884X_OTP_REG_40 …
#define WSA884X_OTP_REG_40_SPARE_TYPE2_MASK …
#define WSA884X_OTP_REG_40_SPARE_TYPE2_SHIFT …
#define WSA884X_OTP_REG_40_ISENSE_RESCAL_MASK …
#define WSA884X_OTP_REG_40_ISENSE_RESCAL_SHIFT …
#define WSA884X_OTP_REG_40_ATE_BOOST_RDSON_TEST_MASK …
#define WSA884X_OTP_REG_40_ATE_BOOST_RDSON_TEST_SHIFT …
#define WSA884X_OTP_REG_40_ATE_CLASSD_RDSON_TEST_MASK …
#define WSA884X_OTP_REG_40_ATE_CLASSD_RDSON_TEST_SHIFT …
#define WSA884X_OTP_REG_41 …
#define WSA884X_OTP_REG_63 …
#define WSA884X_DIG_EMEM_BASE …
#define WSA884X_EMEM_0 …
#define WSA884X_EMEM_1 …
#define WSA884X_EMEM_2 …
#define WSA884X_EMEM_3 …
#define WSA884X_EMEM_4 …
#define WSA884X_EMEM_5 …
#define WSA884X_EMEM_6 …
#define WSA884X_EMEM_7 …
#define WSA884X_EMEM_8 …
#define WSA884X_EMEM_9 …
#define WSA884X_EMEM_10 …
#define WSA884X_EMEM_11 …
#define WSA884X_EMEM_12 …
#define WSA884X_EMEM_13 …
#define WSA884X_EMEM_14 …
#define WSA884X_EMEM_15 …
#define WSA884X_EMEM_16 …
#define WSA884X_EMEM_17 …
#define WSA884X_EMEM_18 …
#define WSA884X_EMEM_19 …
#define WSA884X_EMEM_20 …
#define WSA884X_EMEM_21 …
#define WSA884X_EMEM_22 …
#define WSA884X_EMEM_23 …
#define WSA884X_EMEM_24 …
#define WSA884X_EMEM_25 …
#define WSA884X_EMEM_26 …
#define WSA884X_EMEM_27 …
#define WSA884X_EMEM_28 …
#define WSA884X_EMEM_29 …
#define WSA884X_EMEM_30 …
#define WSA884X_EMEM_31 …
#define WSA884X_EMEM_32 …
#define WSA884X_EMEM_33 …
#define WSA884X_EMEM_34 …
#define WSA884X_EMEM_35 …
#define WSA884X_EMEM_36 …
#define WSA884X_EMEM_37 …
#define WSA884X_EMEM_38 …
#define WSA884X_EMEM_39 …
#define WSA884X_EMEM_40 …
#define WSA884X_EMEM_41 …
#define WSA884X_EMEM_42 …
#define WSA884X_EMEM_43 …
#define WSA884X_EMEM_44 …
#define WSA884X_EMEM_45 …
#define WSA884X_EMEM_46 …
#define WSA884X_EMEM_47 …
#define WSA884X_EMEM_48 …
#define WSA884X_EMEM_49 …
#define WSA884X_EMEM_50 …
#define WSA884X_EMEM_51 …
#define WSA884X_EMEM_52 …
#define WSA884X_EMEM_53 …
#define WSA884X_EMEM_54 …
#define WSA884X_EMEM_55 …
#define WSA884X_EMEM_56 …
#define WSA884X_EMEM_57 …
#define WSA884X_EMEM_58 …
#define WSA884X_EMEM_59 …
#define WSA884X_EMEM_60 …
#define WSA884X_EMEM_61 …
#define WSA884X_EMEM_62 …
#define WSA884X_EMEM_63 …
#define WSA884X_NUM_REGISTERS …
#define WSA884X_MAX_REGISTER …
#define WSA884X_SUPPLIES_NUM …
#define WSA884X_MAX_SWR_PORTS …
#define WSA884X_RATES …
#define WSA884X_FRAC_RATES …
#define WSA884X_FORMATS …
struct wsa884x_priv { … };
enum { … };
enum wsa884x_gain { … };
enum wsa884x_isense { … };
enum wsa884x_vsense { … };
enum wsa884x_port_ids { … };
static const char * const wsa884x_supply_name[] = …;
static const char * const wsa884x_dev_mode_text[] = …;
enum wsa884x_mode { … };
static const struct soc_enum wsa884x_dev_mode_enum = …;
static struct sdw_dpn_prop wsa884x_sink_dpn_prop[WSA884X_MAX_SWR_PORTS] = …;
static const struct sdw_port_config wsa884x_pconfig[WSA884X_MAX_SWR_PORTS] = …;
static struct reg_default wsa884x_defaults[] = …;
static bool wsa884x_readonly_register(struct device *dev, unsigned int reg)
{ … }
static bool wsa884x_writeable_register(struct device *dev, unsigned int reg)
{ … }
static bool wsa884x_volatile_register(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config wsa884x_regmap_config = …;
static const struct reg_sequence wsa884x_reg_init[] = …;
static void wsa884x_set_gain_parameters(struct wsa884x_priv *wsa884x)
{ … }
static void wsa884x_init(struct wsa884x_priv *wsa884x)
{ … }
static int wsa884x_update_status(struct sdw_slave *slave,
enum sdw_slave_status status)
{ … }
static int wsa884x_port_prep(struct sdw_slave *slave,
struct sdw_prepare_ch *prepare_ch,
enum sdw_port_prep_ops state)
{ … }
static const struct sdw_slave_ops wsa884x_slave_ops = …;
static int wsa884x_dev_mode_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wsa884x_dev_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wsa884x_get_swr_port(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wsa884x_set_swr_port(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wsa884x_codec_probe(struct snd_soc_component *comp)
{ … }
static void wsa884x_spkr_post_pmu(struct snd_soc_component *component,
struct wsa884x_priv *wsa884x)
{ … }
static int wsa884x_spkr_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget wsa884x_dapm_widgets[] = …;
static const DECLARE_TLV_DB_SCALE(pa_gain, -900, 150, -900);
static const struct snd_kcontrol_new wsa884x_snd_controls[] = …;
static const struct snd_soc_dapm_route wsa884x_audio_map[] = …;
static const struct snd_soc_component_driver wsa884x_component_drv = …;
static int wsa884x_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int wsa884x_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int wsa884x_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
{ … }
static int wsa884x_set_stream(struct snd_soc_dai *dai,
void *stream, int direction)
{ … }
static const struct snd_soc_dai_ops wsa884x_dai_ops = …;
static struct snd_soc_dai_driver wsa884x_dais[] = …;
static void wsa884x_reset_powerdown(void *data)
{ … }
static void wsa884x_reset_deassert(struct wsa884x_priv *wsa884x)
{ … }
static void wsa884x_regulator_disable(void *data)
{ … }
static int wsa884x_get_reset(struct device *dev, struct wsa884x_priv *wsa884x)
{ … }
static int wsa884x_probe(struct sdw_slave *pdev,
const struct sdw_device_id *id)
{ … }
static int __maybe_unused wsa884x_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused wsa884x_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops wsa884x_pm_ops = …;
static const struct sdw_device_id wsa884x_swr_id[] = …;
MODULE_DEVICE_TABLE(sdw, wsa884x_swr_id);
static struct sdw_driver wsa884x_codec_driver = …;
module_sdw_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;