diff --git a/drivers/usb/typec/mmi_tcpc/tcpc_rt1711h.c b/drivers/usb/typec/mmi_tcpc/tcpc_rt1711h.c index 4f722c6ff15e..da3997ca67db 100644 --- a/drivers/usb/typec/mmi_tcpc/tcpc_rt1711h.c +++ b/drivers/usb/typec/mmi_tcpc/tcpc_rt1711h.c @@ -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); diff --git a/drivers/usb/typec/mmi_tcpc/tcpci_typec.c b/drivers/usb/typec/mmi_tcpc/tcpci_typec.c index b7b82f999395..c8485e5e198f 100644 --- a/drivers/usb/typec/mmi_tcpc/tcpci_typec.c +++ b/drivers/usb/typec/mmi_tcpc/tcpci_typec.c @@ -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);