Lines Matching refs:wcd_mbhc_write_field

82 static inline int wcd_mbhc_write_field(const struct wcd_mbhc *mbhc,  in wcd_mbhc_write_field()  function
107 wcd_mbhc_write_field(mbhc, WCD_MBHC_HS_VREF, reg_val); in wcd_program_hs_vref()
134 wcd_mbhc_write_field(mbhc, WCD_MBHC_MICB_CTRL, 0); in wcd_mbhc_curr_micbias_control()
135 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 3); in wcd_mbhc_curr_micbias_control()
140 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 0); in wcd_mbhc_curr_micbias_control()
141 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 1); in wcd_mbhc_curr_micbias_control()
143 wcd_mbhc_write_field(mbhc, WCD_MBHC_MICB_CTRL, 2); in wcd_mbhc_curr_micbias_control()
148 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 3); in wcd_mbhc_curr_micbias_control()
149 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 1); in wcd_mbhc_curr_micbias_control()
150 wcd_mbhc_write_field(mbhc, WCD_MBHC_MICB_CTRL, 1); in wcd_mbhc_curr_micbias_control()
155 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 0); in wcd_mbhc_curr_micbias_control()
156 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 1); in wcd_mbhc_curr_micbias_control()
157 wcd_mbhc_write_field(mbhc, WCD_MBHC_MICB_CTRL, 0); in wcd_mbhc_curr_micbias_control()
188 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 0); in wcd_mbhc_event_notify()
202 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 3); in wcd_mbhc_event_notify()
288 wcd_mbhc_write_field(mbhc, WCD_MBHC_MICB_CTRL, 0); in wcd_micbias_disable()
323 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 0); in wcd_mbhc_compute_impedance()
324 wcd_mbhc_write_field(mbhc, WCD_MBHC_MUX_CTL, MUX_CTL_AUTO); in wcd_mbhc_compute_impedance()
325 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 1); in wcd_mbhc_compute_impedance()
327 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, fsm_en); in wcd_mbhc_compute_impedance()
447 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 0); in wcd_mbhc_elec_hs_report_unplug()
448 wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_SCHMT_ISRC, 3); in wcd_mbhc_elec_hs_report_unplug()
451 wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_DETECTION_TYPE, 1); in wcd_mbhc_elec_hs_report_unplug()
504 wcd_mbhc_write_field(mbhc, WCD_MBHC_DETECTION_DONE, 0); in wcd_mbhc_adc_detect_plug_type()
529 wcd_mbhc_write_field(mbhc, WCD_MBHC_MECH_DETECTION_TYPE, !detection_type); in mbhc_plug_detect_fn()
544 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 0); in mbhc_plug_detect_fn()
545 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 0); in mbhc_plug_detect_fn()
561 wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_ISRC_EN, 0); in mbhc_plug_detect_fn()
574 wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_DETECTION_TYPE, 1); in mbhc_plug_detect_fn()
575 wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_SCHMT_ISRC, 0); in mbhc_plug_detect_fn()
603 wcd_mbhc_write_field(mbhc, WCD_MBHC_L_DET_EN, 0); in wcd_mbhc_typec_report_unplug()
604 wcd_mbhc_write_field(mbhc, WCD_MBHC_MECH_DETECTION_TYPE, 0); in wcd_mbhc_typec_report_unplug()
619 wcd_mbhc_write_field(mbhc, WCD_MBHC_L_DET_EN, 1); in wcd_mbhc_typec_report_plug()
741 wcd_mbhc_write_field(mbhc, WCD_MBHC_OCP_FSM_EN, 0); in wcd_mbhc_hph_ocp_irq()
742 wcd_mbhc_write_field(mbhc, WCD_MBHC_OCP_FSM_EN, 1); in wcd_mbhc_hph_ocp_irq()
788 wcd_mbhc_write_field(mbhc, WCD_MBHC_HS_L_DET_PULL_UP_CTRL, in wcd_mbhc_initialise()
791 wcd_mbhc_write_field(mbhc, WCD_MBHC_HPHL_PLUG_TYPE, mbhc->cfg->hphl_swh); in wcd_mbhc_initialise()
792 wcd_mbhc_write_field(mbhc, WCD_MBHC_GND_PLUG_TYPE, mbhc->cfg->gnd_swh); in wcd_mbhc_initialise()
793 wcd_mbhc_write_field(mbhc, WCD_MBHC_SW_HPH_LP_100K_TO_GND, 1); in wcd_mbhc_initialise()
796 wcd_mbhc_write_field(mbhc, WCD_MBHC_HS_L_DET_PULL_UP_COMP_CTRL, 1); in wcd_mbhc_initialise()
800 wcd_mbhc_write_field(mbhc, WCD_MBHC_L_DET_EN, 0); in wcd_mbhc_initialise()
802 wcd_mbhc_write_field(mbhc, WCD_MBHC_L_DET_EN, 1); in wcd_mbhc_initialise()
806 wcd_mbhc_write_field(mbhc, WCD_MBHC_INSREM_DBNC, 4); in wcd_mbhc_initialise()
809 wcd_mbhc_write_field(mbhc, WCD_MBHC_INSREM_DBNC, 6); in wcd_mbhc_initialise()
812 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_DBNC, 2); in wcd_mbhc_initialise()
869 wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_SCHMT_ISRC, 0x00); in wcd_measure_adc_continuous()
871 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_MODE, 1); in wcd_measure_adc_continuous()
875 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, 0); in wcd_measure_adc_continuous()
877 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 0); in wcd_measure_adc_continuous()
879 wcd_mbhc_write_field(mbhc, WCD_MBHC_MUX_CTL, MUX_CTL_IN2P); in wcd_measure_adc_continuous()
881 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 1); in wcd_measure_adc_continuous()
883 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, 1); in wcd_measure_adc_continuous()
892 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, adc_en); in wcd_measure_adc_continuous()
910 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_MODE, 0); in wcd_measure_adc_once()
914 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, 0); in wcd_measure_adc_once()
915 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 0); in wcd_measure_adc_once()
917 wcd_mbhc_write_field(mbhc, WCD_MBHC_MUX_CTL, mux_ctl); in wcd_measure_adc_once()
918 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 1); in wcd_measure_adc_once()
919 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, 1); in wcd_measure_adc_once()
945 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, adc_en); in wcd_measure_adc_once()
971 wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_SCHMT_ISRC, 0); in wcd_check_cross_conn()
994 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 0); in wcd_check_cross_conn()
996 wcd_mbhc_write_field(mbhc, WCD_MBHC_MUX_CTL, MUX_CTL_AUTO); in wcd_check_cross_conn()
997 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 1); in wcd_check_cross_conn()
999 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, adc_en); in wcd_check_cross_conn()
1001 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_MODE, adc_mode); in wcd_check_cross_conn()
1003 wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, fsm_en); in wcd_check_cross_conn()
1005 wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_SCHMT_ISRC, elect_ctl); in wcd_check_cross_conn()
1053 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 3); in wcd_mbhc_adc_update_fsm_source()
1061 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 3); in wcd_mbhc_adc_update_fsm_source()
1064 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 0); in wcd_mbhc_adc_update_fsm_source()
1204 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_MODE, 0); in wcd_correct_swch_plug()
1205 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, 0); in wcd_correct_swch_plug()
1206 wcd_mbhc_write_field(mbhc, WCD_MBHC_DETECTION_DONE, 1); in wcd_correct_swch_plug()
1280 wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_ISRC_EN, 1); in wcd_correct_swch_plug()
1283 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_MODE, 0); in wcd_correct_swch_plug()
1284 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, 0); in wcd_correct_swch_plug()
1293 wcd_mbhc_write_field(mbhc, WCD_MBHC_DETECTION_DONE, 1); in wcd_correct_swch_plug()
1295 wcd_mbhc_write_field(mbhc, WCD_MBHC_DETECTION_DONE, 0); in wcd_correct_swch_plug()
1358 wcd_mbhc_write_field(mbhc, WCD_MBHC_DETECTION_DONE, 0); in wcd_mbhc_adc_hs_rem_irq()
1359 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_MODE, 0); in wcd_mbhc_adc_hs_rem_irq()
1360 wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_EN, 0); in wcd_mbhc_adc_hs_rem_irq()
1362 wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 0); in wcd_mbhc_adc_hs_rem_irq()
1403 wcd_mbhc_write_field(mbhc, WCD_MBHC_DETECTION_DONE, 1); in wcd_mbhc_adc_hs_ins_irq()