1*2874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 26d817c0eSAdam Thomson /* 36d817c0eSAdam Thomson * da7219-aad.h - DA7322 ASoC Codec AAD Driver Platform Data 46d817c0eSAdam Thomson * 56d817c0eSAdam Thomson * Copyright (c) 2015 Dialog Semiconductor Ltd. 66d817c0eSAdam Thomson * 76d817c0eSAdam Thomson * Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> 86d817c0eSAdam Thomson */ 96d817c0eSAdam Thomson 106d817c0eSAdam Thomson #ifndef __DA7219_AAD_PDATA_H 116d817c0eSAdam Thomson #define __DA7219_AAD_PDATA_H 126d817c0eSAdam Thomson 136d817c0eSAdam Thomson enum da7219_aad_micbias_pulse_lvl { 146d817c0eSAdam Thomson DA7219_AAD_MICBIAS_PULSE_LVL_OFF = 0, 156d817c0eSAdam Thomson DA7219_AAD_MICBIAS_PULSE_LVL_2_8V = 6, 166d817c0eSAdam Thomson DA7219_AAD_MICBIAS_PULSE_LVL_2_9V, 176d817c0eSAdam Thomson }; 186d817c0eSAdam Thomson 196d817c0eSAdam Thomson enum da7219_aad_btn_cfg { 206d817c0eSAdam Thomson DA7219_AAD_BTN_CFG_2MS = 1, 216d817c0eSAdam Thomson DA7219_AAD_BTN_CFG_5MS, 226d817c0eSAdam Thomson DA7219_AAD_BTN_CFG_10MS, 236d817c0eSAdam Thomson DA7219_AAD_BTN_CFG_50MS, 246d817c0eSAdam Thomson DA7219_AAD_BTN_CFG_100MS, 256d817c0eSAdam Thomson DA7219_AAD_BTN_CFG_200MS, 266d817c0eSAdam Thomson DA7219_AAD_BTN_CFG_500MS, 276d817c0eSAdam Thomson }; 286d817c0eSAdam Thomson 296d817c0eSAdam Thomson enum da7219_aad_mic_det_thr { 306d817c0eSAdam Thomson DA7219_AAD_MIC_DET_THR_200_OHMS = 0, 316d817c0eSAdam Thomson DA7219_AAD_MIC_DET_THR_500_OHMS, 326d817c0eSAdam Thomson DA7219_AAD_MIC_DET_THR_750_OHMS, 336d817c0eSAdam Thomson DA7219_AAD_MIC_DET_THR_1000_OHMS, 346d817c0eSAdam Thomson }; 356d817c0eSAdam Thomson 366d817c0eSAdam Thomson enum da7219_aad_jack_ins_deb { 376d817c0eSAdam Thomson DA7219_AAD_JACK_INS_DEB_5MS = 0, 386d817c0eSAdam Thomson DA7219_AAD_JACK_INS_DEB_10MS, 396d817c0eSAdam Thomson DA7219_AAD_JACK_INS_DEB_20MS, 406d817c0eSAdam Thomson DA7219_AAD_JACK_INS_DEB_50MS, 416d817c0eSAdam Thomson DA7219_AAD_JACK_INS_DEB_100MS, 426d817c0eSAdam Thomson DA7219_AAD_JACK_INS_DEB_200MS, 436d817c0eSAdam Thomson DA7219_AAD_JACK_INS_DEB_500MS, 446d817c0eSAdam Thomson DA7219_AAD_JACK_INS_DEB_1S, 456d817c0eSAdam Thomson }; 466d817c0eSAdam Thomson 476d817c0eSAdam Thomson enum da7219_aad_jack_det_rate { 486d817c0eSAdam Thomson DA7219_AAD_JACK_DET_RATE_32_64MS = 0, 496d817c0eSAdam Thomson DA7219_AAD_JACK_DET_RATE_64_128MS, 506d817c0eSAdam Thomson DA7219_AAD_JACK_DET_RATE_128_256MS, 516d817c0eSAdam Thomson DA7219_AAD_JACK_DET_RATE_256_512MS, 526d817c0eSAdam Thomson }; 536d817c0eSAdam Thomson 546d817c0eSAdam Thomson enum da7219_aad_jack_rem_deb { 556d817c0eSAdam Thomson DA7219_AAD_JACK_REM_DEB_1MS = 0, 566d817c0eSAdam Thomson DA7219_AAD_JACK_REM_DEB_5MS, 576d817c0eSAdam Thomson DA7219_AAD_JACK_REM_DEB_10MS, 586d817c0eSAdam Thomson DA7219_AAD_JACK_REM_DEB_20MS, 596d817c0eSAdam Thomson }; 606d817c0eSAdam Thomson 616d817c0eSAdam Thomson enum da7219_aad_btn_avg { 626d817c0eSAdam Thomson DA7219_AAD_BTN_AVG_1 = 0, 636d817c0eSAdam Thomson DA7219_AAD_BTN_AVG_2, 646d817c0eSAdam Thomson DA7219_AAD_BTN_AVG_4, 656d817c0eSAdam Thomson DA7219_AAD_BTN_AVG_8, 666d817c0eSAdam Thomson }; 676d817c0eSAdam Thomson 686d817c0eSAdam Thomson enum da7219_aad_adc_1bit_rpt { 696d817c0eSAdam Thomson DA7219_AAD_ADC_1BIT_RPT_1 = 0, 706d817c0eSAdam Thomson DA7219_AAD_ADC_1BIT_RPT_2, 716d817c0eSAdam Thomson DA7219_AAD_ADC_1BIT_RPT_4, 726d817c0eSAdam Thomson DA7219_AAD_ADC_1BIT_RPT_8, 736d817c0eSAdam Thomson }; 746d817c0eSAdam Thomson 756d817c0eSAdam Thomson struct da7219_aad_pdata { 766d817c0eSAdam Thomson int irq; 776d817c0eSAdam Thomson 786d817c0eSAdam Thomson enum da7219_aad_micbias_pulse_lvl micbias_pulse_lvl; 796d817c0eSAdam Thomson u32 micbias_pulse_time; 806d817c0eSAdam Thomson enum da7219_aad_btn_cfg btn_cfg; 816d817c0eSAdam Thomson enum da7219_aad_mic_det_thr mic_det_thr; 826d817c0eSAdam Thomson enum da7219_aad_jack_ins_deb jack_ins_deb; 836d817c0eSAdam Thomson enum da7219_aad_jack_det_rate jack_det_rate; 846d817c0eSAdam Thomson enum da7219_aad_jack_rem_deb jack_rem_deb; 856d817c0eSAdam Thomson 866d817c0eSAdam Thomson u8 a_d_btn_thr; 876d817c0eSAdam Thomson u8 d_b_btn_thr; 886d817c0eSAdam Thomson u8 b_c_btn_thr; 896d817c0eSAdam Thomson u8 c_mic_btn_thr; 906d817c0eSAdam Thomson 916d817c0eSAdam Thomson enum da7219_aad_btn_avg btn_avg; 926d817c0eSAdam Thomson enum da7219_aad_adc_1bit_rpt adc_1bit_rpt; 936d817c0eSAdam Thomson }; 946d817c0eSAdam Thomson 956d817c0eSAdam Thomson #endif /* __DA7219_AAD_PDATA_H */ 96