diff options
author | Abe Levkoy <alevkoy@chromium.org> | 2021-12-07 15:42:16 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-22 23:32:39 +0000 |
commit | 318fb5d959aa30d4f5ae810a1493f87f9514fc38 (patch) | |
tree | f47a68fce0f6ac7e34745414e3182e8286f15e28 | |
parent | 07096aab1700f0455c1d14a12dd6edd8b1656cf0 (diff) | |
download | chrome-ec-318fb5d959aa30d4f5ae810a1493f87f9514fc38.tar.gz |
zephyr test: Verify SYV682x ppc_dump
Verify that the SYV682x's implementation of ppc_dump succeeds. This
isn't a particularly interesting test, because the output format of this
command is not well defined. The primary motivation is to allow a
subsequent CL to cover all the I2C error checks in one shot.
BUG=b:190519131
TEST=zmake configure --test zephyr/test/drivers
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Icdb9091dafba9ccc01d5858214f23fefb9060b5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322679
Reviewed-by: Sam Hurst <shurst@google.com>
-rw-r--r-- | zephyr/test/drivers/src/ppc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zephyr/test/drivers/src/ppc.c b/zephyr/test/drivers/src/ppc.c index c047db12b6..5a729de3d6 100644 --- a/zephyr/test/drivers/src/ppc.c +++ b/zephyr/test/drivers/src/ppc.c @@ -481,6 +481,17 @@ static void test_ppc_syv682x_vbus_sink_enable(void) "Sink disabled, but power path enabled"); } +static void test_ppc_syv682x_ppc_dump(void) +{ + /* + * The ppc_dump command should succeed for this port. Don't check the + * output, since there are no standard requirements for that. + */ + const struct ppc_drv *drv = ppc_chips[syv682x_port].drv; + + zassert_ok(drv->reg_dump(syv682x_port), "ppc_dump command failed"); +} + static void test_ppc_syv682x(void) { test_ppc_syv682x_init(); @@ -491,6 +502,7 @@ static void test_ppc_syv682x(void) test_ppc_syv682x_write_busy(); test_ppc_syv682x_dev_is_connected(); test_ppc_syv682x_vbus_sink_enable(); + test_ppc_syv682x_ppc_dump(); } void test_suite_ppc(void) |