// SPDX-License-Identifier: GPL-2.0
//
// rt1015.c -- RT1015 ALSA SoC audio amplifier driver
//
// Copyright 2019 Realtek Semiconductor Corp.
//
// Author: Jack Yu <jack.yu@realtek.com>
//
//
#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/fs.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc-dapm.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include "rl6231.h"
#include "rt1015.h"
static const struct reg_default rt1015_reg[] = {
{ 0x0000, 0x0000 },
{ 0x0004, 0xa000 },
{ 0x0006, 0x0003 },
{ 0x000a, 0x081e },
{ 0x000c, 0x0006 },
{ 0x000e, 0x0000 },
{ 0x0010, 0x0000 },
{ 0x0012, 0x0000 },
{ 0x0014, 0x0000 },
{ 0x0016, 0x0000 },
{ 0x0018, 0x0000 },
{ 0x0020, 0x8000 },
{ 0x0022, 0x8043 },
{ 0x0076, 0x0000 },
{ 0x0078, 0x0000 },
{ 0x007a, 0x0002 },
{ 0x007c, 0x10ec },
{ 0x007d, 0x1015 },
{ 0x00f0, 0x5000 },
{ 0x00f2, 0x004c },
{ 0x00f3, 0xecfe },
{ 0x00f4, 0x0000 },
{ 0x00f6, 0x0400 },
{ 0x0100, 0x0028 },
{ 0x0102, 0xff02 },
{ 0x0104, 0xa213 },
{ 0x0106, 0x200c },
{ 0x010c, 0x0000 },
{ 0x010e, 0x0058 },
{ 0x0111, 0x0200 },
{ 0x0112, 0x0400 },
{ 0x0114, 0x0022 },
{ 0x0116, 0x0000 },
{ 0x0118, 0x0000 },
{ 0x011a, 0x0123 },
{ 0x011c, 0x4567 },
{ 0x0300, 0x203d },
{ 0x0302, 0x001e },
{ 0x0311, 0x0000 },
{ 0x0313, 0x6014 },
{ 0x0314, 0x00a2 },
{ 0x031a, 0x00a0 },
{ 0x031c, 0x001f },
{ 0x031d, 0xffff },
{ 0x031e, 0x0000 },
{ 0x031f, 0x0000 },
{ 0x0320, 0x0000 },
{ 0x0321, 0x0000 },
{ 0x0322, 0xd7df },
{ 0x0328, 0x10b2 },
{ 0x0329, 0x0175 },
{ 0x032a, 0x36ad },
{ 0x032b, 0x7e55 },
{ 0x032c, 0x0520 },
{ 0x032d, 0xaa00 },
{ 0x032e, 0x570e },
{ 0x0330, 0xe180 },
{ 0x0332, 0x0034 },
{ 0x0334, 0x0001 },
{ 0x0336, 0x0010 },
{ 0x0338, 0x0000 },
{ 0x04fa, 0x0030 },
{ 0x04fc, 0x35c8 },
{ 0x04fe, 0x0800 },
{ 0x0500, 0x0400 },
{ 0x0502, 0x1000 },
{ 0x0504