summaryrefslogtreecommitdiff
path: root/zephyr/program/corsola/include/variant_db_detection.h
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/program/corsola/include/variant_db_detection.h')
-rw-r--r--zephyr/program/corsola/include/variant_db_detection.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/zephyr/program/corsola/include/variant_db_detection.h b/zephyr/program/corsola/include/variant_db_detection.h
index e98ba3067d..fb468126ef 100644
--- a/zephyr/program/corsola/include/variant_db_detection.h
+++ b/zephyr/program/corsola/include/variant_db_detection.h
@@ -8,27 +8,32 @@
#ifndef __CROS_EC_CORSOLA_DB_DETECTION_H
#define __CROS_EC_CORSOLA_DB_DETECTION_H
+#include <stdint.h>
+
enum corsola_db_type {
CORSOLA_DB_UNINIT = -1,
+ /* CORSOLA_DB_NO_DETECTION means there is no detection involved in. */
+ CORSOLA_DB_NO_DETECTION,
+ /* CORSOLA_DB_NONE means there is no DB in the design. */
CORSOLA_DB_NONE,
CORSOLA_DB_TYPEC,
CORSOLA_DB_HDMI,
CORSOLA_DB_COUNT,
};
-#ifdef CONFIG_VARIANT_CORSOLA_DB_DETECTION
/*
* Get the connected daughterboard type.
*
* @return The daughterboard type.
*/
+#ifdef CONFIG_VARIANT_CORSOLA_DB_DETECTION
enum corsola_db_type corsola_get_db_type(void);
-#else
+#elif !defined(CONFIG_TEST)
inline enum corsola_db_type corsola_get_db_type(void)
{
- return CORSOLA_DB_NONE;
-};
-#endif /* CONFIG_VARIANT_CORSOLA_DB_DETECTION */
+ return CORSOLA_DB_NO_DETECTION;
+}
+#endif
/* return the adjusted port count for board overridden usbc/charger functions.
*/