nct38xx: Use common tcpci set_polarity
BRANCH=none
TEST=verify TCPCI is still functional
@@ -201,20 +201,6 @@ int tcpci_nct38xx_drp_toggle(int port)
return tcpci_tcpc_drp_toggle(port);
}
-int tcpci_nct38xx_set_polarity(int port, int polarity)
-{
- int rv, reg;
-
- rv = tcpc_read(port, TCPC_REG_TCPC_CTRL, &reg);
- if (rv)
- return rv;
-
- reg = polarity ? (reg | TCPC_REG_TCPC_CTRL_SET(1)) :
- (reg & ~TCPC_REG_TCPC_CTRL_SET(1));
-
- return tcpc_write(port, TCPC_REG_TCPC_CTRL, reg);
-}
-
int tcpci_nct38xx_transmit(int port, enum tcpm_transmit_type type,
uint16_t header, const uint32_t *data)
{
@@ -309,7 +295,7 @@ const struct tcpm_drv nct38xx_tcpm_drv = {
#endif
.select_rp_value = &tcpci_tcpm_select_rp_value,
.set_cc = &tcpci_nct38xx_set_cc,
- .set_polarity = &tcpci_nct38xx_set_polarity,
+ .set_polarity = &tcpci_tcpm_set_polarity,
.set_vconn = &tcpci_tcpm_set_vconn,
.set_msg_header = &tcpci_tcpm_set_msg_header,
.set_rx_enable = &tcpci_tcpm_set_rx_enable,
