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

Commit b8e67817 authored by Yeleswarapu Nagaradhesh's avatar Yeleswarapu Nagaradhesh Committed by Gerrit - the friendly Code Review server
Browse files

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



Moisture detection is needed only for NO jack type.
So disable moisture detection feature for NC Jack.

CRs-Fixed: 1012001
Change-Id: I93f72f18145ddef6a0caf2c59a9af5f23e6e20a3
Signed-off-by: default avatarYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
parent 2705efa5
Loading
Loading
Loading
Loading
+6 −0
Original line number 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)
		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,
				 mbhc->mbhc_cfg->moist_cfg.m_vref_ctl);
	if (mbhc->mbhc_cb->hph_pull_up_control)