summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2022-02-07 17:31:21 -0800
committerCommit Bot <commit-bot@chromium.org>2022-02-16 10:19:57 +0000
commitf99fabd9c36e90f42e290a83494e84ee6eba7e0e (patch)
treebdb3e8f98cb99c2442cff6ff2fcced0bb31bf4d5
parent52147d1eb7416a17578bf6fec6ff1be4e77100fb (diff)
downloadchrome-ec-f99fabd9c36e90f42e290a83494e84ee6eba7e0e.tar.gz
zephyr: Create Kconfig.pd_frs
Split PD FRS Kconfig options from Kconfig.usbc and place in a separate file named Kconfig.pd_frs. BUG=b:194432779 TEST=Verified Kconfig options with menuconfig BRANCH=main Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: If20792ef6fe8148e77db20caa72f916086db4a81 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3445453 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/Kconfig.pd_frs50
-rw-r--r--zephyr/Kconfig.usbc42
2 files changed, 51 insertions, 41 deletions
diff --git a/zephyr/Kconfig.pd_frs b/zephyr/Kconfig.pd_frs
new file mode 100644
index 0000000000..4d1ce5cacc
--- /dev/null
+++ b/zephyr/Kconfig.pd_frs
@@ -0,0 +1,50 @@
+# 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
+
+config PLATFORM_EC_USB_PD_FRS
+ bool "Support Fast Role Swap protocol"
+ help
+ Enables the protocol side of Fast Role Swap (FRS). This allows the
+ device to switch from a SNK to a SRC (or vice versa) based on
+ communication with the partner device.
+
+ For this to work the trigger must be implemented in either the
+ Type-C Port Controller (TCPC) or Power Path Controller (PPC).
+
+ FRS differs from the traditional power-role swap in that FRS
+ guarantees there is no interruption of power nor disruption of data
+ communication to any downstream devices (such as devices connected
+ to a USB-C hub or dock).
+
+if PLATFORM_EC_USB_PD_FRS
+
+choice "Trigger implementation"
+ prompt "Select where the trigger is implemented"
+ help
+ The Fast Role Swap (protocol requires that a trigger be implemented to
+ initiate the swap. Use this option to select which of the available
+ options should be used.
+
+config PLATFORM_EC_USB_PD_FRS_PPC
+ bool "PPC"
+ depends on PLATFORM_EC_USBC_PPC
+ help
+ Enable this if the Fast Role Swap trigger is implemented in the
+ Power Path Controller (PPC).
+
+config PLATFORM_EC_USB_PD_FRS_TCPC
+ bool "TCPC"
+ help
+ Enable this if the Fast Role Swap trigger is implemented in the
+ Type-C Port Controller (TCPC).
+
+endchoice # Trigger implementation
+
+endif # PLATFORM_EC_USB_PD_FRS
+
+endif # PLATFORM_EC_USB_POWER_DELIVERY
+endif # PLATFORM_EC_USBC
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index 21ffbdbf82..1553ee528c 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -17,6 +17,7 @@ menuconfig PLATFORM_EC_USBC
rsource "Kconfig.retimer"
rsource "Kconfig.pd_int_shared"
rsource "Kconfig.pd_meas_vbus"
+rsource "Kconfig.pd_frs"
if PLATFORM_EC_USBC
@@ -204,47 +205,6 @@ config PLATFORM_EC_USB_PD_DUAL_ROLE
up its battery), or send out power to an attached device on the same
port.
-config PLATFORM_EC_USB_PD_FRS
- bool "Support Fast Role Swap protocol"
- help
- Enables the protocol side of Fast Role Swap (FRS). This allows the
- device to switch from a SNK to a SRC (or vice versa) based on
- communication with the partner device.
-
- For this to work the trigger must be implemented in either the
- Type-C Port Controller (TCPC) or Power Path Controller (PPC).
-
- FRS differs from the traditional power-role swap in that FRS
- guarantees there is no interruption of power nor disruption of data
- communication to any downstream devices (such as devices connected
- to a USB-C hub or dock).
-
-if PLATFORM_EC_USB_PD_FRS
-
-choice "Trigger implementation"
- prompt "Select where the trigger is implemented"
- help
- The Fast Role Swap (protocol requires that a trigger be implemented to
- initiate the swap. Use this option to select which of the available
- options should be used.
-
-config PLATFORM_EC_USB_PD_FRS_PPC
- bool "PPC"
- depends on PLATFORM_EC_USBC_PPC
- help
- Enable this if the Fast Role Swap trigger is implemented in the
- Power Path Controller (PPC).
-
-config PLATFORM_EC_USB_PD_FRS_TCPC
- bool "TCPC"
- help
- Enable this if the Fast Role Swap trigger is implemented in the
- Type-C Port Controller (TCPC).
-
-endchoice # Trigger implementation
-
-endif # PLATFORM_EC_USB_PD_FRS
-
config PLATFORM_EC_USB_PD_DPS
bool "Board can support Dynamic PDO Selection"
depends on PLATFORM_EC_BATTERY