static int tcpci_tcpm_set_cc(int port, int pull) { /* * Set manual control of Rp/Rd, and set both CC lines to the same * pull. */ /* TODO: set desired Rp strength */ return tcpc_write(port, TCPC_REG_ROLE_CTRL, TCPC_REG_ROLE_CTRL_SET(0, 0, pull, pull)); }
int tcpm_set_cc(int port, int pull) { /* * Set manual control of Rp/Rd, and set both CC lines to the same * pull. */ /* TODO: set desired Rp strength */ return i2c_write8(I2C_PORT_TCPC, I2C_ADDR_TCPC(port), TCPC_REG_ROLE_CTRL, TCPC_REG_ROLE_CTRL_SET(0, 0, pull, pull)); }