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

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

Merge "ASoC: wcd9335: Configure MBHC ground detection registers"

parents 01f5d152 f9274c37
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
@@ -1250,6 +1250,21 @@ complete_zdet:
		tasha->zdet_gpio_cb(codec, false);
		tasha->zdet_gpio_cb(codec, false);
}
}


static void tasha_mbhc_gnd_det_ctrl(struct snd_soc_codec *codec, bool enable)
{
	if (enable) {
		snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH,
				    0x02, 0x02);
		snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH,
				    0x40, 0x40);
	} else {
		snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH,
				    0x40, 0x00);
		snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH,
				    0x02, 0x00);
	}
}

static const struct wcd_mbhc_cb mbhc_cb = {
static const struct wcd_mbhc_cb mbhc_cb = {
	.request_irq = tasha_mbhc_request_irq,
	.request_irq = tasha_mbhc_request_irq,
	.irq_control = tasha_mbhc_irq_control,
	.irq_control = tasha_mbhc_irq_control,
@@ -1268,6 +1283,7 @@ static const struct wcd_mbhc_cb mbhc_cb = {
	.get_hwdep_fw_cal = tasha_get_hwdep_fw_cal,
	.get_hwdep_fw_cal = tasha_get_hwdep_fw_cal,
	.mbhc_micb_ctrl_thr_mic = tasha_mbhc_micb_ctrl_threshold_mic,
	.mbhc_micb_ctrl_thr_mic = tasha_mbhc_micb_ctrl_threshold_mic,
	.compute_impedance = tasha_wcd_mbhc_calc_impedance,
	.compute_impedance = tasha_wcd_mbhc_calc_impedance,
	.mbhc_gnd_det_ctrl = tasha_mbhc_gnd_det_ctrl,
};
};


static int tasha_get_anc_slot(struct snd_kcontrol *kcontrol,
static int tasha_get_anc_slot(struct snd_kcontrol *kcontrol,