summaryrefslogtreecommitdiff
path: root/include/chipset.h
diff options
context:
space:
mode:
authorMadhurima Paruchuri <mparuchuri@google.com>2022-10-14 11:33:28 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-28 08:53:52 +0000
commit4a3adb811a0e335eabc103f1a2749f05c2794925 (patch)
treeccedbd3e0dc945c458f7655c3080308375f64ff9 /include/chipset.h
parente31a1bc770aa0acb31509b5f86374ce34cec8185 (diff)
downloadchrome-ec-4a3adb811a0e335eabc103f1a2749f05c2794925.tar.gz
rex: zephyr: test: Add unit tests for usb_pd_policy
BUG=b:247796816 BRANCH=None TEST=./twister -T zephyr/test/rex --clobber Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Change-Id: Iefe2eeb69eee1edca5bea0c7cbe6c0e1a6974514 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3956154 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'include/chipset.h')
-rw-r--r--include/chipset.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/chipset.h b/include/chipset.h
index 54c325639a..e0c8f9536e 100644
--- a/include/chipset.h
+++ b/include/chipset.h
@@ -129,12 +129,20 @@ void init_reset_log(void);
#else /* !CONFIG_AP_POWER_CONTROL */
+#ifdef CONFIG_TEST_USB_PD_POLICY
+
+int chipset_in_state(int state_mask);
+
+#else
+
/* When no chipset is present, assume it is always off. */
static inline int chipset_in_state(int state_mask)
{
return state_mask & CHIPSET_STATE_ANY_OFF;
}
+#endif
+
static inline int chipset_in_or_transitioning_to_state(int state_mask)
{
return state_mask & CHIPSET_STATE_ANY_OFF;