summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2022-02-07 18:21:52 -0800
committerCommit Bot <commit-bot@chromium.org>2022-02-16 20:34:15 +0000
commita115af26e2cf095aafc688195185ba3597c781ee (patch)
treec8a587c2164c1ad8708688aecc006e6e16039c9f
parent592137c7aea065456306ba1540b46c345c31836c (diff)
downloadchrome-ec-a115af26e2cf095aafc688195185ba3597c781ee.tar.gz
zephyr: Create Kconfig.pd_vbus_detection
Split USBA Kconfig options from Kconfig.usbc and place in a separate file named Kconfig.pd_vbus_detection. BUG=b:194432779 TEST=Verified Kconfig options with menuconfig BRANCH=main Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I263b7f8998dc28e1c19c860830a47301ef66a578 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3446460 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/Kconfig.pd_vbus_detection38
-rw-r--r--zephyr/Kconfig.usbc30
2 files changed, 39 insertions, 29 deletions
diff --git a/zephyr/Kconfig.pd_vbus_detection b/zephyr/Kconfig.pd_vbus_detection
new file mode 100644
index 0000000000..dd3607aac6
--- /dev/null
+++ b/zephyr/Kconfig.pd_vbus_detection
@@ -0,0 +1,38 @@
+# Copyright 2022 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+if PLATFORM_EC_USBC
+if PLATFORM_EC_USB_POWER_DELIVERY
+
+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"
+ help
+ Choose this option if the TCPC can detect the presence of VBUS
+
+config PLATFORM_EC_USB_PD_VBUS_DETECT_CHARGER
+ bool "Charger detects VBUS"
+ help
+ Choose this option if the battery charger can detect the presence
+ of VBUS
+
+config PLATFORM_EC_USB_PD_VBUS_DETECT_PPC
+ bool "PPC detects VBUS"
+ help
+ Choose this option if the Power-Path Controller (PPC) can detect the
+ presence of VBUS
+
+endchoice # PLATFORM_EC_USB_PD_VBUS_DETECTION_TYPE
+
+endif # PLATFORM_EC_USB_POWER_DELIVERY
+endif # PLATFORM_EC_USBC
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index b3b101cd8d..5bd9c8a3ef 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -19,6 +19,7 @@ rsource "Kconfig.pd_int_shared"
rsource "Kconfig.pd_meas_vbus"
rsource "Kconfig.pd_frs"
rsource "Kconfig.pd_discharge"
+rsource "Kconfig.pd_vbus_detection"
if PLATFORM_EC_USBC
@@ -315,35 +316,6 @@ config PLATFORM_EC_USB_PD_DATA_RESET_MSG
mandatory for products supporting USB4 but optional for other PD 3.0
products.
-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"
- help
- Choose this option if the TCPC can detect the presence of VBUS
-
-config PLATFORM_EC_USB_PD_VBUS_DETECT_CHARGER
- bool "Charger detects VBUS"
- help
- Choose this option if the battery charger can detect the presence
- of VBUS
-
-config PLATFORM_EC_USB_PD_VBUS_DETECT_PPC
- bool "PPC detects VBUS"
- help
- Choose this option if the Power-Path Controller (PPC) can detect the
- presence of VBUS
-
-endchoice # PLATFORM_EC_USB_PD_VBUS_DETECTION_TYPE
-
config PLATFORM_EC_USB_TYPEC_SM
bool "Type-C (TC) physical-layer state machine"
default y