summaryrefslogtreecommitdiff
path: root/zephyr/program/corsola/include/variant_db_detection.h
diff options
context:
space:
mode:
authorIvan Chen <yulunchen@google.com>2023-05-17 03:32:45 +0000
committerIvan Chen <yulunchen@google.com>2023-05-17 03:32:45 +0000
commitd7c9c6beb03ee5725232b9ac3bfe4825e1e227cb (patch)
tree3a0d6776c0e76e325d1b087cd51a850cb871358e /zephyr/program/corsola/include/variant_db_detection.h
parent8641442366bd7c2c133e302a57f904dfac3c896b (diff)
parentb34dc2ae9022e2fbb57ae6477891ff32954c62fd (diff)
downloadchrome-ec-firmware-brya-14505.B-main.tar.gz
Merge remote-tracking branch cros/main into firmware-brya-14505.B-mainfirmware-brya-14505.B-main
Generated by: util/update_release_branch.py --board brya firmware-brya-14505.B-main Relevant changes: git log --oneline 8641442366..b34dc2ae90 -- board/brya board/brya util/getversion.sh BRANCH=None TEST=`make -j buildall` Force-Relevant-Builds: all Change-Id: I63149b4c1782b3ed57f2556755901c21f5f1e3e9 Signed-off-by: Ivan Chen <yulunchen@google.com>
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.
*/