linux/sound/soc/codecs/tas2770.h

/* SPDX-License-Identifier: GPL-2.0
 *
 * ALSA SoC TAS2770 codec driver
 *
 *  Copyright (C) 2016-2017 Texas Instruments Incorporated - https://www.ti.com/
 */
#ifndef __TAS2770__
#define __TAS2770__

/* Book Control Register (available in page0 of each book) */
#define TAS2770_BOOKCTL_PAGE
#define TAS2770_BOOKCTL_REG
#define TAS2770_REG(page, reg)
    /* Page */
#define TAS2770_PAGE
#define TAS2770_PAGE_PAGE_MASK
    /* Software Reset */
#define TAS2770_SW_RST
#define TAS2770_RST
    /* Power Control */
#define TAS2770_PWR_CTRL
#define TAS2770_PWR_CTRL_MASK
#define TAS2770_PWR_CTRL_ACTIVE
#define TAS2770_PWR_CTRL_MUTE
#define TAS2770_PWR_CTRL_SHUTDOWN
    /* Playback Configuration Reg0 */
#define TAS2770_PLAY_CFG_REG0
    /* Playback Configuration Reg1 */
#define TAS2770_PLAY_CFG_REG1
    /* Playback Configuration Reg2 */
#define TAS2770_PLAY_CFG_REG2
#define TAS2770_PLAY_CFG_REG2_VMAX
    /* Misc Configuration Reg0 */
#define TAS2770_MSC_CFG_REG0
    /* TDM Configuration Reg0 */
#define TAS2770_TDM_CFG_REG0
#define TAS2770_TDM_CFG_REG0_SMP_MASK
#define TAS2770_TDM_CFG_REG0_SMP_48KHZ
#define TAS2770_TDM_CFG_REG0_SMP_44_1KHZ
#define TAS2770_TDM_CFG_REG0_31_MASK
#define TAS2770_TDM_CFG_REG0_31_44_1_48KHZ
#define TAS2770_TDM_CFG_REG0_31_88_2_96KHZ
#define TAS2770_TDM_CFG_REG0_31_176_4_192KHZ
#define TAS2770_TDM_CFG_REG0_FPOL_MASK
#define TAS2770_TDM_CFG_REG0_FPOL_RSING
#define TAS2770_TDM_CFG_REG0_FPOL_FALING
    /* TDM Configuration Reg1 */
#define TAS2770_TDM_CFG_REG1
#define TAS2770_TDM_CFG_REG1_MASK
#define TAS2770_TDM_CFG_REG1_51_SHIFT
#define TAS2770_TDM_CFG_REG1_RX_MASK
#define TAS2770_TDM_CFG_REG1_RX_RSING
#define TAS2770_TDM_CFG_REG1_RX_FALING
    /* TDM Configuration Reg2 */
#define TAS2770_TDM_CFG_REG2
#define TAS2770_TDM_CFG_REG2_RXW_MASK
#define TAS2770_TDM_CFG_REG2_RXW_16BITS
#define TAS2770_TDM_CFG_REG2_RXW_24BITS
#define TAS2770_TDM_CFG_REG2_RXW_32BITS
#define TAS2770_TDM_CFG_REG2_RXS_MASK
#define TAS2770_TDM_CFG_REG2_RXS_16BITS
#define TAS2770_TDM_CFG_REG2_RXS_24BITS
#define TAS2770_TDM_CFG_REG2_RXS_32BITS
    /* TDM Configuration Reg3 */
#define TAS2770_TDM_CFG_REG3
#define TAS2770_TDM_CFG_REG3_RXS_MASK
#define TAS2770_TDM_CFG_REG3_RXS_SHIFT
#define TAS2770_TDM_CFG_REG3_30_MASK
#define TAS2770_TDM_CFG_REG3_30_SHIFT
    /* TDM Configuration Reg5 */
#define TAS2770_TDM_CFG_REG5
#define TAS2770_TDM_CFG_REG5_VSNS_MASK
#define TAS2770_TDM_CFG_REG5_VSNS_ENABLE
#define TAS2770_TDM_CFG_REG5_50_MASK
    /* TDM Configuration Reg6 */
#define TAS2770_TDM_CFG_REG6
#define TAS2770_TDM_CFG_REG6_ISNS_MASK
#define TAS2770_TDM_CFG_REG6_ISNS_ENABLE
#define TAS2770_TDM_CFG_REG6_50_MASK
    /* Brown Out Prevention Reg0 */
#define TAS2770_BO_PRV_REG0
    /* Interrupt MASK Reg0 */
#define TAS2770_INT_MASK_REG0
#define TAS2770_INT_REG0_DEFAULT
#define TAS2770_INT_MASK_REG0_DISABLE
    /* Interrupt MASK Reg1 */
#define TAS2770_INT_MASK_REG1
#define TAS2770_INT_REG1_DEFAULT
#define TAS2770_INT_MASK_REG1_DISABLE
    /* Live-Interrupt Reg0 */
#define TAS2770_LVE_INT_REG0
    /* Live-Interrupt Reg1 */
#define TAS2770_LVE_INT_REG1
    /* Latched-Interrupt Reg0 */
#define TAS2770_LAT_INT_REG0
#define TAS2770_LAT_INT_REG0_OCE_FLG
#define TAS2770_LAT_INT_REG0_OTE_FLG
    /* Latched-Interrupt Reg1 */
#define TAS2770_LAT_INT_REG1
#define TAS2770_LAT_INT_REG1_VBA_TOV
#define TAS2770_LAT_INT_REG1_VBA_TUV
#define TAS2770_LAT_INT_REG1_BOUT_FLG
    /* VBAT MSB */
#define TAS2770_VBAT_MSB
    /* VBAT LSB */
#define TAS2770_VBAT_LSB
    /* TEMP MSB */
#define TAS2770_TEMP_MSB
    /* TEMP LSB */
#define TAS2770_TEMP_LSB
    /* Interrupt Configuration */
#define TAS2770_INT_CFG
    /* Misc IRQ */
#define TAS2770_MISC_IRQ
    /* Clock Configuration */
#define TAS2770_CLK_CGF
    /* TDM Clock detection monitor */
#define TAS2770_TDM_CLK_DETC
    /* Revision and PG ID */
#define TAS2770_REV_AND_GPID

#define TAS2770_POWER_ACTIVE
#define TAS2770_POWER_MUTE
#define TAS2770_POWER_SHUTDOWN

#define ERROR_OVER_CURRENT
#define ERROR_DIE_OVERTEMP
#define ERROR_OVER_VOLTAGE
#define ERROR_UNDER_VOLTAGE
#define ERROR_BROWNOUT
#define ERROR_CLASSD_PWR

struct tas2770_priv {};

#endif /* __TAS2770__ */