diff options
author | Scott <scollyer@chromium.org> | 2017-03-17 17:38:18 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-04-11 20:22:33 -0700 |
commit | 154c16ac18fdbd20d9d1b855d1e7151eb62f78ca (patch) | |
tree | 6d3c077482bdb1f1c620138cc2d001a6ead55dfa /common | |
parent | 68a537e4666e51ecc8a99a5362de1c3229bace89 (diff) | |
download | chrome-ec-154c16ac18fdbd20d9d1b855d1e7151eb62f78ca.tar.gz |
tcpm: anx74xx: Take ANX3429 out of suspend state before I2C access
The cable_det signal is used to signal to the EC that the tcpc has
detected a cable being connected when low power mode is
configured. The driver then needs to take the tcpc out of suspend
state by setting PWR_EN and RESET_N high. Then bit 7 of analog_ctrl_0
needs to be set properly.
The code that is handling this transition was attempting to access the
tcpc via I2C before putting the chip in normal mode when
transitioning from suspend to normal. In addition there are issues
with calling the driver function directly from the hook task (in the
delayed ISR handler) and from the USB PD task.
This CL changes the delay ISR handler to only set the TCPC_RESET
indication so that the call to put the ANX3429 into normal from
standby to normal mode only happens in the USB PD task. The TCPC_RESET
event is only set if cable_det is high, but reset_n (to the ANX3429)
is low which indicates that the ANX3429 is currently in standby mode.
BUG=b:35775019
BRANCH=reef
TEST=Manual
Tested with various adapters in both S0 and S3/G3 chipset
states. Verified that adapters connected as expected. When in S3/G3
connecting a sink only adapter still causes an indefinite toggle, but
all calls into the driver are executed from within the USB PD 0 task
and all ANX3429 I2C accesses work as expected.
Change-Id: I6e4843e43f59afbf5ca3251feb68981b815c1c78
Signed-off-by: Scott <scollyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/457103
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions