mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
typec: disable vbus under 0.8V interrupt when vbus remove
As vbus remove and type-c cable still inserted at BSP test, the CC voltage transfer to VBUS pin, the vbus pin voltage range is 0~1.25V frequent switch. So the interrupt of vbus under 0.8V is triggered frequently. So disable this interrupt when vbus remove. Change-Id: Ibfc26ed1e7db2c1031ac27642aa38a2dcb120f92 Signed-off-by: Haijian Ma <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2325805 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Lu Chai <chailu1@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
8f797300e1
commit
bb37015224
2 changed files with 13 additions and 5 deletions
|
|
@ -959,11 +959,6 @@ static int rt1711_enable_vsafe0v_detect(
|
|||
struct tcpc_device *tcpc, bool enable)
|
||||
{
|
||||
int ret = 0;
|
||||
struct rt1711_chip *chip = tcpc_get_dev_data(tcpc);
|
||||
|
||||
if (chip->chip_id == SC2150A_DID) {
|
||||
enable = true;
|
||||
}
|
||||
|
||||
ret = rt1711_i2c_read8(tcpc, RT1711H_REG_RT_MASK);
|
||||
|
||||
|
|
|
|||
|
|
@ -2544,8 +2544,21 @@ static inline int typec_handle_vbus_absent(struct tcpc_device *tcpc)
|
|||
|
||||
int tcpc_typec_handle_ps_change(struct tcpc_device *tcpc, int vbus_level)
|
||||
{
|
||||
uint32_t chip_id;
|
||||
int rv = 0;
|
||||
|
||||
tcpc->typec_reach_vsafe0v = false;
|
||||
|
||||
rv = tcpci_get_chip_id(tcpc, &chip_id);
|
||||
if (!rv && chip_id == SC2150A_DID) {
|
||||
// open vsafe0.8v irq
|
||||
if (vbus_level >= TCPC_VBUS_VALID) {
|
||||
typec_disable_low_power_mode(tcpc);
|
||||
} else {
|
||||
typec_enter_low_power_mode(tcpc);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TYPEC_CHECK_LEGACY_CABLE
|
||||
if (tcpc->typec_legacy_cable) {
|
||||
typec_legacy_handle_ps_change(tcpc, vbus_level);
|
||||
|
|
|
|||
Loading…
Reference in a new issue