summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.usbc
diff options
context:
space:
mode:
authorTristan Honscheid <honscheid@google.com>2022-01-19 12:45:11 -0700
committerCommit Bot <commit-bot@chromium.org>2022-01-21 17:47:03 +0000
commitc0297a6e5396a0ce4ed30e2092c5c6c63c209c17 (patch)
tree7e2bde7ffd42a40240ac19a9577f3c040756a958 /zephyr/Kconfig.usbc
parenta1ef248358601d2e994e41692f11fd2bebe6f24c (diff)
downloadchrome-ec-c0297a6e5396a0ce4ed30e2092c5c6c63c209c17.tar.gz
zephyr: Kconfig: Fix behavior of VBUS detection mode
Make CONFIG_PLATFORM_EC_USB_PD_VBUS_DETECT_NONE the default choice for VBUS detection and make it explicit. Then set the detection mode to _TCPC in the test `prj.conf` file. BRANCH=None BUG=b:215392619 TEST=zmake -D configure --test test-drivers; Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I9d382ba04e93480fd79f9c4407ed5a85fd5079f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3404938 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.usbc')
-rw-r--r--zephyr/Kconfig.usbc16
1 files changed, 9 insertions, 7 deletions
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index e84b748be1..bea3119184 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -607,8 +607,15 @@ config PLATFORM_EC_USB_PD_DATA_RESET_MSG
mandatory for products supporting USB4 but optional for other PD 3.0
products.
-choice "VBUS detection method"
+choice PLATFORM_EC_USB_PD_VBUS_DETECTION_TYPE
prompt "Select the method to detect VBUS"
+ default PLATFORM_EC_USB_PD_VBUS_DETECT_NONE
+
+config PLATFORM_EC_USB_PD_VBUS_DETECT_NONE
+ bool "No way to detect VBUS"
+ help
+ Choose this option if it is not possible to detect VBUS. This causes
+ the `check_vbus_level` function pointer in the driver struct to be NULL.
config PLATFORM_EC_USB_PD_VBUS_DETECT_TCPC
bool "TCPC detects VBUS"
@@ -627,12 +634,7 @@ config PLATFORM_EC_USB_PD_VBUS_DETECT_PPC
Choose this option if the Power-Path Controller (PPC) can detect the
presence of VBUS
-config PLATFORM_EC_USB_PD_VBUS_DETECT_NONE
- bool "No way to detect VBUS"
- help
- Choose this option if it is not possible to detect VBUS.
-
-endchoice # VBUS detection method
+endchoice # PLATFORM_EC_USB_PD_VBUS_DETECTION_TYPE
config PLATFORM_EC_USB_TYPEC_SM
bool "Type-C (TC) physical-layer state machine"