mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
tcpm: anx74xx: fix wrong clear CABLE_DET bit in 0x50:43 register.
BUG=None TEST=Verify cable detect is correct. BRANCH=None Change-Id: I6eb7c6cd979120835f89bbb68116ddbc03813f3b Signed-off-by: Tang Zhentian1 <ztang@analogixsemi.com> Reviewed-on: https://chromium-review.googlesource.com/382868 Commit-Ready: Kevin K Wong <kevin.k.wong@intel.com> Tested-by: Kevin K Wong <kevin.k.wong@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
0174d4f85b
commit
0fbbafc151
@@ -144,21 +144,25 @@ static int anx74xx_tcpm_mux_init(int i2c_addr)
|
||||
|
||||
static int anx74xx_tcpm_mux_exit(int port)
|
||||
{
|
||||
int rv = EC_SUCCESS;
|
||||
int rv = EC_SUCCESS;
|
||||
int reg = 0x0;
|
||||
|
||||
rv |= tcpc_write(port, ANX74XX_REG_ANALOG_CTRL_2,
|
||||
ANX74XX_REG_MODE_TRANS);
|
||||
rv |= tcpc_write(port, ANX74XX_REG_ANALOG_CTRL_1,
|
||||
0x0);
|
||||
rv |= tcpc_write(port, ANX74XX_REG_ANALOG_CTRL_5,
|
||||
0x04);
|
||||
rv |= tcpc_write(port, ANX74XX_REG_ANALOG_CTRL_2,
|
||||
0x0);
|
||||
rv = tcpc_read(port, ANX74XX_REG_ANALOG_CTRL_2, ®);
|
||||
if (rv)
|
||||
return EC_ERROR_UNKNOWN;
|
||||
|
||||
rv |= tcpc_write(port, ANX74XX_REG_ANALOG_CTRL_2, reg | ANX74XX_REG_MODE_TRANS);
|
||||
rv |= tcpc_write(port, ANX74XX_REG_ANALOG_CTRL_1, 0x0);
|
||||
rv |= tcpc_write(port, ANX74XX_REG_ANALOG_CTRL_5, 0x04);
|
||||
rv |= tcpc_write(port, ANX74XX_REG_ANALOG_CTRL_2, reg & 0x09);
|
||||
if (rv)
|
||||
return EC_ERROR_UNKNOWN;
|
||||
|
||||
return rv;
|
||||
|
||||
}
|
||||
|
||||
|
||||
static int anx74xx_set_mux(int port, int polarity)
|
||||
{
|
||||
int reg, rv = EC_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user