diff options
author | Jett Rink <jettrink@chromium.org> | 2020-06-30 12:44:57 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-09 14:19:13 +0000 |
commit | bd4116995dc02b644d8ea7da840a79b69c94adac (patch) | |
tree | bfbae00b982f5acc96e123d7d75b875e672cdcf5 /test | |
parent | 5330a08fb0ccd325e02472722bbb355f2b56508d (diff) | |
download | chrome-ec-bd4116995dc02b644d8ea7da840a79b69c94adac.tar.gz |
usbc: ensure we are suspending USB-C ports on shutdown
After CL:2208221, the check for the PD_CMD task no longer trigger,
so we end up not calling suspend on our TCPC ports.
We want to continue to suspend, which will apply CC open in
TCPMv2 for a cooperative shutdown
Also, correct override keyword usage for board_get_usb_pd_port_count
since I had to touch those definitions to make IS_ENABLE work
BRANCH=none
BUG=b:160243292
TEST=See that software sync reboot, applies CC open (and browns out system)
Change-Id: I00bf08c7d347441d77834e2c5122a09ca2316280
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276318
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/charge_manager.c | 5 | ||||
-rw-r--r-- | test/charge_ramp.c | 5 | ||||
-rw-r--r-- | test/usb_pd_int.c | 4 | ||||
-rw-r--r-- | test/usb_prl_old.c | 4 |
4 files changed, 18 insertions, 0 deletions
diff --git a/test/charge_manager.c b/test/charge_manager.c index 51a587b68a..2a64ca3e98 100644 --- a/test/charge_manager.c +++ b/test/charge_manager.c @@ -45,6 +45,11 @@ void board_set_charge_limit(int port, int supplier, int charge_ma, active_charge_limit = charge_ma; } +__override uint8_t board_get_usb_pd_port_count(void) +{ + return CONFIG_USB_PD_PORT_MAX_COUNT; +} + /* Sets a charge port that will be rejected as the active port. */ static void set_charge_port_to_reject(int port) { diff --git a/test/charge_ramp.c b/test/charge_ramp.c index 01571c8f3a..d239081c1c 100644 --- a/test/charge_ramp.c +++ b/test/charge_ramp.c @@ -37,6 +37,11 @@ static int charge_limit_ma; /* Mock functions */ +__override uint8_t board_get_usb_pd_port_count(void) +{ + return CONFIG_USB_PD_PORT_MAX_COUNT; +} + /* Override test_mockable implementations in charge_ramp module */ int chg_ramp_allowed(int port, int supplier) { diff --git a/test/usb_pd_int.c b/test/usb_pd_int.c index b93001a27f..8a15cfdcd6 100644 --- a/test/usb_pd_int.c +++ b/test/usb_pd_int.c @@ -25,6 +25,10 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { } }; +void board_reset_pd_mcu(void) +{ +} + static int deferred_resume_called; void pd_deferred_resume(int port) { diff --git a/test/usb_prl_old.c b/test/usb_prl_old.c index f11db7fb5c..4f0cc05caa 100644 --- a/test/usb_prl_old.c +++ b/test/usb_prl_old.c @@ -92,6 +92,10 @@ static uint32_t test_data[] = { 0x11223344 }; +void pd_set_suspend(int port, int suspend) +{ +} + static struct pd_prl { int rev; int pd_enable; |