diff options
author | Diana Z <dzigterman@chromium.org> | 2020-07-23 22:50:54 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-28 04:09:00 +0000 |
commit | a787987e6a2cc7878ee9d58a6431d365a3fb195d (patch) | |
tree | 0228687d6f69e560cd1f1ae447f5edbf1d32cd0b /board/waddledoo | |
parent | aaab7ae298c52c0e71f91b30ef78a46a06df54eb (diff) | |
download | chrome-ec-a787987e6a2cc7878ee9d58a6431d365a3fb195d.tar.gz |
Dedede: Move extpower_is_present() to baseboard
This consolidates dedede boards to use a baseboard extpower_is_present()
and also adds the condition to verify that the port is sinking, instead
of providing Vbus. It also converts the RAA489000 boards to use the
cached Vbus presence in pd_snk_is_vbus_provided().
BRANCH=None
BUG=None
TEST=on waddledoo and waddledee, verify "AC on" prints when a charger or
charge-through servo v4 is plugged in, verify no "AC on" prints when a
dongle is plugged in
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I5941da789a4e810f6d8cc40cef4d32a5a03c5662
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2317062
Tested-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/waddledoo')
-rw-r--r-- | board/waddledoo/board.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c index cc505bb16a..085ae07f44 100644 --- a/board/waddledoo/board.c +++ b/board/waddledoo/board.c @@ -446,12 +446,6 @@ struct motion_sensor_t motion_sensors[] = { const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); -int extpower_is_present(void) -{ - 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, int *ki, int *ki_div, int *kd, int *kd_div) @@ -479,10 +473,7 @@ __override void ocpc_get_pid_constants(int *kp, int *kp_div, int pd_snk_is_vbus_provided(int port) { - int regval = 0; - - tcpc_read(port, TCPC_REG_POWER_STATUS, ®val); - return regval & TCPC_REG_POWER_STATUS_VBUS_PRES; + return pd_check_vbus_level(port, VBUS_PRESENT); } const struct charger_config_t chg_chips[] = { |