summaryrefslogtreecommitdiff
path: root/board/waddledoo/board.c
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2020-06-10 11:09:14 -0700
committerCommit Bot <commit-bot@chromium.org>2020-06-11 03:37:14 +0000
commitb922e957ff77b0daf0b1a0611d4dc27054f6d13a (patch)
treeb53b4e29d5ac7edf0c039e357f6b49dc2ae42494 /board/waddledoo/board.c
parent4aacf83506fd959d1341e29b664f6e4fe97824cb (diff)
downloadchrome-ec-b922e957ff77b0daf0b1a0611d4dc27054f6d13a.tar.gz
waddledoo: Use TCPCI cached VBUS presence
This commit changes the mechanism in which waddledoo checks VBUS presence. Instead of going out to talk to each TCPC, now waddledoo will simply use the cached VBUS presence within the TCPCI driver. This was causing a deadlock leading to watchdog resets when TCPC low power mode was enabled. BUG=b:158218613 BRANCH=None TEST=Enable TCPC low power mode, build and flash waddledoo, verify that the DUT does not watchdog reset. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Ifee42979246bb378e9af226123164b10b2df146e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2239483 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/waddledoo/board.c')
-rw-r--r--board/waddledoo/board.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c
index 8c3d584807..b28c9a8153 100644
--- a/board/waddledoo/board.c
+++ b/board/waddledoo/board.c
@@ -342,11 +342,8 @@ const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
int extpower_is_present(void)
{
- /*
- * TODO(b:146651593) We can likely use the charger IC to determine VBUS
- * presence.
- */
- return pd_snk_is_vbus_provided(0) || pd_snk_is_vbus_provided(1);
+ return pd_check_vbus_level(0, VBUS_PRESENT) ||
+ pd_check_vbus_level(1, VBUS_PRESENT);
}
__override void ocpc_get_pid_constants(int *kp, int *kp_div,