diff options
Diffstat (limited to 'zephyr/program/corsola/include/variant_db_detection.h')
-rw-r--r-- | zephyr/program/corsola/include/variant_db_detection.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/zephyr/program/corsola/include/variant_db_detection.h b/zephyr/program/corsola/include/variant_db_detection.h new file mode 100644 index 0000000000..e98ba3067d --- /dev/null +++ b/zephyr/program/corsola/include/variant_db_detection.h @@ -0,0 +1,37 @@ +/* Copyright 2021 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Corsola daughter board detection */ + +#ifndef __CROS_EC_CORSOLA_DB_DETECTION_H +#define __CROS_EC_CORSOLA_DB_DETECTION_H + +enum corsola_db_type { + CORSOLA_DB_UNINIT = -1, + 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. + */ +enum corsola_db_type corsola_get_db_type(void); +#else +inline enum corsola_db_type corsola_get_db_type(void) +{ + return CORSOLA_DB_NONE; +}; +#endif /* CONFIG_VARIANT_CORSOLA_DB_DETECTION */ + +/* return the adjusted port count for board overridden usbc/charger functions. + */ +uint8_t board_get_adjusted_usb_pd_port_count(void); + +#endif /* __CROS_EC_CORSOLA_DB_DETECTION_H */ |