summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbe Levkoy <alevkoy@chromium.org>2022-10-10 10:17:28 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-11 00:59:35 +0000
commit35a32ab9bb7f87e7480cfb1c3ca5fd7a3f9f12bc (patch)
treec24b4bf9a0b643967ca6579a7f1479f9bda8f346
parent909c3711b69361cdfd60e0ad9f20d4377f221e8e (diff)
downloadchrome-ec-35a32ab9bb7f87e7480cfb1c3ca5fd7a3f9f12bc.tar.gz
zephyr test: Improve pd_check_vconn_swap
Modify stub implementation of pd_check_vconn_swap to allow VCONN swap if "board" is not in G3, similar to what herobrine and some other boards support. BUG=b:251485312 TEST=twister -T zephyr/test/ BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ide7634fd4fa64f2877e240b5451f7015892e42d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3943259 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--zephyr/test/drivers/common/src/stubs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zephyr/test/drivers/common/src/stubs.c b/zephyr/test/drivers/common/src/stubs.c
index 662fcd761d..d07683017f 100644
--- a/zephyr/test/drivers/common/src/stubs.c
+++ b/zephyr/test/drivers/common/src/stubs.c
@@ -216,7 +216,7 @@ void pd_power_supply_reset(int port)
int pd_check_vconn_swap(int port)
{
- return 0;
+ return !chipset_in_state(CHIPSET_STATE_HARD_OFF);
}
int pd_set_power_supply_ready(int port)