summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baseboard/zork/variant_dalboz.c2
-rw-r--r--baseboard/zork/variant_trembyle.c2
-rw-r--r--driver/ioexpander/ioexpander_nct38xx.c2
-rw-r--r--driver/ioexpander/ioexpander_nct38xx.h33
-rw-r--r--driver/tcpm/nct38xx.c1
-rw-r--r--driver/tcpm/nct38xx.h18
6 files changed, 21 insertions, 37 deletions
diff --git a/baseboard/zork/variant_dalboz.c b/baseboard/zork/variant_dalboz.c
index 8e9b04802f..01a30ab19c 100644
--- a/baseboard/zork/variant_dalboz.c
+++ b/baseboard/zork/variant_dalboz.c
@@ -6,12 +6,12 @@
#include "common.h"
#include "console.h"
#include "driver/ioexpander/pcal6408.h"
+#include "driver/tcpm/nct38xx.h"
#include "driver/usb_mux/amd_fp5.h"
#include "gpio.h"
#include "hooks.h"
#include "i2c.h"
#include "ioexpander.h"
-#include "ioexpander_nct38xx.h"
#include "usb_mux.h"
/*****************************************************************************
diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c
index 65ab0ae19b..42e5e6e77f 100644
--- a/baseboard/zork/variant_trembyle.c
+++ b/baseboard/zork/variant_trembyle.c
@@ -9,6 +9,7 @@
#include "driver/retimer/pi3dpx1207.h"
#include "driver/retimer/ps8802.h"
#include "driver/retimer/ps8818.h"
+#include "driver/tcpm/nct38xx.h"
#include "driver/usb_mux/amd_fp5.h"
#include "fan.h"
#include "fan_chip.h"
@@ -16,7 +17,6 @@
#include "hooks.h"
#include "i2c.h"
#include "ioexpander.h"
-#include "ioexpander_nct38xx.h"
#include "timer.h"
#include "usb_mux.h"
diff --git a/driver/ioexpander/ioexpander_nct38xx.c b/driver/ioexpander/ioexpander_nct38xx.c
index e7fe3d9453..ae7957e013 100644
--- a/driver/ioexpander/ioexpander_nct38xx.c
+++ b/driver/ioexpander/ioexpander_nct38xx.c
@@ -10,7 +10,7 @@
#include "gpio.h"
#include "i2c.h"
#include "ioexpander.h"
-#include "ioexpander_nct38xx.h"
+#include "nct38xx.h"
#include "tcpci.h"
#define CPRINTF(format, args...) cprintf(CC_GPIO, format, ## args)
diff --git a/driver/ioexpander/ioexpander_nct38xx.h b/driver/ioexpander/ioexpander_nct38xx.h
deleted file mode 100644
index 56dfe76e04..0000000000
--- a/driver/ioexpander/ioexpander_nct38xx.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 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.
- */
-
-#ifndef __CROS_EC_IOEXPANDER_NCT38XX_H
-#define __CROS_EC_IOEXPANDER_NCT38XX_H
-/*
- * NCT38XX registers are defined in the driver/tcpm/nct38xx.h.
- * No matter they are used by TCPC or IO Expander driver.
- */
-#include "nct38xx.h"
-
-/*
- * The interrupt handler to handle Vendor Define ALERT event from IOEX chip.
- *
- * Normally, the Vendor Define event should be checked by the NCT38XX TCPCI
- * driver's tcpc_alert function.
- * This function is only included when NCT38XX TCPC driver is not included.
- * (i.e. CONFIG_USB_PD_TCPM_NCT38XX is not defined)
- */
-void nct38xx_ioex_handle_alert(int ioex);
-
-/*
- * Check which IO's interrupt event is triggered. If any, call its
- * registered interrupt handler.
- */
-int nct38xx_ioex_event_handler(int ioex);
-
-extern const struct ioexpander_drv nct38xx_ioexpander_drv;
-
-#endif /* defined(__CROS_EC_IOEXPANDER_NCT38XX_H) */
diff --git a/driver/tcpm/nct38xx.c b/driver/tcpm/nct38xx.c
index 654ae6a999..c9e78935d0 100644
--- a/driver/tcpm/nct38xx.c
+++ b/driver/tcpm/nct38xx.c
@@ -9,7 +9,6 @@
#include "common.h"
#include "console.h"
#include "hooks.h"
-#include "ioexpander_nct38xx.h"
#include "nct38xx.h"
#include "task.h"
#include "tcpci.h"
diff --git a/driver/tcpm/nct38xx.h b/driver/tcpm/nct38xx.h
index 970c1c8c85..65bddf22b1 100644
--- a/driver/tcpm/nct38xx.h
+++ b/driver/tcpm/nct38xx.h
@@ -65,4 +65,22 @@
extern const struct tcpm_drv nct38xx_tcpm_drv;
+/*
+ * The interrupt handler to handle Vendor Define ALERT event from IOEX chip.
+ *
+ * Normally, the Vendor Define event should be checked by the NCT38XX TCPCI
+ * driver's tcpc_alert function.
+ * This function is only included when NCT38XX TCPC driver is not included.
+ * (i.e. CONFIG_USB_PD_TCPM_NCT38XX is not defined)
+ */
+void nct38xx_ioex_handle_alert(int ioex);
+
+/*
+ * Check which IO's interrupt event is triggered. If any, call its
+ * registered interrupt handler.
+ */
+int nct38xx_ioex_event_handler(int ioex);
+
+extern const struct ioexpander_drv nct38xx_ioexpander_drv;
+
#endif /* defined(__CROS_EC_USB_PD_TCPM_NCT38XX_H) */