summaryrefslogtreecommitdiff
path: root/include/usb_pd.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-10-01 10:34:04 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-10-02 05:19:51 -0700
commitd92cb76f16a1ddd9e1e14276d7d0fae5618264a3 (patch)
treedd6c66f4aab4a1b8bc392d777ee784bfca3ddb2f /include/usb_pd.h
parenteeefb4833ad233ae81f521504578c9311bbca960 (diff)
downloadchrome-ec-d92cb76f16a1ddd9e1e14276d7d0fae5618264a3.tar.gz
pd: prevent incorrect LPM flag use
Only define PD_FLAGS_LPM_* with the CONFIG_USB_PD_TCPC_LOW_POWER option is defined. This prevents us from using the flags when we shouldn't. BRANCH=none BUG=b:116269457 TEST=buildall works for all boards. Change-Id: I6837819a7ce5d8216e98c92c95275f297d88f911 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1254922 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r--include/usb_pd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 76970cb044..f27c10544d 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -735,9 +735,11 @@ enum pd_states {
* PD_FLAGS_LPM_TRANSITION is set while the HW is transitioning into or out of
* low power (when PD_LPM_FLAGS_ENGAGED is changing).
*/
+#ifdef CONFIG_USB_PD_TCPC_LOW_POWER
#define PD_FLAGS_LPM_REQUESTED (1 << 17)/* Tracks SW LPM state */
#define PD_FLAGS_LPM_ENGAGED (1 << 18)/* Tracks HW LPM state */
#define PD_FLAGS_LPM_TRANSITION (1 << 19)/* Tracks HW LPM transition */
+#endif
/* Flags to clear on a disconnect */
#define PD_FLAGS_RESET_ON_DISCONNECT_MASK (PD_FLAGS_PARTNER_DR_POWER | \
PD_FLAGS_PARTNER_DR_DATA | \