summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Massey <aaronmassey@google.com>2022-09-28 13:21:43 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-30 19:58:45 +0000
commit35956e5930d462512661ed565c5148f95004064f (patch)
tree44ec47f64f7d571613ebcdc347af47ddc79ec7fe /test
parente60ea169df800e3ab0ce5b7bfa983626dae75880 (diff)
downloadchrome-ec-35956e5930d462512661ed565c5148f95004064f.tar.gz
usb_common: Fix/test EC_CMD_PD_HOST_EVENT_STATUS
The EC_CMD_PD_HOST_EVENT_STATUS retrieved and cleared a bit-array of host event statuses that could never actually be set via public APIs, i.e. the pd_host_send_event() function because the aforementioned function was moved to a different source file. Move the pd_host_send_event() back to usb_pd_host_cmd.c so it can actually update the static event status bit-array. Validate this change by testing the host command status attribute in its response after invoking pd_send_host_event(). Also allow the EC_CMD_PD_HOST_EVENT_STATUS to be compiled in test builds and instead disable it for the one incompatible test (charge ramp). BRANCH=none BUG=b:236075275 BUG=b:249574372 TEST=twister --clobber -i -s zephyr/test/drivers/drivers.host_cmd TEST=make runhosttests -j TEST=make BOARD=fusb307bgevb -j Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I548fc6c6eed3a2eab6e2c9b7d8862f4cc0786c12 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3924807 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_config.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/test_config.h b/test/test_config.h
index 56a4b5b97d..bc28b7d966 100644
--- a/test/test_config.h
+++ b/test/test_config.h
@@ -635,6 +635,7 @@ int ncp15wb_calculate_temp(uint16_t adc);
#ifdef TEST_CHARGE_RAMP
#define CONFIG_CHARGE_RAMP_SW
#define CONFIG_USB_PD_PORT_MAX_COUNT 2
+#undef CONFIG_USB_PD_HOST_CMD
#endif
#ifdef TEST_RTC