smb-lib: clear EXIT_SNK_BASED_ON_CC BIT after cable removal
EXIT_SNK_BASED_ON_CC bit is only to be used while we are in hard reset. There is a possibility for that bit to remain set if cable were removed while a hard reset was in progress. Clear that bit in removal path Change-Id: I5e0776de9322a8015f851312df51a202e35c7a78 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
parent
e3ca3ef7a1
commit
f59ca29be6
1 changed files with 7 additions and 0 deletions
|
@ -3651,6 +3651,13 @@ static void smblib_handle_typec_removal(struct smb_charger *chg)
|
||||||
unlock:
|
unlock:
|
||||||
mutex_unlock(&chg->vconn_oc_lock);
|
mutex_unlock(&chg->vconn_oc_lock);
|
||||||
|
|
||||||
|
/* clear exit sink based on cc */
|
||||||
|
rc = smblib_masked_write(chg, TYPE_C_INTRPT_ENB_SOFTWARE_CTRL_REG,
|
||||||
|
EXIT_SNK_BASED_ON_CC_BIT, 0);
|
||||||
|
if (rc < 0)
|
||||||
|
smblib_err(chg, "Couldn't clear exit_sink_based_on_cc rc=%d\n",
|
||||||
|
rc);
|
||||||
|
|
||||||
typec_sink_removal(chg);
|
typec_sink_removal(chg);
|
||||||
smblib_update_usb_type(chg);
|
smblib_update_usb_type(chg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue