linux/sound/soc/codecs/wm8737.h

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _WM8737_H
#define _WM8737_H

/*
 * wm8737.c  --  WM8523 ALSA SoC Audio driver
 *
 * Copyright 2010 Wolfson Microelectronics plc
 *
 * Author: Mark Brown <[email protected]>
 */

/*
 * Register values.
 */
#define WM8737_LEFT_PGA_VOLUME
#define WM8737_RIGHT_PGA_VOLUME
#define WM8737_AUDIO_PATH_L
#define WM8737_AUDIO_PATH_R
#define WM8737_3D_ENHANCE
#define WM8737_ADC_CONTROL
#define WM8737_POWER_MANAGEMENT
#define WM8737_AUDIO_FORMAT
#define WM8737_CLOCKING
#define WM8737_MIC_PREAMP_CONTROL
#define WM8737_MISC_BIAS_CONTROL
#define WM8737_NOISE_GATE
#define WM8737_ALC1
#define WM8737_ALC2
#define WM8737_ALC3
#define WM8737_RESET

#define WM8737_REGISTER_COUNT
#define WM8737_MAX_REGISTER

/*
 * Field Definitions.
 */

/*
 * R0 (0x00) - Left PGA volume
 */
#define WM8737_LVU
#define WM8737_LVU_MASK
#define WM8737_LVU_SHIFT
#define WM8737_LVU_WIDTH
#define WM8737_LINVOL_MASK
#define WM8737_LINVOL_SHIFT
#define WM8737_LINVOL_WIDTH

/*
 * R1 (0x01) - Right PGA volume
 */
#define WM8737_RVU
#define WM8737_RVU_MASK
#define WM8737_RVU_SHIFT
#define WM8737_RVU_WIDTH
#define WM8737_RINVOL_MASK
#define WM8737_RINVOL_SHIFT
#define WM8737_RINVOL_WIDTH

/*
 * R2 (0x02) - AUDIO path L
 */
#define WM8737_LINSEL_MASK
#define WM8737_LINSEL_SHIFT
#define WM8737_LINSEL_WIDTH
#define WM8737_LMICBOOST_MASK
#define WM8737_LMICBOOST_SHIFT
#define WM8737_LMICBOOST_WIDTH
#define WM8737_LMBE
#define WM8737_LMBE_MASK
#define WM8737_LMBE_SHIFT
#define WM8737_LMBE_WIDTH
#define WM8737_LMZC
#define WM8737_LMZC_MASK
#define WM8737_LMZC_SHIFT
#define WM8737_LMZC_WIDTH
#define WM8737_LPZC
#define WM8737_LPZC_MASK
#define WM8737_LPZC_SHIFT
#define WM8737_LPZC_WIDTH
#define WM8737_LZCTO_MASK
#define WM8737_LZCTO_SHIFT
#define WM8737_LZCTO_WIDTH

/*
 * R3 (0x03) - AUDIO path R
 */
#define WM8737_RINSEL_MASK
#define WM8737_RINSEL_SHIFT
#define WM8737_RINSEL_WIDTH
#define WM8737_RMICBOOST_MASK
#define WM8737_RMICBOOST_SHIFT
#define WM8737_RMICBOOST_WIDTH
#define WM8737_RMBE
#define WM8737_RMBE_MASK
#define WM8737_RMBE_SHIFT
#define WM8737_RMBE_WIDTH
#define WM8737_RMZC
#define WM8737_RMZC_MASK
#define WM8737_RMZC_SHIFT
#define WM8737_RMZC_WIDTH
#define WM8737_RPZC
#define WM8737_RPZC_MASK
#define WM8737_RPZC_SHIFT
#define WM8737_RPZC_WIDTH
#define WM8737_RZCTO_MASK
#define WM8737_RZCTO_SHIFT
#define WM8737_RZCTO_WIDTH

/*
 * R4 (0x04) - 3D Enhance
 */
#define WM8737_DIV2
#define WM8737_DIV2_MASK
#define WM8737_DIV2_SHIFT
#define WM8737_DIV2_WIDTH
#define WM8737_3DLC
#define WM8737_3DLC_MASK
#define WM8737_3DLC_SHIFT
#define WM8737_3DLC_WIDTH
#define WM8737_3DUC
#define WM8737_3DUC_MASK
#define WM8737_3DUC_SHIFT
#define WM8737_3DUC_WIDTH
#define WM8737_3DDEPTH_MASK
#define WM8737_3DDEPTH_SHIFT
#define WM8737_3DDEPTH_WIDTH
#define WM8737_3DE
#define WM8737_3DE_MASK
#define WM8737_3DE_SHIFT
#define WM8737_3DE_WIDTH

/*
 * R5 (0x05) - ADC Control
 */
#define WM8737_MONOMIX_MASK
#define WM8737_MONOMIX_SHIFT
#define WM8737_MONOMIX_WIDTH
#define WM8737_POLARITY_MASK
#define WM8737_POLARITY_SHIFT
#define WM8737_POLARITY_WIDTH
#define WM8737_HPOR
#define WM8737_HPOR_MASK
#define WM8737_HPOR_SHIFT
#define WM8737_HPOR_WIDTH
#define WM8737_LP
#define WM8737_LP_MASK
#define WM8737_LP_SHIFT
#define WM8737_LP_WIDTH
#define WM8737_MONOUT
#define WM8737_MONOUT_MASK
#define WM8737_MONOUT_SHIFT
#define WM8737_MONOUT_WIDTH
#define WM8737_ADCHPD
#define WM8737_ADCHPD_MASK
#define WM8737_ADCHPD_SHIFT
#define WM8737_ADCHPD_WIDTH

/*
 * R6 (0x06) - Power Management
 */
#define WM8737_VMID
#define WM8737_VMID_MASK
#define WM8737_VMID_SHIFT
#define WM8737_VMID_WIDTH
#define WM8737_VREF
#define WM8737_VREF_MASK
#define WM8737_VREF_SHIFT
#define WM8737_VREF_WIDTH
#define WM8737_AI
#define WM8737_AI_MASK
#define WM8737_AI_SHIFT
#define WM8737_AI_WIDTH
#define WM8737_PGL
#define WM8737_PGL_MASK
#define WM8737_PGL_SHIFT
#define WM8737_PGL_WIDTH
#define WM8737_PGR
#define WM8737_PGR_MASK
#define WM8737_PGR_SHIFT
#define WM8737_PGR_WIDTH
#define WM8737_ADL
#define WM8737_ADL_MASK
#define WM8737_ADL_SHIFT
#define WM8737_ADL_WIDTH
#define WM8737_ADR
#define WM8737_ADR_MASK
#define WM8737_ADR_SHIFT
#define WM8737_ADR_WIDTH
#define WM8737_MICBIAS_MASK
#define WM8737_MICBIAS_SHIFT
#define WM8737_MICBIAS_WIDTH

/*
 * R7 (0x07) - Audio Format
 */
#define WM8737_SDODIS
#define WM8737_SDODIS_MASK
#define WM8737_SDODIS_SHIFT
#define WM8737_SDODIS_WIDTH
#define WM8737_MS
#define WM8737_MS_MASK
#define WM8737_MS_SHIFT
#define WM8737_MS_WIDTH
#define WM8737_LRP
#define WM8737_LRP_MASK
#define WM8737_LRP_SHIFT
#define WM8737_LRP_WIDTH
#define WM8737_WL_MASK
#define WM8737_WL_SHIFT
#define WM8737_WL_WIDTH
#define WM8737_FORMAT_MASK
#define WM8737_FORMAT_SHIFT
#define WM8737_FORMAT_WIDTH

/*
 * R8 (0x08) - Clocking
 */
#define WM8737_AUTODETECT
#define WM8737_AUTODETECT_MASK
#define WM8737_AUTODETECT_SHIFT
#define WM8737_AUTODETECT_WIDTH
#define WM8737_CLKDIV2
#define WM8737_CLKDIV2_MASK
#define WM8737_CLKDIV2_SHIFT
#define WM8737_CLKDIV2_WIDTH
#define WM8737_SR_MASK
#define WM8737_SR_SHIFT
#define WM8737_SR_WIDTH
#define WM8737_USB_MODE
#define WM8737_USB_MODE_MASK
#define WM8737_USB_MODE_SHIFT
#define WM8737_USB_MODE_WIDTH

/*
 * R9 (0x09) - MIC Preamp Control
 */
#define WM8737_RBYPEN
#define WM8737_RBYPEN_MASK
#define WM8737_RBYPEN_SHIFT
#define WM8737_RBYPEN_WIDTH
#define WM8737_LBYPEN
#define WM8737_LBYPEN_MASK
#define WM8737_LBYPEN_SHIFT
#define WM8737_LBYPEN_WIDTH
#define WM8737_MBCTRL_MASK
#define WM8737_MBCTRL_SHIFT
#define WM8737_MBCTRL_WIDTH

/*
 * R10 (0x0A) - Misc Bias Control
 */
#define WM8737_VMIDSEL_MASK
#define WM8737_VMIDSEL_SHIFT
#define WM8737_VMIDSEL_WIDTH
#define WM8737_LINPUT1_DC_BIAS_ENABLE
#define WM8737_LINPUT1_DC_BIAS_ENABLE_MASK
#define WM8737_LINPUT1_DC_BIAS_ENABLE_SHIFT
#define WM8737_LINPUT1_DC_BIAS_ENABLE_WIDTH
#define WM8737_RINPUT1_DC_BIAS_ENABLE
#define WM8737_RINPUT1_DC_BIAS_ENABLE_MASK
#define WM8737_RINPUT1_DC_BIAS_ENABLE_SHIFT
#define WM8737_RINPUT1_DC_BIAS_ENABLE_WIDTH

/*
 * R11 (0x0B) - Noise Gate
 */
#define WM8737_NGTH_MASK
#define WM8737_NGTH_SHIFT
#define WM8737_NGTH_WIDTH
#define WM8737_NGAT
#define WM8737_NGAT_MASK
#define WM8737_NGAT_SHIFT
#define WM8737_NGAT_WIDTH

/*
 * R12 (0x0C) - ALC1
 */
#define WM8737_ALCSEL_MASK
#define WM8737_ALCSEL_SHIFT
#define WM8737_ALCSEL_WIDTH
#define WM8737_MAX_GAIN_MASK
#define WM8737_MAX_GAIN_SHIFT
#define WM8737_MAX_GAIN_WIDTH
#define WM8737_ALCL_MASK
#define WM8737_ALCL_SHIFT
#define WM8737_ALCL_WIDTH

/*
 * R13 (0x0D) - ALC2
 */
#define WM8737_ALCZCE
#define WM8737_ALCZCE_MASK
#define WM8737_ALCZCE_SHIFT
#define WM8737_ALCZCE_WIDTH
#define WM8737_HLD_MASK
#define WM8737_HLD_SHIFT
#define WM8737_HLD_WIDTH

/*
 * R14 (0x0E) - ALC3
 */
#define WM8737_DCY_MASK
#define WM8737_DCY_SHIFT
#define WM8737_DCY_WIDTH
#define WM8737_ATK_MASK
#define WM8737_ATK_SHIFT
#define WM8737_ATK_WIDTH

/*
 * R15 (0x0F) - Reset
 */
#define WM8737_RESET_MASK
#define WM8737_RESET_SHIFT
#define WM8737_RESET_WIDTH

#endif