summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2022-02-07 16:35:11 -0800
committerCommit Bot <commit-bot@chromium.org>2022-02-16 10:19:45 +0000
commitd2a8e607787a694d4ae3d46b2ec82f45b0407caa (patch)
tree7ff276d972955ac0f5a7de8dda12c9c84e30a79f
parent8a0fd6787abdd5315032066eca3868fdd9133d75 (diff)
downloadchrome-ec-d2a8e607787a694d4ae3d46b2ec82f45b0407caa.tar.gz
zephyr: Create Kconfig.pd_int_shared
Split PD Interrupt Shared Kconfig options from Kconfig.usbc and place in a separate file named Kconfig.pd_int_shared. BUG=b:194432779 TEST=Verified Kconfig options with menuconfig BRANCH=main Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I29164219ca8a6cf520d918d21168b928b015fb3f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3445325 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/Kconfig.pd_int_shared48
-rw-r--r--zephyr/Kconfig.usbc40
2 files changed, 49 insertions, 39 deletions
diff --git a/zephyr/Kconfig.pd_int_shared b/zephyr/Kconfig.pd_int_shared
new file mode 100644
index 0000000000..640bb22677
--- /dev/null
+++ b/zephyr/Kconfig.pd_int_shared
@@ -0,0 +1,48 @@
+# 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
+
+menuconfig PLATFORM_EC_USB_PD_INT_SHARED
+ bool "USB-C ports share PD interrupts"
+ select HAS_TASK_PD_INT_SHARED
+ help
+ This enables processing of shared interrupts where multiple ports
+ share a single IRQ on the EC. Only one shared IRQ is supported,
+ but any combination of ports can be serviced by that one IRQ.
+
+if PLATFORM_EC_USB_PD_INT_SHARED
+
+config PLATFORM_EC_USB_PD_PORT_0_SHARED
+ bool "Port 0 IRQ is shared"
+ help
+ Enable handling of port 0 PD interrupts signalled by an IRQ that is
+ shared by every other port enabled in this section.
+
+config PLATFORM_EC_USB_PD_PORT_1_SHARED
+ bool "Port 1 IRQ is shared"
+ depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 1
+ help
+ Enable handling of port 1 PD interrupts signalled by an IRQ that is
+ shared by every other port enabled in this section.
+
+config PLATFORM_EC_USB_PD_PORT_2_SHARED
+ bool "Port 2 IRQ is shared"
+ depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 2
+ help
+ Enable handling of port 2 PD interrupts signalled by an IRQ that is
+ shared by every other port enabled in this section.
+
+config PLATFORM_EC_USB_PD_PORT_3_SHARED
+ bool "Port 3 IRQ is shared"
+ depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 3
+ help
+ Enable handling of port 3 PD interrupts signalled by an IRQ that is
+ shared by every other port enabled in this section.
+
+endif # PLATFORM_EC_USB_PD_INT_SHARED
+
+endif # PLATFORM_EC_USB_POWER_DELIVERY
+endif # PLATFORM_EC_USBC
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index 5a3d5240e9..570d82ac9b 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -15,6 +15,7 @@ menuconfig PLATFORM_EC_USBC
including Display Port, Thunderbolt, and USB4.
rsource "Kconfig.retimer"
+rsource "Kconfig.pd_int_shared"
if PLATFORM_EC_USBC
@@ -96,45 +97,6 @@ menuconfig PLATFORM_EC_USB_POWER_DELIVERY
if PLATFORM_EC_USB_POWER_DELIVERY
-menuconfig PLATFORM_EC_USB_PD_INT_SHARED
- bool "USB-C ports share PD interrupts"
- select HAS_TASK_PD_INT_SHARED
- help
- This enables processing of shared interrupts where multiple ports
- share a single IRQ on the EC. Only one shared IRQ is supported,
- but any combination of ports can be serviced by that one IRQ.
-
-if PLATFORM_EC_USB_PD_INT_SHARED
-
-config PLATFORM_EC_USB_PD_PORT_0_SHARED
- bool "Port 0 IRQ is shared"
- help
- Enable handling of port 0 PD interrupts signalled by an IRQ that is
- shared by every other port enabled in this section.
-
-config PLATFORM_EC_USB_PD_PORT_1_SHARED
- bool "Port 1 IRQ is shared"
- depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 1
- help
- Enable handling of port 1 PD interrupts signalled by an IRQ that is
- shared by every other port enabled in this section.
-
-config PLATFORM_EC_USB_PD_PORT_2_SHARED
- bool "Port 2 IRQ is shared"
- depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 2
- help
- Enable handling of port 2 PD interrupts signalled by an IRQ that is
- shared by every other port enabled in this section.
-
-config PLATFORM_EC_USB_PD_PORT_3_SHARED
- bool "Port 3 IRQ is shared"
- depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 3
- help
- Enable handling of port 3 PD interrupts signalled by an IRQ that is
- shared by every other port enabled in this section.
-
-endif # PLATFORM_EC_USB_PD_INT_SHARED
-
config PLATFORM_EC_USB_PD_HOST_CMD
bool "Host commands related to USB Power Delivery"
default y