summaryrefslogtreecommitdiff
path: root/zephyr/test
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2023-03-30 11:37:43 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-31 15:01:49 +0000
commite4aebf311ae29a7b2d9d5eaa84a0a1c7248cff34 (patch)
treef42398431c205621ee1b6afab799f7dc36726701 /zephyr/test
parent0def7b76659017842a5316dc839945e35fc60d99 (diff)
downloadchrome-ec-e4aebf311ae29a7b2d9d5eaa84a0a1c7248cff34.tar.gz
Zephyr test: Conditionally compile ISL923x dependent functions
Remove the functions which require the ISL923x emulator to function from the build if that emulator isn't present. This way, tests may compile with a different charger emulator in place. BRANCH=None BUG=b:273722902 TEST=./twister -T ./zephyr/test Change-Id: Id497e8c9151a247aedff10eca1b7af3dd047a1fa Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4387135 Reviewed-by: Aaron Massey <aaronmassey@google.com>
Diffstat (limited to 'zephyr/test')
-rw-r--r--zephyr/test/drivers/common/src/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zephyr/test/drivers/common/src/utils.c b/zephyr/test/drivers/common/src/utils.c
index 03d280cb68..24d3df6b91 100644
--- a/zephyr/test/drivers/common/src/utils.c
+++ b/zephyr/test/drivers/common/src/utils.c
@@ -124,6 +124,7 @@ void test_set_chipset_to_g3(void)
power_get_state());
}
+#if DT_HAS_COMPAT_STATUS_OKAY(cros_isl923x_emul)
void connect_source_to_port(struct tcpci_partner_data *partner,
struct tcpci_src_emul_data *src, int pdo_index,
const struct emul *tcpci_emul,
@@ -181,6 +182,7 @@ void disconnect_sink_from_port(const struct emul *tcpci_emul)
zassert_ok(tcpci_emul_disconnect_partner(tcpci_emul));
k_sleep(K_SECONDS(1));
}
+#endif /* DT_HAS_COMPAT_STATUS_OKAY(cros_isl923x_emul) */
uint8_t acpi_read(uint8_t acpi_addr)
{