diff options
-rw-r--r-- | driver/tcpm/ps8xxx.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c index 0147739d02..d26bf69e1a 100644 --- a/driver/tcpm/ps8xxx.c +++ b/driver/tcpm/ps8xxx.c @@ -208,27 +208,13 @@ static int ps8xxx_dci_disable(int port) #ifdef CONFIG_USB_PD_TCPM_PS8805 static int ps8xxx_dci_disable(int port) { - int status, e; int p1_addr; - status = tcpc_write(port, PS8XXX_REG_I2C_DEBUGGING_ENABLE, - PS8XXX_REG_I2C_DEBUGGING_ENABLE_ON); - if (status != EC_SUCCESS) - return status; - + /* DCI registers are always accessible on PS8805 */ p1_addr = tcpc_config[port].i2c_info.addr_flags - (PS8751_I2C_ADDR1_FLAGS - PS8751_I2C_ADDR1_P1_FLAGS); - status = ps8xxx_addr_dci_disable(port, p1_addr, - PS8805_P1_REG_MUX_USB_DCI_CFG); - - e = tcpc_write(port, PS8XXX_REG_I2C_DEBUGGING_ENABLE, - PS8XXX_REG_I2C_DEBUGGING_ENABLE_OFF); - if (e != EC_SUCCESS) { - if (status == EC_SUCCESS) - status = e; - } - - return status; + return ps8xxx_addr_dci_disable(port, p1_addr, + PS8805_P1_REG_MUX_USB_DCI_CFG); } #endif /* CONFIG_USB_PD_TCPM_PS8805 */ |