소스 검색

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 <[email protected]>
Prasad Kumpatla 1 년 전
부모
커밋
08004d8420
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      asoc/codecs/wcd-mbhc-v2.c

+ 1 - 1
asoc/codecs/wcd-mbhc-v2.c

@@ -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_MECH_DETECTION_TYPE, 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))
 				pr_warn("%s: failed to hold suspend\n", __func__);
 			else {
 				wcd_mbhc_swch_irq_handler(mbhc);
 				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);
 		}
 #endif