xref: /openbmc/linux/include/sound/da7213.h (revision b830f94f)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * da7213.h - DA7213 ASoC Codec Driver Platform Data
4  *
5  * Copyright (c) 2013 Dialog Semiconductor
6  *
7  * Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
8  */
9 
10 #ifndef _DA7213_PDATA_H
11 #define _DA7213_PDATA_H
12 
13 enum da7213_micbias_voltage {
14 	DA7213_MICBIAS_1_6V = 0,
15 	DA7213_MICBIAS_2_2V = 1,
16 	DA7213_MICBIAS_2_5V = 2,
17 	DA7213_MICBIAS_3_0V = 3,
18 };
19 
20 enum da7213_dmic_data_sel {
21 	DA7213_DMIC_DATA_LRISE_RFALL = 0,
22 	DA7213_DMIC_DATA_LFALL_RRISE = 1,
23 };
24 
25 enum da7213_dmic_samplephase {
26 	DA7213_DMIC_SAMPLE_ON_CLKEDGE = 0,
27 	DA7213_DMIC_SAMPLE_BETWEEN_CLKEDGE = 1,
28 };
29 
30 enum da7213_dmic_clk_rate {
31 	DA7213_DMIC_CLK_3_0MHZ = 0,
32 	DA7213_DMIC_CLK_1_5MHZ = 1,
33 };
34 
35 struct da7213_platform_data {
36 	/* Mic Bias voltage */
37 	enum da7213_micbias_voltage micbias1_lvl;
38 	enum da7213_micbias_voltage micbias2_lvl;
39 
40 	/* DMIC config */
41 	enum da7213_dmic_data_sel dmic_data_sel;
42 	enum da7213_dmic_samplephase dmic_samplephase;
43 	enum da7213_dmic_clk_rate dmic_clk_rate;
44 };
45 
46 #endif /* _DA7213_PDATA_H */
47