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 /board | |
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 'board')
-rw-r--r-- | board/casta/board.c | 2 | ||||
-rw-r--r-- | board/garg/board.c | 2 | ||||
-rw-r--r-- | board/glados_pd/board.c | 13 |
3 files changed, 15 insertions, 2 deletions
diff --git a/board/casta/board.c b/board/casta/board.c index cbf66d00a0..d277ab3b1c 100644 --- a/board/casta/board.c +++ b/board/casta/board.c @@ -164,7 +164,7 @@ void board_overcurrent_event(int port, int is_overcurrented) gpio_set_level(GPIO_USB_C_OC, !is_overcurrented); } -uint8_t board_get_usb_pd_port_count(void) +__override uint8_t board_get_usb_pd_port_count(void) { if (sku_id == 2) return CONFIG_USB_PD_PORT_MAX_COUNT - 1; diff --git a/board/garg/board.c b/board/garg/board.c index bc4dc9e226..58efecdfce 100644 --- a/board/garg/board.c +++ b/board/garg/board.c @@ -296,7 +296,7 @@ void board_overcurrent_event(int port, int is_overcurrented) gpio_set_level(GPIO_USB_C_OC, !is_overcurrented); } -uint8_t board_get_usb_pd_port_count(void) +__override uint8_t board_get_usb_pd_port_count(void) { /* HDMI SKU has one USB PD port */ if (sku_id == 9 || sku_id == 19 || sku_id == 50) diff --git a/board/glados_pd/board.c b/board/glados_pd/board.c index 13fa2a16ef..ad23131a3c 100644 --- a/board/glados_pd/board.c +++ b/board/glados_pd/board.c @@ -49,6 +49,19 @@ void board_config_pre_init(void) #include "gpio_list.h" +__override uint8_t board_get_usb_pd_port_count(void) +{ + return CONFIG_USB_PD_PORT_MAX_COUNT; +} + +void pd_set_suspend(int port, int suspend) +{ + /* + * Do nothing. This is only here to make the linker happy for this + * old board on ToT. + */ +} + /* Initialize board. */ static void board_init(void) { |