asoc: mbhc: update the usbss switches once the removal is done
update the usbss switches only once the HS removal is completed. Change-Id: I050b30c2c407f189cefed56ec137848efb45e5b4 Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
This commit is contained in:
@@ -1746,13 +1746,13 @@ static int wcd_mbhc_usbc_ana_event_handler(struct notifier_block *nb,
|
|||||||
WCD_MBHC_REG_READ(WCD_MBHC_L_DET_EN, l_det_en);
|
WCD_MBHC_REG_READ(WCD_MBHC_L_DET_EN, l_det_en);
|
||||||
WCD_MBHC_REG_READ(WCD_MBHC_MECH_DETECTION_TYPE, detection_type);
|
WCD_MBHC_REG_READ(WCD_MBHC_MECH_DETECTION_TYPE, detection_type);
|
||||||
if ((mode == TYPEC_ACCESSORY_NONE) && !detection_type) {
|
if ((mode == TYPEC_ACCESSORY_NONE) && !detection_type) {
|
||||||
wcd_usbss_switch_update(WCD_USBSS_AATC, WCD_USBSS_CABLE_DISCONNECT);
|
|
||||||
if (unlikely((mbhc->mbhc_cb->lock_sleep(mbhc, true)) == false))
|
if (unlikely((mbhc->mbhc_cb->lock_sleep(mbhc, true)) == false))
|
||||||
pr_warn("%s: failed to hold suspend\n", __func__);
|
pr_warn("%s: failed to hold suspend\n", __func__);
|
||||||
else {
|
else {
|
||||||
wcd_mbhc_swch_irq_handler(mbhc);
|
wcd_mbhc_swch_irq_handler(mbhc);
|
||||||
mbhc->mbhc_cb->lock_sleep(mbhc, false);
|
mbhc->mbhc_cb->lock_sleep(mbhc, false);
|
||||||
}
|
}
|
||||||
|
wcd_usbss_switch_update(WCD_USBSS_AATC, WCD_USBSS_CABLE_DISCONNECT);
|
||||||
dev_dbg(mbhc->component->dev, "leave, %s: mode = %lu\n", __func__, mode);
|
dev_dbg(mbhc->component->dev, "leave, %s: mode = %lu\n", __func__, mode);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user