diff --git a/asoc/codecs/wcd-mbhc-adc.c b/asoc/codecs/wcd-mbhc-adc.c index 9691074e04..0ec5b157ea 100644 --- a/asoc/codecs/wcd-mbhc-adc.c +++ b/asoc/codecs/wcd-mbhc-adc.c @@ -128,21 +128,9 @@ static int wcd_measure_adc_once(struct wcd_mbhc *mbhc, int mux_ctl) int ret = 0; int output_mv = 0; u8 adc_en = 0; - bool is_pa_on = false; pr_debug("%s: enter\n", __func__); - if (mbhc->mbhc_cb->hph_pa_on_status) { - if (mbhc->mbhc_cb->hph_pa_on_status(mbhc->component)) { - if (mbhc->mbhc_cb->hph_pa_enable) { - mbhc->mbhc_cb->hph_pa_enable(mbhc->component, 0); - is_pa_on = true; - pr_debug("%s: pa is on before detection,so disable pa and read adc \n", - __func__); - } - } - } - WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ADC_MODE, 0); /* Read ADC Enable bit to restore after adc measurement */ WCD_MBHC_REG_READ(WCD_MBHC_ADC_EN, adc_en); @@ -191,13 +179,6 @@ static int wcd_measure_adc_once(struct wcd_mbhc *mbhc, int mux_ctl) ret = output_mv; } - if (is_pa_on) { - if (mbhc->mbhc_cb->hph_pa_enable) { - mbhc->mbhc_cb->hph_pa_enable(mbhc->component, 1); - pr_debug("%s: restore pa \n", __func__); - } - } - pr_debug("%s: leave\n", __func__); return ret; diff --git a/asoc/codecs/wcd938x/wcd938x-mbhc.c b/asoc/codecs/wcd938x/wcd938x-mbhc.c index b842697f81..d61e6d68fc 100644 --- a/asoc/codecs/wcd938x/wcd938x-mbhc.c +++ b/asoc/codecs/wcd938x/wcd938x-mbhc.c @@ -804,15 +804,6 @@ static void wcd938x_mbhc_moisture_polling_ctrl(struct wcd_mbhc *mbhc, 0x04, (enable << 2)); } -static void wcd938x_mbhc_hph_pa_enable(struct snd_soc_component *component, - bool enable) -{ - if (enable) - snd_soc_component_update_bits(component, WCD938X_ANA_HPH, 0xC0, 0xC0); - else - snd_soc_component_update_bits(component, WCD938X_ANA_HPH,0xC0, 00); -} - static void wcd938x_mbhc_bcs_enable(struct wcd_mbhc *mbhc, bool bcs_enable) { @@ -847,7 +838,6 @@ static const struct wcd_mbhc_cb mbhc_cb = { .mbhc_moisture_polling_ctrl = wcd938x_mbhc_moisture_polling_ctrl, .mbhc_moisture_detect_en = wcd938x_mbhc_moisture_detect_en, .bcs_enable = wcd938x_mbhc_bcs_enable, - .hph_pa_enable = wcd938x_mbhc_hph_pa_enable, }; static int wcd938x_get_hph_type(struct snd_kcontrol *kcontrol, diff --git a/include/asoc/wcd-mbhc-v2.h b/include/asoc/wcd-mbhc-v2.h index b740d74743..3880b77abd 100644 --- a/include/asoc/wcd-mbhc-v2.h +++ b/include/asoc/wcd-mbhc-v2.h @@ -529,8 +529,6 @@ struct wcd_mbhc_cb { bool (*mbhc_get_moisture_status)(struct wcd_mbhc *mbhc); void (*mbhc_moisture_polling_ctrl)(struct wcd_mbhc *mbhc, bool enable); void (*mbhc_moisture_detect_en)(struct wcd_mbhc *mbhc, bool enable); - void (*hph_pa_enable)(struct snd_soc_component *component, bool enable); - }; struct wcd_mbhc_fn {