summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2018-08-27 19:29:04 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-09-17 13:17:34 -0700
commitb2e389668c7e027dd184c59f7319d4379f04a809 (patch)
treefaa77b645a84243594a014e8b102e1eab4efa5e8 /driver
parent40c522b2dbfd3392f708fd58e3de9e6bc66d07a4 (diff)
downloadchrome-ec-b2e389668c7e027dd184c59f7319d4379f04a809.tar.gz
pd: Add PD_FLAGS_LPM_TRANSITION
Add PD_FLAGS_LPM_TRANSITION and use this to allow the PD task to call tcpc_read/tcpc_write from tcpm_enter_low_power_mode() and tcpm_init(). BRANCH=none BUG=b:111663127 TEST=PD and TCPC low power still work on Grunt Change-Id: I12ddb58667c171068e1be6d136f22f2062959c8c Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1194351 Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/tcpm/tcpci.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index c22d995d71..250673b44a 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -274,10 +274,7 @@ int tcpci_tcpc_drp_toggle(int port, int enable)
#ifdef CONFIG_USB_PD_TCPC_LOW_POWER
int tcpci_enter_low_power_mode(int port)
{
- /* This uses the raw i2c write to bypass the pd_device_accessed call */
- return i2c_write8(tcpc_config[port].i2c_host_port,
- tcpc_config[port].i2c_slave_addr,
- TCPC_REG_COMMAND, TCPC_REG_COMMAND_I2CIDLE);
+ return tcpc_write(port, TCPC_REG_COMMAND, TCPC_REG_COMMAND_I2CIDLE);
}
#endif