162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* Copyright (c) 2022 Analog Devices Inc. */ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef _MAX98363_H 562306a36Sopenharmony_ci#define _MAX98363_H 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#define MAX98363_R2000_SW_RESET 0x2000 862306a36Sopenharmony_ci#define MAX98363_R2001_INTR_RAW 0x2001 962306a36Sopenharmony_ci#define MAX98363_R2003_INTR_STATE 0x2003 1062306a36Sopenharmony_ci#define MAX98363_R2005_INTR_FALG 0x2005 1162306a36Sopenharmony_ci#define MAX98363_R2007_INTR_EN 0x2007 1262306a36Sopenharmony_ci#define MAX98363_R2009_INTR_CLR 0x2009 1362306a36Sopenharmony_ci#define MAX98363_R2021_ERR_MON_CTRL 0x2021 1462306a36Sopenharmony_ci#define MAX98363_R2022_SPK_MON_THRESH 0x2022 1562306a36Sopenharmony_ci#define MAX98363_R2023_SPK_MON_DURATION 0x2023 1662306a36Sopenharmony_ci#define MAX98363_R2030_TONE_GEN_CFG 0x2030 1762306a36Sopenharmony_ci#define MAX98363_R203F_TONE_GEN_EN 0x203F 1862306a36Sopenharmony_ci#define MAX98363_R2040_AMP_VOL 0x2040 1962306a36Sopenharmony_ci#define MAX98363_R2041_AMP_GAIN 0x2041 2062306a36Sopenharmony_ci#define MAX98363_R2042_DSP_CFG 0x2042 2162306a36Sopenharmony_ci#define MAX98363_R21FF_REV_ID 0x21FF 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci/* MAX98363_R2021_ERR_MON_CTRL */ 2462306a36Sopenharmony_ci#define MAX98363_SPKMON_SHIFT (3) 2562306a36Sopenharmony_ci#define MAX98363_CLOCK_MON_SHIFT (0) 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci/* MAX98363_R2042_DSP_CFG */ 2862306a36Sopenharmony_ci#define MAX98363_AMP_DSP_CFG_RMP_SHIFT (3) 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_cistruct max98363_priv { 3162306a36Sopenharmony_ci struct regmap *regmap; 3262306a36Sopenharmony_ci struct sdw_slave *slave; 3362306a36Sopenharmony_ci bool hw_init; 3462306a36Sopenharmony_ci bool first_hw_init; 3562306a36Sopenharmony_ci}; 3662306a36Sopenharmony_ci#endif 37