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

Commit f232f1ad authored by Yeleswarapu Nagaradhesh's avatar Yeleswarapu Nagaradhesh
Browse files

ASoC: wcd-mbhc: disable electrical interrupts when cable type is NONE



Electrical interrupts are not disabled when cable type is NONE,
due to which SW is getting spurious interrupts when cable is removed.
Disable electrical interrupts if cable type is NONE.

CRs-Fixed: 1072485
Change-Id: I5eb77eba3999aff929b659b783f3ed0776530479
Signed-off-by: default avatarYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
parent 4f11fdea
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -1602,6 +1602,9 @@ static void wcd_mbhc_swch_irq_handler(struct wcd_mbhc *mbhc)
		/* Disable HW FSM */
		/* Disable HW FSM */
		WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_FSM_EN, 0);
		WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_FSM_EN, 0);
		WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_BTN_ISRC_CTL, 0);
		WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_BTN_ISRC_CTL, 0);
		wcd_mbhc_hs_elec_irq(mbhc, WCD_MBHC_ELEC_HS_INS, false);
		wcd_mbhc_hs_elec_irq(mbhc, WCD_MBHC_ELEC_HS_REM, false);

	}
	}


	mbhc->in_swch_irq_handler = false;
	mbhc->in_swch_irq_handler = false;