summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/sdm660_cdc/msm-cdc-common.h
blob: 5d5cee124bca0375c2780290b2ea264a03d1c32c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <linux/regmap.h>
#include "sdm660-cdc-registers.h"

extern struct reg_default
		msm89xx_cdc_core_defaults[MSM89XX_CDC_CORE_CACHE_SIZE];
extern struct reg_default
		msm89xx_pmic_cdc_defaults[MSM89XX_PMIC_CDC_CACHE_SIZE];

bool msm89xx_cdc_core_readable_reg(struct device *dev, unsigned int reg);
bool msm89xx_cdc_core_writeable_reg(struct device *dev, unsigned int reg);
bool msm89xx_cdc_core_volatile_reg(struct device *dev, unsigned int reg);

enum {
	AIF1_PB = 0,
	AIF1_CAP,
	AIF2_VIFEED,
	AIF3_SVA,
	NUM_CODEC_DAIS,
};

enum codec_versions {
	TOMBAK_1_0,
	TOMBAK_2_0,
	CONGA,
	CAJON,
	CAJON_2_0,
	DIANGU,
	DRAX_CDC,
	UNSUPPORTED,
};

/* Support different hph modes */
enum {
	NORMAL_MODE = 0,
	HD2_MODE,
};

enum dig_cdc_notify_event {
	DIG_CDC_EVENT_INVALID,
	DIG_CDC_EVENT_CLK_ON,
	DIG_CDC_EVENT_CLK_OFF,
	DIG_CDC_EVENT_RX1_MUTE_ON,
	DIG_CDC_EVENT_RX1_MUTE_OFF,
	DIG_CDC_EVENT_RX2_MUTE_ON,
	DIG_CDC_EVENT_RX2_MUTE_OFF,
	DIG_CDC_EVENT_RX3_MUTE_ON,
	DIG_CDC_EVENT_RX3_MUTE_OFF,
	DIG_CDC_EVENT_PRE_RX1_INT_ON,
	DIG_CDC_EVENT_PRE_RX2_INT_ON,
	DIG_CDC_EVENT_POST_RX1_INT_OFF,
	DIG_CDC_EVENT_POST_RX2_INT_OFF,
	DIG_CDC_EVENT_SSR_DOWN,
	DIG_CDC_EVENT_SSR_UP,
	DIG_CDC_EVENT_LAST,
};