summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2022-04-27 14:34:05 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-02 23:44:33 +0000
commita37ce6c8342e81cbdff843f9afe9e111cce4dac0 (patch)
tree668acfca69ca349aff23a624811b4ee1fb72ad47
parentd7304cb1d8be377f70523d40790d8699d8b8f42f (diff)
downloadchrome-ec-a37ce6c8342e81cbdff843f9afe9e111cce4dac0.tar.gz
zephyr: isl923x: Remove ramp test in init
The driver disables input regulation on initialization until other tasks such as USB-C, charger_manager, etc. have had time to gather information about the state of the connected charger. Because of this no voltage ramping occurs and the test is unnecessary. BUG=b:224616537 BRANCH=none TEST=make -j runtests zmake testall Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I84e68ecd13b5f8ef4dfe140e3ed040e5368925cd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612208 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
-rw-r--r--zephyr/test/drivers/src/isl923x.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/zephyr/test/drivers/src/isl923x.c b/zephyr/test/drivers/src/isl923x.c
index 047090ebbb..5a86d9bb3a 100644
--- a/zephyr/test/drivers/src/isl923x.c
+++ b/zephyr/test/drivers/src/isl923x.c
@@ -597,7 +597,7 @@ ZTEST(isl923x, test_init)
&input_current),
NULL);
zassert_equal(0, input_current,
- "Expected input current 0mV but got %dmV", input_current);
+ "Expected input current 0mA but got %dmA", input_current);
/* Test failed CTRL2 register write */
isl923x_emul_reset_registers(isl923x_emul);
@@ -609,7 +609,7 @@ ZTEST(isl923x, test_init)
&input_current),
NULL);
zassert_equal(0, input_current,
- "Expected input current 0mV but got %dmV", input_current);
+ "Expected input current 0mA but got %dmA", input_current);
/* Test failed CTRL 0 read */
isl923x_emul_reset_registers(isl923x_emul);
@@ -620,15 +620,10 @@ ZTEST(isl923x, test_init)
zassert_ok(isl923x_drv.get_input_current_limit(CHARGER_NUM,
&input_current),
NULL);
- if (IS_ENABLED(CONFIG_CHARGE_RAMP_HW)) {
- zassert_equal(512, input_current,
- "Expected input current 512mV but got %dmV",
- input_current);
- } else {
- zassert_equal(0, input_current,
- "Expected input current 0mV but got %dmV",
+
+ zassert_equal(0, input_current,
+ "Expected input current 0mA but got %dmA",
input_current);
- }
/* Test failed CTRL 0 write */
isl923x_emul_reset_registers(isl923x_emul);
@@ -639,15 +634,10 @@ ZTEST(isl923x, test_init)
zassert_ok(isl923x_drv.get_input_current_limit(CHARGER_NUM,
&input_current),
NULL);
- if (IS_ENABLED(CONFIG_CHARGE_RAMP_HW)) {
- zassert_equal(512, input_current,
- "Expected input current 512mV but got %dmV",
- input_current);
- } else {
- zassert_equal(0, input_current,
- "Expected input current 0mV but got %dmV",
+
+ zassert_equal(0, input_current,
+ "Expected input current 0mA but got %dmA",
input_current);
- }
/* Test failed CTRL 3 read */
isl923x_emul_reset_registers(isl923x_emul);
@@ -659,7 +649,7 @@ ZTEST(isl923x, test_init)
&input_current),
NULL);
zassert_equal(0, input_current,
- "Expected input current 0mV but got %dmV", input_current);
+ "Expected input current 0mA but got %dmA", input_current);
/* Test failed CTRL 3 write */
isl923x_emul_reset_registers(isl923x_emul);
@@ -671,7 +661,7 @@ ZTEST(isl923x, test_init)
&input_current),
NULL);
zassert_equal(0, input_current,
- "Expected input current 0mV but got %dmV", input_current);
+ "Expected input current 0mA but got %dmA", input_current);
/* Test failed write adapter current limit */
isl923x_emul_reset_registers(isl923x_emul);
@@ -684,7 +674,7 @@ ZTEST(isl923x, test_init)
&input_current),
NULL);
zassert_equal(0, input_current,
- "Expected input current 0mV but got %dmV", input_current);
+ "Expected input current 0mA but got %dmA", input_current);
}
ZTEST(isl923x, test_init_late_jump)