summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/chargesplash
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2023-01-11 17:55:09 -0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-02-16 00:46:34 +0000
commit654c7f10f0447d04cdafee9ea19f887f964d8940 (patch)
treec86673bfc91c80cf1eb1df29fe30b1e15a317afa /zephyr/test/drivers/chargesplash
parent0893963bfd157ad6310266381b921b8f007ef31d (diff)
downloadchrome-ec-654c7f10f0447d04cdafee9ea19f887f964d8940.tar.gz
zephyr/test: Update tests to use EC CMD API
This refactors the unit tests to use the EC host command API. Calls to the generic host_command_process(...) are replaced with type-checked host command API calls that perform the same operation. BRANCH=none BUG=b:258110734 TEST='./twister -v -T zephyr/test' passes Change-Id: I1b925a04271dd50c3c7c0a3481cd30ba762b1561 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4172828 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/test/drivers/chargesplash')
-rw-r--r--zephyr/test/drivers/chargesplash/src/chargesplash.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/zephyr/test/drivers/chargesplash/src/chargesplash.c b/zephyr/test/drivers/chargesplash/src/chargesplash.c
index 27b3678bd8..8ca872155b 100644
--- a/zephyr/test/drivers/chargesplash/src/chargesplash.c
+++ b/zephyr/test/drivers/chargesplash/src/chargesplash.c
@@ -29,10 +29,8 @@ chargesplash_hostcmd(enum ec_chargesplash_cmd cmd,
struct ec_response_chargesplash *response)
{
struct ec_params_chargesplash params = { .cmd = cmd };
- struct host_cmd_handler_args args =
- BUILD_HOST_COMMAND(EC_CMD_CHARGESPLASH, 0, *response, params);
- return host_command_process(&args);
+ return ec_cmd_chargesplash(NULL, &params, response);
}
static bool is_chargesplash_requested(void)