diff options
author | lschyi <lschyi@google.com> | 2023-05-15 15:37:12 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-16 01:49:13 +0000 |
commit | efe0fbc416966340abae6539df8b2ab5a7e5a219 (patch) | |
tree | 83cc915ecea5236754a8f5433e93b970c323b5c8 /zephyr/program/corsola/include/variant_db_detection.h | |
parent | 69f476737a9167bd5d650d74d2f2e809ef203275 (diff) | |
download | chrome-ec-efe0fbc416966340abae6539df8b2ab5a7e5a219.tar.gz |
corsola: Fix reported USB-C ports for no DB design with DB detection on
The definition of `CORSOLA_DB_NONE` was settled to no DB in the project
in the previous CL "corsola: Update implementation for no daughter board
", and the USB-C counts is determined by dts settings in previous CL "
corosla: Improve USB-C port configuration". This introduces a reported
port number mismatch when the DB detection is enabled, and the desired
detection result is no DB in the design.
Extend the DB status enum with `CORSOLA_DB_NO_DETECTION` to properly
describe the different DB status, and fix the reported USB-C port logic.
BUG=b:282625153
TEST=`zmake build <all board> --clobber`
Change-Id: Idd55381759677272e0bfc7b270647d759642ce01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4530326
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Tested-by: Sung-Chi Li <lschyi@chromium.org>
Commit-Queue: Sung-Chi Li <lschyi@chromium.org>
Diffstat (limited to 'zephyr/program/corsola/include/variant_db_detection.h')
-rw-r--r-- | zephyr/program/corsola/include/variant_db_detection.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zephyr/program/corsola/include/variant_db_detection.h b/zephyr/program/corsola/include/variant_db_detection.h index cf86e1ae1c..fb468126ef 100644 --- a/zephyr/program/corsola/include/variant_db_detection.h +++ b/zephyr/program/corsola/include/variant_db_detection.h @@ -12,6 +12,9 @@ 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, @@ -28,7 +31,7 @@ enum corsola_db_type corsola_get_db_type(void); #elif !defined(CONFIG_TEST) inline enum corsola_db_type corsola_get_db_type(void) { - return CORSOLA_DB_NONE; + return CORSOLA_DB_NO_DETECTION; } #endif |