summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2022-01-17 18:34:26 +1100
committerCommit Bot <commit-bot@chromium.org>2022-01-18 04:45:52 +0000
commit1e5e3340586feb44eedac5e8d1eed66c367a6a3e (patch)
tree81bcb07841912c2c0379f738283af03d4b17c839
parent8670201004ff5f6c704373f0b062879e2c72b6e1 (diff)
downloadchrome-ec-1e5e3340586feb44eedac5e8d1eed66c367a6a3e.tar.gz
usbc: Allow setting CONFIG_USB_PD_TCPC_LOW_POWER=n
By default, CONFIG_USB_PD_TCPC_LOW_POWER is enabled, and if it is set to 'n', there are compile errors. Allow setting the config to disable low power mode. BUG=b:214883916 TEST=zmake configure -b nissa; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I217645e6b169550efc075cd06a2fa62aa440e197 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3392105 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index 726958ba03..83e915d3b2 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -151,7 +151,14 @@ void print_flag(int port, int set_or_clear, int flag);
*
* TODO(b/162347811): TCPMv2: Wait for debounce on Vbus and CC lines
*/
+#ifdef CONFIG_USB_PD_TCPC_LOW_POWER
#define PD_LPM_EXIT_DEBOUNCE_US CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE
+#else
+/*
+ * Define this value regardless so it is not missing at compile time.
+ */
+#define PD_LPM_EXIT_DEBOUNCE_US 0
+#endif
/*
* The TypeC state machine uses this bit to disable/enable PD