summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/default/src/bc12.c
diff options
context:
space:
mode:
authorAaron Massey <aaronmassey@google.com>2022-07-21 17:55:22 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-01 20:35:36 +0000
commit86db909517f1493b4bde2ad939c0ee248921995c (patch)
treed167fd043fe4dba265d387704f907e8500c8f01a /zephyr/test/drivers/default/src/bc12.c
parentb719d38f1a02fbe3f003b5f2b840166496b3326c (diff)
downloadchrome-ec-86db909517f1493b4bde2ad939c0ee248921995c.tar.gz
zephyr: test: Migrate to upstream emulator API
Migrate the existing emulators and tests to use the new upstream emulator API. Majority of these changes was the removal of struct i2c_emul usages in favor of direct usages of struct emul. BRANCH=none BUG=b:240291860 TEST=zmake test -a Signed-off-by: Aaron Massey <aaronmassey@google.com> Cq-Depend: chromium:3776856 Change-Id: I09c509ffc34ac3b28fbd4dece0acebcc36cc0932 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3781964 Reviewed-by: Yuval Peress <peress@google.com> Tested-by: Yuval Peress <peress@google.com>
Diffstat (limited to 'zephyr/test/drivers/default/src/bc12.c')
-rw-r--r--zephyr/test/drivers/default/src/bc12.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/zephyr/test/drivers/default/src/bc12.c b/zephyr/test/drivers/default/src/bc12.c
index ac1c5692d1..76268e9172 100644
--- a/zephyr/test/drivers/default/src/bc12.c
+++ b/zephyr/test/drivers/default/src/bc12.c
@@ -98,7 +98,7 @@ static const struct bc12_status bc12_chg_limits[] = {
static void test_bc12_pi3usb9201_host_mode(void)
{
- struct i2c_emul *emul = pi3usb9201_emul_get(PI3USB9201_ORD);
+ const struct emul *emul = pi3usb9201_emul_get(PI3USB9201_ORD);
uint8_t a, b;
/*
@@ -145,7 +145,7 @@ test_bc12_pi3usb9201_client_mode(enum pi3usb9201_client_sts detect_result,
enum charge_supplier supplier,
int current_limit)
{
- struct i2c_emul *emul = pi3usb9201_emul_get(PI3USB9201_ORD);
+ const struct emul *emul = pi3usb9201_emul_get(PI3USB9201_ORD);
uint8_t a, b;
int port, voltage;
@@ -234,7 +234,7 @@ ZTEST_USER(bc12, test_bc12_pi3usb9201)
DEVICE_DT_GET(DT_GPIO_CTLR(GPIO_BATT_PRES_ODL_PATH, gpios));
const struct device *acok_dev =
DEVICE_DT_GET(DT_GPIO_CTLR(GPIO_ACOK_OD_PATH, gpios));
- struct i2c_emul *emul = pi3usb9201_emul_get(PI3USB9201_ORD);
+ const struct emul *emul = pi3usb9201_emul_get(PI3USB9201_ORD);
uint8_t a, b;
/* Pretend we have battery and AC so charging works normally. */