summaryrefslogtreecommitdiff
path: root/driver/tcpm
diff options
context:
space:
mode:
Diffstat (limited to 'driver/tcpm')
-rw-r--r--driver/tcpm/anx7447.c2
-rw-r--r--driver/tcpm/anx7447.h2
-rw-r--r--driver/tcpm/anx74xx.c2
-rw-r--r--driver/tcpm/fusb302.c2
-rw-r--r--driver/tcpm/it83xx.c4
-rw-r--r--driver/tcpm/it83xx_pd.h4
-rw-r--r--driver/tcpm/it8xxx2.c4
-rw-r--r--driver/tcpm/nct38xx.c3
-rw-r--r--driver/tcpm/ps8xxx.h3
-rw-r--r--driver/tcpm/rt1718s.h2
-rw-r--r--driver/tcpm/stm32gx.c4
-rw-r--r--driver/tcpm/tcpci.c7
-rw-r--r--driver/tcpm/tusb422.c2
13 files changed, 19 insertions, 22 deletions
diff --git a/driver/tcpm/anx7447.c b/driver/tcpm/anx7447.c
index 4b8d82c034..8c21f77536 100644
--- a/driver/tcpm/anx7447.c
+++ b/driver/tcpm/anx7447.c
@@ -5,9 +5,9 @@
/* ANX7447 port manager */
-#include "anx7447.h"
#include "builtin/assert.h"
#include "common.h"
+#include "anx7447.h"
#include "console.h"
#include "hooks.h"
#include "tcpm/tcpci.h"
diff --git a/driver/tcpm/anx7447.h b/driver/tcpm/anx7447.h
index 56d810574d..42de7502f1 100644
--- a/driver/tcpm/anx7447.h
+++ b/driver/tcpm/anx7447.h
@@ -3,8 +3,8 @@
* found in the LICENSE file.
*/
-#include "driver/tcpm/anx7447_public.h"
#include "usb_mux.h"
+#include "driver/tcpm/anx7447_public.h"
/* USB Power delivery port management */
diff --git a/driver/tcpm/anx74xx.c b/driver/tcpm/anx74xx.c
index e6ad23c25a..64a9271f1c 100644
--- a/driver/tcpm/anx74xx.c
+++ b/driver/tcpm/anx74xx.c
@@ -7,8 +7,8 @@
/* Type-C port manager for Analogix's anx74xx chips */
-#include "anx74xx.h"
#include "console.h"
+#include "anx74xx.h"
#include "task.h"
#include "tcpm/tcpci.h"
#include "tcpm/tcpm.h"
diff --git a/driver/tcpm/fusb302.c b/driver/tcpm/fusb302.c
index 3f11e568d0..4b4a15c711 100644
--- a/driver/tcpm/fusb302.c
+++ b/driver/tcpm/fusb302.c
@@ -9,8 +9,8 @@
#include "console.h"
#include "fusb302.h"
-#include "hooks.h"
#include "task.h"
+#include "hooks.h"
#include "tcpm/tcpci.h"
#include "tcpm/tcpm.h"
#include "timer.h"
diff --git a/driver/tcpm/it83xx.c b/driver/tcpm/it83xx.c
index d04cb2f597..0b636e2e89 100644
--- a/driver/tcpm/it83xx.c
+++ b/driver/tcpm/it83xx.c
@@ -9,17 +9,17 @@
#include "common.h"
#include "config.h"
#include "console.h"
-#include "hooks.h"
#include "it83xx_pd.h"
#include "registers.h"
#include "system.h"
#include "task.h"
#include "tcpm/tcpci.h"
#include "timer.h"
+#include "util.h"
#include "usb_common.h"
#include "usb_pd.h"
#include "usb_pd_tcpm.h"
-#include "util.h"
+#include "hooks.h"
#ifdef CONFIG_USB_PD_TCPMV1
#if defined(CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE) || \
diff --git a/driver/tcpm/it83xx_pd.h b/driver/tcpm/it83xx_pd.h
index 2cb63aa22f..1ab76e2b79 100644
--- a/driver/tcpm/it83xx_pd.h
+++ b/driver/tcpm/it83xx_pd.h
@@ -7,10 +7,10 @@
#ifndef __CROS_EC_DRIVER_TCPM_IT83XX_H
#define __CROS_EC_DRIVER_TCPM_IT83XX_H
-#include "driver/tcpm/it8xxx2_pd_public.h"
-
#include <stdint.h>
+#include "driver/tcpm/it8xxx2_pd_public.h"
+
/* USBPD Controller */
#if defined(CONFIG_USB_PD_TCPM_DRIVER_IT83XX)
#define IT83XX_USBPD_BASE(port) (0x00F03700 + (0x100 * (port)))
diff --git a/driver/tcpm/it8xxx2.c b/driver/tcpm/it8xxx2.c
index 9bf50e1335..6782b528e5 100644
--- a/driver/tcpm/it8xxx2.c
+++ b/driver/tcpm/it8xxx2.c
@@ -9,17 +9,17 @@
#include "common.h"
#include "config.h"
#include "console.h"
-#include "hooks.h"
#include "it83xx_pd.h"
#include "ite_pd_intc.h"
#include "registers.h"
#include "system.h"
#include "task.h"
#include "timer.h"
+#include "util.h"
#include "usb_common.h"
#include "usb_pd.h"
#include "usb_pd_tcpm.h"
-#include "util.h"
+#include "hooks.h"
#ifdef CONFIG_USB_PD_TCPMV1
#if defined(CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE) || \
diff --git a/driver/tcpm/nct38xx.c b/driver/tcpm/nct38xx.c
index 120749fb62..e3a9fc04a2 100644
--- a/driver/tcpm/nct38xx.c
+++ b/driver/tcpm/nct38xx.c
@@ -15,10 +15,9 @@
#include "usb_common.h"
#ifdef CONFIG_ZEPHYR
-#include "usbc/tcpc_nct38xx.h"
-
#include <zephyr/device.h>
#include <zephyr/drivers/gpio/gpio_nct38xx.h>
+#include "usbc/tcpc_nct38xx.h"
#endif
#if defined(CONFIG_ZEPHYR) && defined(CONFIG_IO_EXPANDER_NCT38XX)
diff --git a/driver/tcpm/ps8xxx.h b/driver/tcpm/ps8xxx.h
index ed3197c822..7d873abc85 100644
--- a/driver/tcpm/ps8xxx.h
+++ b/driver/tcpm/ps8xxx.h
@@ -2,9 +2,10 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "driver/tcpm/ps8xxx_public.h"
#include "usb_mux.h"
+#include "driver/tcpm/ps8xxx_public.h"
+
/* Parade Tech Type-C port controller */
#ifndef __CROS_EC_USB_PD_TCPM_PS8XXX_H
diff --git a/driver/tcpm/rt1718s.h b/driver/tcpm/rt1718s.h
index 8ff977e26b..f7c821ba53 100644
--- a/driver/tcpm/rt1718s.h
+++ b/driver/tcpm/rt1718s.h
@@ -6,9 +6,9 @@
#define __CROS_EC_USB_PD_TCPM_RT1718S_H
#include "tcpm/rt1718s_public.h"
+#include "util.h"
#include "usb_charge.h"
#include "usb_pd_tcpm.h"
-#include "util.h"
/* RT1718S Private RegMap */
#define RT1718S_PHYCTRL1 0x80
diff --git a/driver/tcpm/stm32gx.c b/driver/tcpm/stm32gx.c
index 029570faca..77a436b2ac 100644
--- a/driver/tcpm/stm32gx.c
+++ b/driver/tcpm/stm32gx.c
@@ -9,16 +9,16 @@
#include "common.h"
#include "config.h"
#include "console.h"
-#include "hooks.h"
#include "registers.h"
#include "stm32gx.h"
#include "system.h"
#include "task.h"
#include "tcpm/tcpci.h"
#include "timer.h"
+#include "util.h"
#include "usb_pd.h"
#include "usb_pd_tcpm.h"
-#include "util.h"
+#include "hooks.h"
/*
* STM32G4 UCPD peripheral does not have the ability to detect VBUS, but
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index 243ca94bd5..6e8a1feaf9 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -5,8 +5,8 @@
/* Type-C port manager */
-#include "anx74xx.h"
#include "atomic.h"
+#include "anx74xx.h"
#include "compile_time_macros.h"
#include "console.h"
#include "ec_commands.h"
@@ -1848,7 +1848,7 @@ static const struct tcpc_reg_dump_map tcpc_regs[] = {
/*
* Dump standard TCPC registers.
*/
-test_mockable void tcpc_dump_std_registers(int port)
+void tcpc_dump_std_registers(int port)
{
tcpc_dump_registers(port, tcpc_regs, ARRAY_SIZE(tcpc_regs));
}
@@ -1890,9 +1890,6 @@ const struct tcpm_drv tcpci_tcpm_drv = {
#ifdef CONFIG_USB_PD_TCPC_LOW_POWER
.enter_low_power_mode = &tcpci_enter_low_power_mode,
#endif
-#ifdef CONFIG_USB_PD_FRS_TCPC
- .set_frs_enable = &tcpci_tcpc_fast_role_swap_enable,
-#endif
.set_bist_test_mode = &tcpci_set_bist_test_mode,
.get_bist_test_mode = &tcpci_get_bist_test_mode,
#ifdef CONFIG_CMD_TCPC_DUMP
diff --git a/driver/tcpm/tusb422.c b/driver/tcpm/tusb422.c
index 79554bd0cf..6d12d1758b 100644
--- a/driver/tcpm/tusb422.c
+++ b/driver/tcpm/tusb422.c
@@ -6,10 +6,10 @@
/* Type-C port manager for TI TUSB422 Port Controller */
#include "common.h"
+#include "tusb422.h"
#include "tcpm/tcpci.h"
#include "tcpm/tcpm.h"
#include "timer.h"
-#include "tusb422.h"
#include "usb_pd.h"
#ifndef CONFIG_USB_PD_TCPM_TCPCI