Revert "ASoC: codecs: handle device disconnect during SSR"

This reverts commit 75f229237a.

Change-Id: Ie37d6ac80a3f86df50cdaab65dfd51624f7c7517
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
This commit is contained in:
Vignesh Kulothungan
2020-09-18 13:12:52 -07:00
vanhempi 25ae32a589
commit a77e386d54
3 muutettua tiedostoa jossa 0 lisäystä ja 22 poistoa

Näytä tiedosto

@@ -1630,8 +1630,6 @@ static int wcd_mbhc_set_keycode(struct wcd_mbhc *mbhc)
static int wcd_mbhc_usbc_ana_event_handler(struct notifier_block *nb,
unsigned long mode, void *ptr)
{
unsigned int l_det_en = 0;
unsigned int detection_type = 0;
struct wcd_mbhc *mbhc = container_of(nb, struct wcd_mbhc, fsa_nb);
if (!mbhc)
@@ -1644,23 +1642,6 @@ static int wcd_mbhc_usbc_ana_event_handler(struct notifier_block *nb,
mbhc->mbhc_cb->clk_setup(mbhc->component, true);
/* insertion detected, enable L_DET_EN */
WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_L_DET_EN, 1);
} else {
WCD_MBHC_REG_READ(WCD_MBHC_MECH_DETECTION_TYPE, detection_type);
WCD_MBHC_REG_READ(WCD_MBHC_L_DET_EN, l_det_en);
/* If both l_det_en and detection type are set, it means device was
* unplugged during SSR and detection interrupt was not handled.
* So trigger device disconnect */
if (detection_type && l_det_en) {
/* Set the detection type appropriately */
WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_MECH_DETECTION_TYPE,
!detection_type);
/* Set current plug type to the state before SSR */
mbhc->current_plug = mbhc->plug_before_ssr;
wcd_mbhc_swch_irq_handler(mbhc);
mbhc->mbhc_cb->lock_sleep(mbhc, false);
mbhc->plug_before_ssr = MBHC_PLUG_TYPE_NONE;
}
}
return 0;
}