// SPDX-License-Identifier: GPL-2.0-only
/*
* isabelle.c - Low power high fidelity audio codec driver
*
* Copyright (c) 2012 Texas Instruments, Inc
*
* Initially based on sound/soc/codecs/twl6040.c
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/regmap.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/tlv.h>
#include <sound/jack.h>
#include <sound/initval.h>
#include <asm/div64.h>
#include "isabelle.h"
/* Register default values for ISABELLE driver. */
static const struct reg_default isabelle_reg_defs[] = {
{ 0, 0x00 },
{ 1, 0x00 },
{ 2, 0x00 },
{ 3, 0x00 },
{ 4, 0x00 },
{ 5, 0x00 },
{ 6, 0x00 },
{ 7, 0x00 },
{ 8, 0x00 },
{ 9, 0x00 },
{ 10, 0x00 },
{ 11, 0x00 },
{ 12, 0x00 },
{ 13, 0x00 },
{ 14, 0x00 },
{ 15, 0x00 },
{ 16, 0x00 },
{ 17, 0x00 },
{ 18, 0x00 },
{ 19, 0x00 },
{ 20, 0x00 },
{ 21, 0x02 },
{ 22, 0x02 },
{ 23, 0x02 },
{ 24, 0x02 },
{ 25, 0x0F },
{ 26, 0x8F },
{ 27, 0x0F },
{ 28, 0x8F },
{ 29, 0x00 },
{ 30, 0x00 },
{ 31, 0x00 },
{ 32, 0x00 },
{ 33, 0x00 },
{ 34, 0x00 },
{ 35, 0x00 },
{ 36, 0x00 },
{ 37, 0x00 },
{ 38, 0x00 },
{ 39, 0x00 },
{ 40, 0x00 },
{ 41, 0x00 },
{ 42, 0x00 },
{ 43, 0x00 },
{ 44, 0x00 },
{ 45, 0x00 },
{ 46, 0x00 },
{ 47, 0x00 },
{ 48, 0x00 },
{ 49, 0x00 },
{ 50, 0x00 },
{ 51, 0x00 },
{ 52, 0x00 },
{ 53, 0x00 },
{ 54, 0x00 },
{ 55, 0x00 },
{ 56, 0x00 },
{ 57, 0x00 },
{ 58, 0x00 },
{ 59, 0x00 },
{ 60, 0x00 },
{ 61, 0x00 },
{ 62, 0x00 },
{ 63, 0x00 },
{ 64, 0x00 },
{ 65, 0x00 },
{ 66, 0x00 },
{ 67, 0x00 },
{ 68, 0x00 },
{ 69, 0x90 },
{ 70, 0x90 },
{ 71, 0x90 },
{ 72, 0x00 },
{ 73, 0x00 },
{ 74, 0x00 },
{ 75, 0x00 },
{ 76, 0x00 },
{ 77, 0x00 },
{ 78, 0x00 },
{ 79, 0x00 },
{ 80, 0x00 },
{ 81, 0x00 },
{ 82, 0x00 },
{ 83, 0x00 },
{ 84, 0x00 },
{ 85, 0x07 },
{ 86, 0x00 },
{ 87, 0x00 },
{ 88, 0x00 },
{ 89, 0x07 },
{ 90, 0x80 },
{ 91, 0x07 },
{ 92, 0x07 },
{ 93, 0x00 },
{ 94, 0x00 },
{ 95, 0x00 },
{ 96, 0x00 },
{ 97, 0x00 },
{ 98, 0x00 },
{ 99, 0x00 },
};
static const char *isabelle_rx1_texts[] = {"VRX1", "ARX1"};
static const char *isabelle_rx2_texts[] = {"VRX2", "ARX2"};
static const struct soc_enum isabelle_rx1_enum[] = {
SOC_ENUM_SINGLE(ISABELLE_VOICE_HPF_CFG_REG,