diff options
author | Marc Zyngier <maz@kernel.org> | 2023-05-13 15:40:42 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-05-13 15:40:42 +0100 |
commit | a4fbd8f665d26c8744588e408bd2da4ba290d8c5 (patch) | |
tree | d957b8604993f6e9be23e7243de24bb24d2f7121 | |
parent | 15041be75c7043a7d4da8cbc834df3fa0c7b4d1d (diff) | |
download | cs-sw-a4fbd8f665d26c8744588e408bd2da4ba290d8c5.tar.gz |
Clear CC pull-up when applying VCONN
When applying VCONN, the PU settings are left to whatever they
were. This doesn't cause any issue if the opposite (inactive)
CC line is disconnected, but creates havoc if it is connected to
an emarker.
Clear the corresponding PU when applying VCONN.
Signed-off-by: Marc Zyngier <maz@kernel.org>
-rw-r--r-- | FUSB302.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -534,10 +534,13 @@ int16_t fusb302_tcpm_set_polarity(int16_t port, int16_t polarity) if (state[port].vconn_enabled) { /* set VCONN switch to be non-CC line */ - if (polarity) + if (polarity) { reg |= TCPC_REG_SWITCHES0_VCONN_CC1; - else + reg &= ~TCPC_REG_SWITCHES0_CC1_PU_EN; + } else { reg |= TCPC_REG_SWITCHES0_VCONN_CC2; + reg &= ~TCPC_REG_SWITCHES0_CC2_PU_EN; + } } /* clear meas_cc bits (RX line select) */ |