summaryrefslogtreecommitdiff
path: root/zephyr/projects/skyrim/src/winterhold/ppc_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/projects/skyrim/src/winterhold/ppc_config.c')
-rw-r--r--zephyr/projects/skyrim/src/winterhold/ppc_config.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/zephyr/projects/skyrim/src/winterhold/ppc_config.c b/zephyr/projects/skyrim/src/winterhold/ppc_config.c
new file mode 100644
index 0000000000..72ddb6ce6c
--- /dev/null
+++ b/zephyr/projects/skyrim/src/winterhold/ppc_config.c
@@ -0,0 +1,27 @@
+/* Copyright 2022 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Winterhold board-specific PPC code */
+
+#include <zephyr/drivers/gpio.h>
+
+#include "driver/ppc/nx20p348x.h"
+#include "usbc_ppc.h"
+
+void ppc_interrupt(enum gpio_signal signal)
+{
+ switch (signal) {
+ case GPIO_USB_C0_PPC_INT_ODL:
+ nx20p348x_interrupt(0);
+ break;
+
+ case GPIO_USB_C1_PPC_INT_ODL:
+ nx20p348x_interrupt(1);
+ break;
+
+ default:
+ break;
+ }
+}