Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0403ce2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: wcd-mbhc: disable moisture detection for NC Jack"

parents 2eebf61c b8e67817
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -2066,6 +2066,12 @@ static void wcd_mbhc_moisture_config(struct wcd_mbhc *mbhc)
	if (mbhc->mbhc_cfg->moist_cfg.m_vref_ctl == V_OFF)
	if (mbhc->mbhc_cfg->moist_cfg.m_vref_ctl == V_OFF)
		return;
		return;


	/* Donot enable moisture detection if jack type is NC */
	if (!mbhc->hphl_swh) {
		pr_debug("%s: disable moisture detection for NC\n", __func__);
		return;
	}

	WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_MOISTURE_VREF,
	WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_MOISTURE_VREF,
				 mbhc->mbhc_cfg->moist_cfg.m_vref_ctl);
				 mbhc->mbhc_cfg->moist_cfg.m_vref_ctl);
	if (mbhc->mbhc_cb->hph_pull_up_control)
	if (mbhc->mbhc_cb->hph_pull_up_control)