Lines Matching refs:aad_pdata
628 struct da7219_aad_pdata *aad_pdata; in da7219_aad_fw_to_pdata() local
636 aad_pdata = devm_kzalloc(dev, sizeof(*aad_pdata), GFP_KERNEL); in da7219_aad_fw_to_pdata()
637 if (!aad_pdata) in da7219_aad_fw_to_pdata()
640 aad_pdata->irq = i2c->irq; in da7219_aad_fw_to_pdata()
644 aad_pdata->micbias_pulse_lvl = in da7219_aad_fw_to_pdata()
647 aad_pdata->micbias_pulse_lvl = DA7219_AAD_MICBIAS_PULSE_LVL_OFF; in da7219_aad_fw_to_pdata()
651 aad_pdata->micbias_pulse_time = fw_val32; in da7219_aad_fw_to_pdata()
654 aad_pdata->btn_cfg = da7219_aad_fw_btn_cfg(dev, fw_val32); in da7219_aad_fw_to_pdata()
656 aad_pdata->btn_cfg = DA7219_AAD_BTN_CFG_10MS; in da7219_aad_fw_to_pdata()
659 aad_pdata->mic_det_thr = in da7219_aad_fw_to_pdata()
662 aad_pdata->mic_det_thr = DA7219_AAD_MIC_DET_THR_500_OHMS; in da7219_aad_fw_to_pdata()
665 aad_pdata->jack_ins_deb = in da7219_aad_fw_to_pdata()
668 aad_pdata->jack_ins_deb = DA7219_AAD_JACK_INS_DEB_20MS; in da7219_aad_fw_to_pdata()
671 aad_pdata->jack_det_rate = in da7219_aad_fw_to_pdata()
674 aad_pdata->jack_det_rate = DA7219_AAD_JACK_DET_RATE_256_512MS; in da7219_aad_fw_to_pdata()
677 aad_pdata->jack_rem_deb = in da7219_aad_fw_to_pdata()
680 aad_pdata->jack_rem_deb = DA7219_AAD_JACK_REM_DEB_1MS; in da7219_aad_fw_to_pdata()
683 aad_pdata->a_d_btn_thr = (u8) fw_val32; in da7219_aad_fw_to_pdata()
685 aad_pdata->a_d_btn_thr = 0xA; in da7219_aad_fw_to_pdata()
688 aad_pdata->d_b_btn_thr = (u8) fw_val32; in da7219_aad_fw_to_pdata()
690 aad_pdata->d_b_btn_thr = 0x16; in da7219_aad_fw_to_pdata()
693 aad_pdata->b_c_btn_thr = (u8) fw_val32; in da7219_aad_fw_to_pdata()
695 aad_pdata->b_c_btn_thr = 0x21; in da7219_aad_fw_to_pdata()
698 aad_pdata->c_mic_btn_thr = (u8) fw_val32; in da7219_aad_fw_to_pdata()
700 aad_pdata->c_mic_btn_thr = 0x3E; in da7219_aad_fw_to_pdata()
703 aad_pdata->btn_avg = da7219_aad_fw_btn_avg(dev, fw_val32); in da7219_aad_fw_to_pdata()
705 aad_pdata->btn_avg = DA7219_AAD_BTN_AVG_2; in da7219_aad_fw_to_pdata()
708 aad_pdata->adc_1bit_rpt = in da7219_aad_fw_to_pdata()
711 aad_pdata->adc_1bit_rpt = DA7219_AAD_ADC_1BIT_RPT_1; in da7219_aad_fw_to_pdata()
713 return aad_pdata; in da7219_aad_fw_to_pdata()
722 if ((pdata) && (pdata->aad_pdata)) { in da7219_aad_handle_pdata()
723 struct da7219_aad_pdata *aad_pdata = pdata->aad_pdata; in da7219_aad_handle_pdata() local
726 da7219_aad->irq = aad_pdata->irq; in da7219_aad_handle_pdata()
728 switch (aad_pdata->micbias_pulse_lvl) { in da7219_aad_handle_pdata()
732 (aad_pdata->micbias_pulse_lvl << in da7219_aad_handle_pdata()
739 da7219_aad->micbias_pulse_time = aad_pdata->micbias_pulse_time; in da7219_aad_handle_pdata()
741 switch (aad_pdata->btn_cfg) { in da7219_aad_handle_pdata()
749 da7219_aad->btn_cfg = (aad_pdata->btn_cfg << in da7219_aad_handle_pdata()
755 switch (aad_pdata->mic_det_thr) { in da7219_aad_handle_pdata()
760 cfg |= (aad_pdata->mic_det_thr << in da7219_aad_handle_pdata()
768 switch (aad_pdata->jack_ins_deb) { in da7219_aad_handle_pdata()
777 cfg |= (aad_pdata->jack_ins_deb << in da7219_aad_handle_pdata()
781 switch (aad_pdata->jack_det_rate) { in da7219_aad_handle_pdata()
786 cfg |= (aad_pdata->jack_det_rate << in da7219_aad_handle_pdata()
790 switch (aad_pdata->jack_rem_deb) { in da7219_aad_handle_pdata()
795 cfg |= (aad_pdata->jack_rem_deb << in da7219_aad_handle_pdata()
802 aad_pdata->a_d_btn_thr); in da7219_aad_handle_pdata()
804 aad_pdata->d_b_btn_thr); in da7219_aad_handle_pdata()
806 aad_pdata->b_c_btn_thr); in da7219_aad_handle_pdata()
808 aad_pdata->c_mic_btn_thr); in da7219_aad_handle_pdata()
812 switch (aad_pdata->btn_avg) { in da7219_aad_handle_pdata()
817 cfg |= (aad_pdata->btn_avg << in da7219_aad_handle_pdata()
821 switch (aad_pdata->adc_1bit_rpt) { in da7219_aad_handle_pdata()
826 cfg |= (aad_pdata->adc_1bit_rpt << in da7219_aad_handle_pdata()
970 if (da7219->pdata && !da7219->pdata->aad_pdata) in da7219_aad_probe()
971 da7219->pdata->aad_pdata = da7219_aad_fw_to_pdata(dev); in da7219_aad_probe()