diff options
author | Aseda Aboagye <aaboagye@google.com> | 2020-01-14 11:38:08 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-21 23:55:41 +0000 |
commit | 39b17e1375b5e149cd9807ac826cdf0dddfa9dbb (patch) | |
tree | e94d88fcbf732b12c0afc0d5392a5148fecedd85 | |
parent | cefb6232a83f5122ef4397ba81572183f723ce3f (diff) | |
download | chrome-ec-39b17e1375b5e149cd9807ac826cdf0dddfa9dbb.tar.gz |
tcpmv2: Fix issues with low power mode disabled
With low power mode disabled, TCPMv2 was failing to build. Making these
changes allowed it to build.
BUG=None
BRANCH=None
TEST=`make -j BOARD=waddledoo`
Change-Id: I5bed5d7ca7ceab77d5b764e97853c1d6bc51eb3d
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2001128
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | common/usbc/usb_tc_drp_acc_trysrc_sm.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c index f1f301a50c..438be0d3b3 100644 --- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c +++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c @@ -1561,8 +1561,7 @@ int tc_is_vconn_src(int port) } #endif -#ifdef CONFIG_USB_PD_TCPC_LOW_POWER -static int reset_device_and_notify(int port) +static __maybe_unused int reset_device_and_notify(int port) { int rv; int task, waiting_tasks; @@ -1603,6 +1602,7 @@ static int reset_device_and_notify(int port) return rv; } +#ifdef CONFIG_USB_PD_TCPC_LOW_POWER void pd_wait_exit_low_power(int port) { if (TC_CHK_FLAG(port, TC_FLAGS_LPM_ENGAGED)) { @@ -2918,14 +2918,14 @@ static void tc_drp_auto_toggle_run(const int port) * the CC lines did not change, then don't talk with the * TCPC otherwise we might wake it up. */ - if (IS_ENABLED(CONFIG_USB_PD_TCPC_LOW_POWER)) { - if (TC_CHK_FLAG(port, TC_FLAGS_LPM_REQUESTED) && - !TC_CHK_FLAG(port, TC_FLAGS_WAKE_FROM_LPM)) { - if (get_time().val > tc[port].low_power_time) - set_state_tc(port, TC_LOW_POWER_MODE); - return; - } +#ifdef CONFIG_USB_PD_TCPC_LOW_POWER + if (TC_CHK_FLAG(port, TC_FLAGS_LPM_REQUESTED) && + !TC_CHK_FLAG(port, TC_FLAGS_WAKE_FROM_LPM)) { + if (get_time().val > tc[port].low_power_time) + set_state_tc(port, TC_LOW_POWER_MODE); + return; } +#endif /* Check for connection */ tcpm_get_cc(port, &cc1, &cc2); |