2 * da7218.h - DA7218 ASoC Codec Driver Platform Data
4 * Copyright (c) 2015 Dialog Semiconductor
6 * Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
14 #ifndef _DA7218_PDATA_H
15 #define _DA7218_PDATA_H
18 enum da7218_micbias_voltage
{
19 DA7218_MICBIAS_1_2V
= -1,
30 enum da7218_mic_amp_in_sel
{
31 DA7218_MIC_AMP_IN_SEL_DIFF
= 0,
32 DA7218_MIC_AMP_IN_SEL_SE_P
,
33 DA7218_MIC_AMP_IN_SEL_SE_N
,
37 enum da7218_dmic_data_sel
{
38 DA7218_DMIC_DATA_LRISE_RFALL
= 0,
39 DA7218_DMIC_DATA_LFALL_RRISE
,
42 enum da7218_dmic_samplephase
{
43 DA7218_DMIC_SAMPLE_ON_CLKEDGE
= 0,
44 DA7218_DMIC_SAMPLE_BETWEEN_CLKEDGE
,
47 enum da7218_dmic_clk_rate
{
48 DA7218_DMIC_CLK_3_0MHZ
= 0,
49 DA7218_DMIC_CLK_1_5MHZ
,
52 /* Headphone Detect */
53 enum da7218_hpldet_jack_rate
{
54 DA7218_HPLDET_JACK_RATE_5US
= 0,
55 DA7218_HPLDET_JACK_RATE_10US
,
56 DA7218_HPLDET_JACK_RATE_20US
,
57 DA7218_HPLDET_JACK_RATE_40US
,
58 DA7218_HPLDET_JACK_RATE_80US
,
59 DA7218_HPLDET_JACK_RATE_160US
,
60 DA7218_HPLDET_JACK_RATE_320US
,
61 DA7218_HPLDET_JACK_RATE_640US
,
64 enum da7218_hpldet_jack_debounce
{
65 DA7218_HPLDET_JACK_DEBOUNCE_OFF
= 0,
66 DA7218_HPLDET_JACK_DEBOUNCE_2
,
67 DA7218_HPLDET_JACK_DEBOUNCE_3
,
68 DA7218_HPLDET_JACK_DEBOUNCE_4
,
71 enum da7218_hpldet_jack_thr
{
72 DA7218_HPLDET_JACK_THR_84PCT
= 0,
73 DA7218_HPLDET_JACK_THR_88PCT
,
74 DA7218_HPLDET_JACK_THR_92PCT
,
75 DA7218_HPLDET_JACK_THR_96PCT
,
78 struct da7218_hpldet_pdata
{
79 enum da7218_hpldet_jack_rate jack_rate
;
80 enum da7218_hpldet_jack_debounce jack_debounce
;
81 enum da7218_hpldet_jack_thr jack_thr
;
89 enum da7218_micbias_voltage micbias1_lvl
;
90 enum da7218_micbias_voltage micbias2_lvl
;
91 enum da7218_mic_amp_in_sel mic1_amp_in_sel
;
92 enum da7218_mic_amp_in_sel mic2_amp_in_sel
;
95 enum da7218_dmic_data_sel dmic1_data_sel
;
96 enum da7218_dmic_data_sel dmic2_data_sel
;
97 enum da7218_dmic_samplephase dmic1_samplephase
;
98 enum da7218_dmic_samplephase dmic2_samplephase
;
99 enum da7218_dmic_clk_rate dmic1_clk_rate
;
100 enum da7218_dmic_clk_rate dmic2_clk_rate
;
102 /* HP Diff Supply - DA7217 only */
103 bool hp_diff_single_supply
;
105 /* HP Detect - DA7218 only */
106 struct da7218_hpldet_pdata
*hpldet_pdata
;
109 #endif /* _DA7218_PDATA_H */