summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-11-23 11:29:10 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-30 02:05:04 +0000
commita147fd5e333e940ff831cd09964ca855b3f78755 (patch)
tree8c616c254360b4568ec66aeb8341a698ca64f829
parent91ba2792dbe8eebedac3f921734ade520e7645d7 (diff)
downloadchrome-ec-a147fd5e333e940ff831cd09964ca855b3f78755.tar.gz
test: Sort header files
Sort all includes in test with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Iae52f99a3a8b5623c1c92722c325ca92816fa856 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4052760 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--core/cortex-m/include/mpu_private.h3
-rw-r--r--test/abort.c4
-rw-r--r--test/accel_cal.c5
-rw-r--r--test/always_memset.c5
-rw-r--r--test/base32.c5
-rw-r--r--test/button.c4
-rw-r--r--test/cec.c4
-rw-r--r--test/compile_time_macros.c2
-rw-r--r--test/console_edit.c4
-rw-r--r--test/cortexm_fpu.c3
-rw-r--r--test/entropy.c2
-rw-r--r--test/fake_usbc.c2
-rw-r--r--test/fp.c1
-rw-r--r--test/fpsensor.c8
-rw-r--r--test/fpsensor_crypto.c4
-rw-r--r--test/fpsensor_state.c4
-rw-r--r--test/ftrapv.c4
-rw-r--r--test/gyro_cal.c7
-rw-r--r--test/gyro_cal_init_for_test.c3
-rw-r--r--test/interrupt.c4
-rw-r--r--test/kasa.c3
-rw-r--r--test/kb_8042.c3
-rw-r--r--test/libc_printf.c4
-rw-r--r--test/lightbar.c2
-rw-r--r--test/mag_cal.c1
-rw-r--r--test/math_util.c5
-rw-r--r--test/motion_angle.c6
-rw-r--r--test/motion_angle_tablet.c6
-rw-r--r--test/motion_lid.c6
-rw-r--r--test/motion_sense_fifo.c11
-rw-r--r--test/mpu.c3
-rw-r--r--test/mutex.c2
-rw-r--r--test/newton_fit.c3
-rw-r--r--test/nvidia_gpu.c5
-rw-r--r--test/online_calibration.c1
-rw-r--r--test/online_calibration_spoof.c5
-rw-r--r--test/panic_data.c3
-rw-r--r--test/powerdemo.c2
-rw-r--r--test/printf.c8
-rw-r--r--test/rgb_keyboard.c4
-rw-r--r--test/rollback.c3
-rw-r--r--test/rollback_secret.c4
-rw-r--r--test/rsa.c2
-rw-r--r--test/rtc.c2
-rw-r--r--test/sha256.c2
-rw-r--r--test/shmalloc.c10
-rw-r--r--test/stdlib.c2
-rw-r--r--test/stillness_detector.c3
-rw-r--r--test/system_is_locked.c3
-rw-r--r--test/uptime.c4
-rw-r--r--test/usb_pd_console.c4
-rw-r--r--test/usb_pd_int.c4
-rw-r--r--test/usb_pe_drp.c14
-rw-r--r--test/usb_pe_drp_noextended.c6
-rw-r--r--test/usb_pe_drp_old.c2
-rw-r--r--test/usb_prl_noextended.c2
-rw-r--r--test/usb_prl_old.c2
-rw-r--r--test/usb_sm_checks.c2
-rw-r--r--test/usb_sm_framework_h3.c2
-rw-r--r--test/usb_tcpmv2_compliance_common.c2
-rw-r--r--test/usb_tcpmv2_td_pd_ll_e3.c2
-rw-r--r--test/usb_tcpmv2_td_pd_ll_e4.c2
-rw-r--r--test/usb_tcpmv2_td_pd_ll_e5.c2
-rw-r--r--test/usb_tcpmv2_td_pd_other.c4
-rw-r--r--test/usb_tcpmv2_td_pd_src3_e1.c2
-rw-r--r--test/usb_tcpmv2_td_pd_src3_e7.c4
-rw-r--r--test/usb_tcpmv2_td_pd_src3_e8.c4
-rw-r--r--test/usb_tcpmv2_td_pd_src3_e9.c4
-rw-r--r--test/usb_tcpmv2_td_pd_src_e1.c2
-rw-r--r--test/usb_tcpmv2_td_pd_src_e2.c2
-rw-r--r--test/usb_tcpmv2_td_pd_src_e5.c2
-rw-r--r--test/usb_tcpmv2_td_pd_vndi3_e3.c2
-rw-r--r--test/usb_test/device_configuration.c5
-rw-r--r--test/usb_typec_ctvpd.c6
-rw-r--r--test/utils_str.c2
-rw-r--r--test/vboot.c4
-rw-r--r--test/version.c2
-rw-r--r--test/vpd_api.c4
78 files changed, 152 insertions, 139 deletions
diff --git a/core/cortex-m/include/mpu_private.h b/core/cortex-m/include/mpu_private.h
index eb9de4c395..fc7617da66 100644
--- a/core/cortex-m/include/mpu_private.h
+++ b/core/cortex-m/include/mpu_private.h
@@ -12,6 +12,9 @@
#ifndef __CROS_EC_MPU_PRIVATE_H
#define __CROS_EC_MPU_PRIVATE_H
+#include <stdbool.h>
+#include <stdint.h>
+
int mpu_num_regions(void);
bool has_mpu(void);
bool mpu_is_unified(void);
diff --git a/test/abort.c b/test/abort.c
index e0069e920f..dcc798861e 100644
--- a/test/abort.c
+++ b/test/abort.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <stdlib.h>
-
#include "common.h"
#include "panic.h"
#include "system.h"
#include "task.h"
#include "test_util.h"
+#include <stdlib.h>
+
test_static int test_abort(void)
{
ccprintf("Calling abort\n");
diff --git a/test/accel_cal.c b/test/accel_cal.c
index 481d0615f2..5c50211bd5 100644
--- a/test/accel_cal.c
+++ b/test/accel_cal.c
@@ -3,10 +3,11 @@
* found in the LICENSE file.
*/
-#include "common.h"
#include "accel_cal.h"
-#include "test_util.h"
+#include "common.h"
#include "motion_sense.h"
+#include "test_util.h"
+
#include <math.h>
struct motion_sensor_t motion_sensors[] = {};
diff --git a/test/always_memset.c b/test/always_memset.c
index 40a68d883b..eed15cab27 100644
--- a/test/always_memset.c
+++ b/test/always_memset.c
@@ -10,12 +10,11 @@
* If optimization is disabled, the test_optimization_working test will fail.
*/
-#include <string.h>
-
#include "common.h"
+#include "cryptoc/util.h"
#include "test_util.h"
-#include "cryptoc/util.h"
+#include <string.h>
/* 256 bytes of stack is only safe enough for a memcpy. */
#define EXTRA_STACK_SIZE 256
diff --git a/test/base32.c b/test/base32.c
index c1ec489ea0..50b9d994c1 100644
--- a/test/base32.c
+++ b/test/base32.c
@@ -5,12 +5,13 @@
* Test Base-32 encoding/decoding
*/
-#include <stdio.h>
-#include "common.h"
#include "base32.h"
+#include "common.h"
#include "test_util.h"
#include "util.h"
+#include <stdio.h>
+
DECLARE_EC_TEST(test_crc5)
{
uint32_t seen;
diff --git a/test/button.c b/test/button.c
index c1acba7048..3a46625660 100644
--- a/test/button.c
+++ b/test/button.c
@@ -15,10 +15,10 @@
#include "console.h"
#include "gpio.h"
#include "host_command.h"
-#include "test_util.h"
-#include "timer.h"
#include "keyboard_config.h"
#include "keyboard_protocol.h"
+#include "test_util.h"
+#include "timer.h"
#include "util.h"
#define UNCHANGED -1
diff --git a/test/cec.c b/test/cec.c
index 7718b7b705..6d385665a8 100644
--- a/test/cec.c
+++ b/test/cec.c
@@ -5,11 +5,11 @@
* Test the buffer handling of HDMI CEC
*/
-#include <string.h>
-
#include "cec.h"
#include "test_util.h"
+#include <string.h>
+
struct overflow_msg {
struct cec_msg_transfer transfer;
uint8_t overflow_detector;
diff --git a/test/compile_time_macros.c b/test/compile_time_macros.c
index 544da9e0d8..5e5d716627 100644
--- a/test/compile_time_macros.c
+++ b/test/compile_time_macros.c
@@ -5,8 +5,8 @@
* Test compile_time_macros.h
*/
-#include "stdbool.h"
#include "common.h"
+#include "stdbool.h"
#include "test_util.h"
static int test_BIT(void)
diff --git a/test/console_edit.c b/test/console_edit.c
index b9753468fd..5ec649be5f 100644
--- a/test/console_edit.c
+++ b/test/console_edit.c
@@ -7,11 +7,11 @@
#include "common.h"
#include "console.h"
+#include "ec_commands.h"
#include "test_util.h"
#include "timer.h"
-#include "util.h"
#include "uart.h"
-#include "ec_commands.h"
+#include "util.h"
static int cmd_1_call_cnt;
static int cmd_2_call_cnt;
diff --git a/test/cortexm_fpu.c b/test/cortexm_fpu.c
index c27edbaf40..f31ec63535 100644
--- a/test/cortexm_fpu.c
+++ b/test/cortexm_fpu.c
@@ -3,12 +3,11 @@
* found in the LICENSE file.
*/
-#include "test_util.h"
-
#include "cpu.h"
#include "math.h"
#include "registers.h"
#include "task.h"
+#include "test_util.h"
#include "time.h"
static volatile uint32_t fpscr;
diff --git a/test/entropy.c b/test/entropy.c
index 8fbdb9147f..abac349d76 100644
--- a/test/entropy.c
+++ b/test/entropy.c
@@ -5,8 +5,8 @@
* Tests entropy source.
*/
-#include "console.h"
#include "common.h"
+#include "console.h"
#include "rollback.h"
#include "test_util.h"
#include "timer.h"
diff --git a/test/fake_usbc.c b/test/fake_usbc.c
index 72a208aa99..6a2cab09aa 100644
--- a/test/fake_usbc.c
+++ b/test/fake_usbc.c
@@ -5,9 +5,9 @@
* Test USB Type-C module.
*/
#include "common.h"
-#include "usb_tc_sm.h"
#include "usb_pd.h"
#include "usb_pd_tcpm.h"
+#include "usb_tc_sm.h"
__overridable int pd_is_vbus_present(int port)
{
diff --git a/test/fp.c b/test/fp.c
index ab41868578..135670f47a 100644
--- a/test/fp.c
+++ b/test/fp.c
@@ -8,7 +8,6 @@
* early. e.g. CONFIG_FPU, which is needed in math_util.h.
*/
#include "common.h"
-
#include "mat33.h"
#include "mat44.h"
#include "math.h"
diff --git a/test/fpsensor.c b/test/fpsensor.c
index 588374d4db..2daaa0d2cf 100644
--- a/test/fpsensor.c
+++ b/test/fpsensor.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <stddef.h>
-#include <stdbool.h>
-
+#include "common/fpsensor/fpsensor_private.h"
#include "ec_commands.h"
#include "mock/fpsensor_detect_mock.h"
#include "string.h"
#include "test_util.h"
-#include "common/fpsensor/fpsensor_private.h"
+
+#include <stdbool.h>
+#include <stddef.h>
static const struct ec_response_get_protocol_info expected_info[] = {
[FP_TRANSPORT_TYPE_SPI] = {
diff --git a/test/fpsensor_crypto.c b/test/fpsensor_crypto.c
index 9265a608b4..238f2b3452 100644
--- a/test/fpsensor_crypto.c
+++ b/test/fpsensor_crypto.c
@@ -3,8 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdbool.h>
-
#include "builtin/assert.h"
#include "common.h"
#include "ec_commands.h"
@@ -17,6 +15,8 @@
#include "test_util.h"
#include "util.h"
+#include <stdbool.h>
+
extern int get_ikm(uint8_t *ikm);
static const uint8_t fake_positive_match_salt[] = {
diff --git a/test/fpsensor_state.c b/test/fpsensor_state.c
index 0b61e1c2d4..771523b33b 100644
--- a/test/fpsensor_state.c
+++ b/test/fpsensor_state.c
@@ -3,8 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdbool.h>
-
#include "common.h"
#include "ec_commands.h"
#include "fpsensor_state.h"
@@ -12,6 +10,8 @@
#include "test_util.h"
#include "util.h"
+#include <stdbool.h>
+
test_static int test_fp_enc_status_valid_flags(void)
{
/* Putting expected value here because test_static should take void */
diff --git a/test/ftrapv.c b/test/ftrapv.c
index 60d76d25d0..1aefb8404f 100644
--- a/test/ftrapv.c
+++ b/test/ftrapv.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <stdlib.h>
-
#include "common.h"
#include "panic.h"
#include "system.h"
#include "task.h"
#include "test_util.h"
+#include <stdlib.h>
+
/*
* trapping addition: __addvsi3.
*/
diff --git a/test/gyro_cal.c b/test/gyro_cal.c
index c8e8d30589..cf9af0fdbc 100644
--- a/test/gyro_cal.c
+++ b/test/gyro_cal.c
@@ -5,14 +5,15 @@
#include "common.h"
#include "gyro_cal.h"
-#include "gyro_still_det.h"
#include "gyro_cal_init_for_test.h"
+#include "gyro_still_det.h"
#include "motion_sense.h"
#include "test_util.h"
-#include <string.h>
-#include <stdlib.h>
+
#include <math.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
float kToleranceGyroRps = 1e-6f;
float kDefaultGravityMps2 = 9.81f;
diff --git a/test/gyro_cal_init_for_test.c b/test/gyro_cal_init_for_test.c
index 0ba1a65e6b..ebb1dd8799 100644
--- a/test/gyro_cal_init_for_test.c
+++ b/test/gyro_cal_init_for_test.c
@@ -4,8 +4,9 @@
*/
#include "common.h"
-#include "timer.h"
#include "gyro_cal_init_for_test.h"
+#include "timer.h"
+
#include <string.h>
#define NANO_PI (3.14159265359f)
diff --git a/test/interrupt.c b/test/interrupt.c
index efd8b47a34..fbd35253e8 100644
--- a/test/interrupt.c
+++ b/test/interrupt.c
@@ -4,8 +4,6 @@
*
* Test interrupt support of EC emulator.
*/
-#include <stdio.h>
-
#include "common.h"
#include "console.h"
#include "task.h"
@@ -13,6 +11,8 @@
#include "timer.h"
#include "util.h"
+#include <stdio.h>
+
static int main_count;
static int has_error;
static int interrupt_count;
diff --git a/test/kasa.c b/test/kasa.c
index 23968faf7c..222fb2a0cf 100644
--- a/test/kasa.c
+++ b/test/kasa.c
@@ -5,8 +5,9 @@
#include "common.h"
#include "kasa.h"
-#include "test_util.h"
#include "motion_sense.h"
+#include "test_util.h"
+
#include <stdio.h>
struct motion_sensor_t motion_sensors[] = {};
diff --git a/test/kb_8042.c b/test/kb_8042.c
index eb043d5f82..0065319576 100644
--- a/test/kb_8042.c
+++ b/test/kb_8042.c
@@ -5,7 +5,6 @@
* Tests for keyboard MKBP protocol
*/
-#include <stdbool.h>
#include "atkbd_protocol.h"
#include "common.h"
#include "console.h"
@@ -24,6 +23,8 @@
#include "timer.h"
#include "util.h"
+#include <stdbool.h>
+
static const char *action[2] = { "release", "press" };
/*
diff --git a/test/libc_printf.c b/test/libc_printf.c
index b3f5f03605..8900d9ea04 100644
--- a/test/libc_printf.c
+++ b/test/libc_printf.c
@@ -3,10 +3,10 @@
* found in the LICENSE file.
*/
-#include <stdio.h>
-
#include "test_util.h"
+#include <stdio.h>
+
test_static int test_printf(void)
{
/*
diff --git a/test/lightbar.c b/test/lightbar.c
index 90400d1cf5..d51b61779e 100644
--- a/test/lightbar.c
+++ b/test/lightbar.c
@@ -5,8 +5,8 @@
#include "console.h"
#include "ec_commands.h"
-#include "lightbar.h"
#include "host_command.h"
+#include "lightbar.h"
#include "test_util.h"
#include "timer.h"
#include "util.h"
diff --git a/test/mag_cal.c b/test/mag_cal.c
index 245bad786c..fe98318258 100644
--- a/test/mag_cal.c
+++ b/test/mag_cal.c
@@ -6,6 +6,7 @@
#include "common.h"
#include "mag_cal.h"
#include "test_util.h"
+
#include <stdio.h>
/**
diff --git a/test/math_util.c b/test/math_util.c
index 1ee9b1484b..c08bd0c561 100644
--- a/test/math_util.c
+++ b/test/math_util.c
@@ -5,14 +5,15 @@
* Test motion sense code.
*/
-#include <math.h>
-#include <stdio.h>
#include "common.h"
#include "math_util.h"
#include "motion_sense.h"
#include "test_util.h"
#include "util.h"
+#include <math.h>
+#include <stdio.h>
+
/*****************************************************************************/
/*
* Need to define motion sensor globals just to compile.
diff --git a/test/motion_angle.c b/test/motion_angle.c
index 3f206de078..8eb1a775e4 100644
--- a/test/motion_angle.c
+++ b/test/motion_angle.c
@@ -6,9 +6,6 @@
* transition.
*/
-#include <math.h>
-#include <stdio.h>
-
#include "accelgyro.h"
#include "common.h"
#include "gpio.h"
@@ -20,6 +17,9 @@
#include "test_util.h"
#include "util.h"
+#include <math.h>
+#include <stdio.h>
+
/*****************************************************************************/
/* Test utilities */
diff --git a/test/motion_angle_tablet.c b/test/motion_angle_tablet.c
index 2c0c15c828..2f458381b3 100644
--- a/test/motion_angle_tablet.c
+++ b/test/motion_angle_tablet.c
@@ -5,9 +5,6 @@
* Test motion sense code, when in tablet mode.
*/
-#include <math.h>
-#include <stdio.h>
-
#include "accelgyro.h"
#include "common.h"
#include "gpio.h"
@@ -19,6 +16,9 @@
#include "test_util.h"
#include "util.h"
+#include <math.h>
+#include <stdio.h>
+
/*****************************************************************************/
/* Test utilities */
diff --git a/test/motion_lid.c b/test/motion_lid.c
index 39b83ce6fc..40e6dcb0f0 100644
--- a/test/motion_lid.c
+++ b/test/motion_lid.c
@@ -5,9 +5,6 @@
* Test motion sense code.
*/
-#include <math.h>
-#include <stdio.h>
-
#include "accelgyro.h"
#include "common.h"
#include "gpio.h"
@@ -20,6 +17,9 @@
#include "timer.h"
#include "util.h"
+#include <math.h>
+#include <stdio.h>
+
extern enum chipset_state_mask sensor_active;
extern int wait_us;
diff --git a/test/motion_sense_fifo.c b/test/motion_sense_fifo.c
index 5a977e94d0..3cea279bda 100644
--- a/test/motion_sense_fifo.c
+++ b/test/motion_sense_fifo.c
@@ -5,15 +5,16 @@
* Test motion_sense_fifo.
*/
+#include "accelgyro.h"
#include "ec_commands.h"
-#include "stdio.h"
-#include "motion_sense_fifo.h"
-#include "test_util.h"
-#include "util.h"
#include "hwtimer.h"
+#include "motion_sense_fifo.h"
+#include "stdio.h"
#include "task.h"
+#include "test_util.h"
#include "timer.h"
-#include "accelgyro.h"
+#include "util.h"
+
#include <sys/types.h>
mutex_t g_sensor_mutex;
diff --git a/test/mpu.c b/test/mpu.c
index 957111b901..dfc5877d5a 100644
--- a/test/mpu.c
+++ b/test/mpu.c
@@ -11,13 +11,14 @@
* 5. runtest on console
*/
-#include <stdbool.h>
#include "mpu.h"
#include "mpu_private.h"
#include "string.h"
#include "system.h"
#include "test_util.h"
+#include <stdbool.h>
+
struct mpu_info {
bool has_mpu;
int num_mpu_regions;
diff --git a/test/mutex.c b/test/mutex.c
index a03e504a0a..b4066c8c4f 100644
--- a/test/mutex.c
+++ b/test/mutex.c
@@ -6,8 +6,8 @@
* Tasks for mutexes basic tests.
*/
-#include "console.h"
#include "common.h"
+#include "console.h"
#include "task.h"
#include "test_util.h"
#include "timer.h"
diff --git a/test/newton_fit.c b/test/newton_fit.c
index 07c35aad2a..62f4710f0c 100644
--- a/test/newton_fit.c
+++ b/test/newton_fit.c
@@ -4,9 +4,10 @@
*/
#include "common.h"
-#include "newton_fit.h"
#include "motion_sense.h"
+#include "newton_fit.h"
#include "test_util.h"
+
#include <stdio.h>
/*
diff --git a/test/nvidia_gpu.c b/test/nvidia_gpu.c
index d6086cc8c4..b660943e04 100644
--- a/test/nvidia_gpu.c
+++ b/test/nvidia_gpu.c
@@ -4,12 +4,11 @@
*
* Tests for Nvidia GPU.
*/
-#include <stdio.h>
-
#include "charge_manager.h"
#include "charge_state.h"
#include "common.h"
#include "console.h"
+#include "driver/nvidia_gpu.h"
#include "hooks.h"
#include "host_command.h"
#include "task.h"
@@ -18,7 +17,7 @@
#include "timer.h"
#include "util.h"
-#include "driver/nvidia_gpu.h"
+#include <stdio.h>
struct d_notify_policy d_notify_policies[] = {
AC_ATLEAST_W(100), AC_ATLEAST_W(65), AC_DC,
diff --git a/test/online_calibration.c b/test/online_calibration.c
index cecb543eef..c845378012 100644
--- a/test/online_calibration.c
+++ b/test/online_calibration.c
@@ -10,6 +10,7 @@
#include "online_calibration.h"
#include "test_util.h"
#include "timer.h"
+
#include <stdio.h>
int mkbp_send_event(uint8_t event_type)
diff --git a/test/online_calibration_spoof.c b/test/online_calibration_spoof.c
index 44a3b812d9..31c17bb8dd 100644
--- a/test/online_calibration_spoof.c
+++ b/test/online_calibration_spoof.c
@@ -5,13 +5,14 @@
#include "accel_cal.h"
#include "accelgyro.h"
+#include "gyro_cal.h"
+#include "gyro_cal_init_for_test.h"
#include "hwtimer.h"
#include "mag_cal.h"
#include "online_calibration.h"
#include "test_util.h"
-#include "gyro_cal_init_for_test.h"
-#include "gyro_cal.h"
#include "timer.h"
+
#include <stdio.h>
int mkbp_send_event(uint8_t event_type)
diff --git a/test/panic_data.c b/test/panic_data.c
index 334b766dfc..8892c17ece 100644
--- a/test/panic_data.c
+++ b/test/panic_data.c
@@ -3,12 +3,11 @@
* found in the LICENSE file.
*/
-#include "test_util.h"
-
#include "builtin/assert.h"
#include "panic.h"
#include "system.h"
#include "task.h"
+#include "test_util.h"
static int get_assert_line(void)
{
diff --git a/test/powerdemo.c b/test/powerdemo.c
index 7a4f0c5ccb..2900401370 100644
--- a/test/powerdemo.c
+++ b/test/powerdemo.c
@@ -8,9 +8,9 @@
#include "clock.h"
#include "common.h"
#include "powerdemo.h"
+#include "registers.h"
#include "task.h"
#include "timer.h"
-#include "registers.h"
static volatile enum {
POWER_STATE_IDLE = 0, /* Idle */
diff --git a/test/printf.c b/test/printf.c
index 29ffdfcea4..7c037e22da 100644
--- a/test/printf.c
+++ b/test/printf.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stddef.h>
-
#include "common.h"
#include "compiler.h"
#include "printf.h"
#include "test_util.h"
#include "util.h"
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stddef.h>
+
#ifdef USE_BUILTIN_STDLIB
/*
* When USE_BUILTIN_STDLIB is defined, we want to test the EC printf
diff --git a/test/rgb_keyboard.c b/test/rgb_keyboard.c
index d32215e649..1b6ea1bf95 100644
--- a/test/rgb_keyboard.c
+++ b/test/rgb_keyboard.c
@@ -4,8 +4,6 @@
*
* Tests for RGB keyboard.
*/
-#include <stdio.h>
-
#include "common.h"
#include "console.h"
#include "keyboard_backlight.h"
@@ -15,6 +13,8 @@
#include "timer.h"
#include "util.h"
+#include <stdio.h>
+
#define RGB_GRID0_COL 11
#define RGB_GRID0_ROW 6
#define RGB_GRID1_COL 11
diff --git a/test/rollback.c b/test/rollback.c
index e2c1070ef4..6324fe86fc 100644
--- a/test/rollback.c
+++ b/test/rollback.c
@@ -3,12 +3,13 @@
* found in the LICENSE file.
*/
-#include <stdbool.h>
#include "flash.h"
#include "mpu.h"
#include "string.h"
#include "test_util.h"
+#include <stdbool.h>
+
struct rollback_info {
int region_0_offset;
int region_1_offset;
diff --git a/test/rollback_secret.c b/test/rollback_secret.c
index 4813814f19..46ecfa587b 100644
--- a/test/rollback_secret.c
+++ b/test/rollback_secret.c
@@ -3,8 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-
#include "mock/rollback_latest_mock.h"
#include "rollback.h"
#include "rollback_private.h"
@@ -12,6 +10,8 @@
#include "system.h"
#include "test_util.h"
+#include <stdint.h>
+
extern int get_latest_rollback(struct rollback_data *data);
test_static int test_get_rollback_secret_latest_rollback_fail(void)
diff --git a/test/rsa.c b/test/rsa.c
index 2774e9edb4..a63b274711 100644
--- a/test/rsa.c
+++ b/test/rsa.c
@@ -5,8 +5,8 @@
* Tests RSA implementation.
*/
-#include "console.h"
#include "common.h"
+#include "console.h"
#include "rsa.h"
#include "test_util.h"
#include "util.h"
diff --git a/test/rtc.c b/test/rtc.c
index 7c38c4fa6d..3a006498f2 100644
--- a/test/rtc.c
+++ b/test/rtc.c
@@ -5,8 +5,8 @@
* Tests for rtc time conversions
*/
-#include "console.h"
#include "common.h"
+#include "console.h"
#include "rtc.h"
#include "test_util.h"
#include "util.h"
diff --git a/test/sha256.c b/test/sha256.c
index 4b5326d189..0387d23175 100644
--- a/test/sha256.c
+++ b/test/sha256.c
@@ -5,8 +5,8 @@
* Tests SHA256 implementation.
*/
-#include "console.h"
#include "common.h"
+#include "console.h"
#include "sha256.h"
#include "test_util.h"
#include "util.h"
diff --git a/test/shmalloc.c b/test/shmalloc.c
index 899876ab43..f86efd4fa9 100644
--- a/test/shmalloc.c
+++ b/test/shmalloc.c
@@ -4,11 +4,6 @@
* found in the LICENSE file.
*/
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-
#include "common.h"
#include "compile_time_macros.h"
#include "console.h"
@@ -16,6 +11,11 @@
#include "shared_mem.h"
#include "test_util.h"
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+
/*
* Total size of memory in the malloc pool (shared between free and allocated
* buffers.
diff --git a/test/stdlib.c b/test/stdlib.c
index 909502aee8..3034522c23 100644
--- a/test/stdlib.c
+++ b/test/stdlib.c
@@ -8,9 +8,9 @@
#include "common.h"
#include "compiler.h"
#include "console.h"
-#include "system.h"
#include "printf.h"
#include "shared_mem.h"
+#include "system.h"
#include "test_util.h"
#include "timer.h"
#include "util.h"
diff --git a/test/stillness_detector.c b/test/stillness_detector.c
index 8858d751d7..2e82075e5e 100644
--- a/test/stillness_detector.c
+++ b/test/stillness_detector.c
@@ -3,10 +3,11 @@
* found in the LICENSE file.
*/
-#include "stillness_detector.h"
#include "motion_sense.h"
+#include "stillness_detector.h"
#include "test_util.h"
#include "timer.h"
+
#include <stdio.h>
/*****************************************************************************/
diff --git a/test/system_is_locked.c b/test/system_is_locked.c
index 47a7977601..0a517f1509 100644
--- a/test/system_is_locked.c
+++ b/test/system_is_locked.c
@@ -3,12 +3,11 @@
* found in the LICENSE file.
*/
-#include "test_util.h"
-
#include "flash.h"
#include "string.h"
#include "system.h"
#include "task.h"
+#include "test_util.h"
#include "write_protect.h"
static bool write_protect_enabled;
diff --git a/test/uptime.c b/test/uptime.c
index 0b6c9b56e6..ab65820c18 100644
--- a/test/uptime.c
+++ b/test/uptime.c
@@ -3,8 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdbool.h>
-
#include "common.h"
#include "ec_commands.h"
#include "host_command.h"
@@ -12,6 +10,8 @@
#include "timer.h"
#include "util.h"
+#include <stdbool.h>
+
static bool get_ap_reset_stats_should_succeed = true;
/* Mocks */
diff --git a/test/usb_pd_console.c b/test/usb_pd_console.c
index cb2539fea4..dc574bccf0 100644
--- a/test/usb_pd_console.c
+++ b/test/usb_pd_console.c
@@ -10,11 +10,11 @@
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
-#include "usb_pe_sm.h"
+#include "test_util.h"
#include "usb_pd.h"
+#include "usb_pe_sm.h"
#include "usb_tc_sm.h"
#include "util.h"
-#include "test_util.h"
/* Defined in implementation */
int command_pd(int argc, const char **argv);
diff --git a/test/usb_pd_int.c b/test/usb_pd_int.c
index 0072da851d..1b9336361d 100644
--- a/test/usb_pd_int.c
+++ b/test/usb_pd_int.c
@@ -4,11 +4,11 @@
*
* Test USB-PD interrupt task.
*/
-#include "task.h"
-#include "test_util.h"
#include "mock/tcpc_mock.h"
#include "mock/timer_mock.h"
#include "mock/usb_mux_mock.h"
+#include "task.h"
+#include "test_util.h"
#define PORT0 0
diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c
index 8d75454c6a..c4d2c924e4 100644
--- a/test/usb_pe_drp.c
+++ b/test/usb_pe_drp.c
@@ -5,6 +5,13 @@
* Test USB PE module.
*/
#include "common.h"
+#include "mock/charge_manager_mock.h"
+#include "mock/dp_alt_mode_mock.h"
+#include "mock/tcpc_mock.h"
+#include "mock/usb_mux_mock.h"
+#include "mock/usb_pd_dpm_mock.h"
+#include "mock/usb_prl_mock.h"
+#include "mock/usb_tc_sm_mock.h"
#include "task.h"
#include "test_util.h"
#include "timer.h"
@@ -13,13 +20,6 @@
#include "usb_pe.h"
#include "usb_pe_sm.h"
#include "usb_sm_checks.h"
-#include "mock/charge_manager_mock.h"
-#include "mock/usb_tc_sm_mock.h"
-#include "mock/tcpc_mock.h"
-#include "mock/usb_mux_mock.h"
-#include "mock/usb_pd_dpm_mock.h"
-#include "mock/dp_alt_mode_mock.h"
-#include "mock/usb_prl_mock.h"
/* Install Mock TCPC and MUX drivers */
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
diff --git a/test/usb_pe_drp_noextended.c b/test/usb_pe_drp_noextended.c
index 6108458c9c..aa202a7dda 100644
--- a/test/usb_pe_drp_noextended.c
+++ b/test/usb_pe_drp_noextended.c
@@ -5,6 +5,9 @@
* Test USB PE module.
*/
#include "common.h"
+#include "mock/tcpc_mock.h"
+#include "mock/usb_mux_mock.h"
+#include "mock/usb_tc_sm_mock.h"
#include "task.h"
#include "test_util.h"
#include "timer.h"
@@ -13,9 +16,6 @@
#include "usb_pe.h"
#include "usb_pe_sm.h"
#include "usb_sm_checks.h"
-#include "mock/usb_tc_sm_mock.h"
-#include "mock/tcpc_mock.h"
-#include "mock/usb_mux_mock.h"
/* Install Mock TCPC and MUX drivers */
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
diff --git a/test/usb_pe_drp_old.c b/test/usb_pe_drp_old.c
index 0985a4cae9..4ea07c1ec9 100644
--- a/test/usb_pe_drp_old.c
+++ b/test/usb_pe_drp_old.c
@@ -7,6 +7,7 @@
#include "battery.h"
#include "common.h"
#include "gpio.h"
+#include "mock/usb_prl_mock.h"
#include "task.h"
#include "test_util.h"
#include "timer.h"
@@ -19,7 +20,6 @@
#include "usb_prl_sm.h"
#include "usb_sm_checks.h"
#include "usb_tc_sm.h"
-#include "mock/usb_prl_mock.h"
#define pe_set_flag(_p, name) pe_set_fn((_p), (name##_FN))
#define pe_clr_flag(_p, name) pe_clr_fn((_p), (name##_FN))
diff --git a/test/usb_prl_noextended.c b/test/usb_prl_noextended.c
index 956c0027f5..609de56d49 100644
--- a/test/usb_prl_noextended.c
+++ b/test/usb_prl_noextended.c
@@ -11,9 +11,9 @@
#include "test_util.h"
#include "timer.h"
#include "usb_emsg.h"
-#include "usb_pd_test_util.h"
#include "usb_pd.h"
#include "usb_pd_tcpm.h"
+#include "usb_pd_test_util.h"
#include "usb_pe_sm.h"
#include "usb_prl_sm.h"
#include "usb_sm_checks.h"
diff --git a/test/usb_prl_old.c b/test/usb_prl_old.c
index 956c0027f5..609de56d49 100644
--- a/test/usb_prl_old.c
+++ b/test/usb_prl_old.c
@@ -11,9 +11,9 @@
#include "test_util.h"
#include "timer.h"
#include "usb_emsg.h"
-#include "usb_pd_test_util.h"
#include "usb_pd.h"
#include "usb_pd_tcpm.h"
+#include "usb_pd_test_util.h"
#include "usb_pe_sm.h"
#include "usb_prl_sm.h"
#include "usb_sm_checks.h"
diff --git a/test/usb_sm_checks.c b/test/usb_sm_checks.c
index a8dbdad872..2204326d97 100644
--- a/test/usb_sm_checks.c
+++ b/test/usb_sm_checks.c
@@ -9,10 +9,10 @@
#include "test_util.h"
#include "timer.h"
#include "usb_pd.h"
+#include "usb_pd_test_util.h"
#include "usb_sm.h"
#include "usb_tc_sm.h"
#include "util.h"
-#include "usb_pd_test_util.h"
#include "vpd_api.h"
#ifdef CONFIG_USB_TYPEC_SM
diff --git a/test/usb_sm_framework_h3.c b/test/usb_sm_framework_h3.c
index 20f9b706c6..704bae8f9b 100644
--- a/test/usb_sm_framework_h3.c
+++ b/test/usb_sm_framework_h3.c
@@ -9,10 +9,10 @@
#include "test_util.h"
#include "timer.h"
#include "usb_pd.h"
+#include "usb_pd_test_util.h"
#include "usb_sm.h"
#include "usb_tc_sm.h"
#include "util.h"
-#include "usb_pd_test_util.h"
#include "vpd_api.h"
/*
diff --git a/test/usb_tcpmv2_compliance_common.c b/test/usb_tcpmv2_compliance_common.c
index 9f839ecf1c..ed46d7baa0 100644
--- a/test/usb_tcpmv2_compliance_common.c
+++ b/test/usb_tcpmv2_compliance_common.c
@@ -10,8 +10,8 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
uint32_t rdo = RDO_FIXED(1, 500, 500, 0);
uint32_t pdo = PDO_FIXED(5000, 3000,
diff --git a/test/usb_tcpmv2_td_pd_ll_e3.c b/test/usb_tcpmv2_td_pd_ll_e3.c
index f239c87885..8e1d46c15e 100644
--- a/test/usb_tcpmv2_td_pd_ll_e3.c
+++ b/test/usb_tcpmv2_td_pd_ll_e3.c
@@ -8,8 +8,8 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
/*****************************************************************************
* TD.PD.LL.E3. Soft Reset Usage
diff --git a/test/usb_tcpmv2_td_pd_ll_e4.c b/test/usb_tcpmv2_td_pd_ll_e4.c
index f315fc2a63..fea5e3dc81 100644
--- a/test/usb_tcpmv2_td_pd_ll_e4.c
+++ b/test/usb_tcpmv2_td_pd_ll_e4.c
@@ -8,8 +8,8 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
/*****************************************************************************
* TD.PD.LL.E4. Hard Reset Usage
diff --git a/test/usb_tcpmv2_td_pd_ll_e5.c b/test/usb_tcpmv2_td_pd_ll_e5.c
index 7c7446a7b3..49b76fd44e 100644
--- a/test/usb_tcpmv2_td_pd_ll_e5.c
+++ b/test/usb_tcpmv2_td_pd_ll_e5.c
@@ -8,8 +8,8 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
/*****************************************************************************
* TD.PD.LL.E5. Soft Reset
diff --git a/test/usb_tcpmv2_td_pd_other.c b/test/usb_tcpmv2_td_pd_other.c
index 18477ac825..62e051a7a9 100644
--- a/test/usb_tcpmv2_td_pd_other.c
+++ b/test/usb_tcpmv2_td_pd_other.c
@@ -8,9 +8,9 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
-#include "usb_tc_sm.h"
#include "usb_prl_sm.h"
+#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
int test_connect_as_nonpd_sink(void)
{
diff --git a/test/usb_tcpmv2_td_pd_src3_e1.c b/test/usb_tcpmv2_td_pd_src3_e1.c
index 4f5637ccd2..9c79ea741a 100644
--- a/test/usb_tcpmv2_td_pd_src3_e1.c
+++ b/test/usb_tcpmv2_td_pd_src3_e1.c
@@ -8,8 +8,8 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
#define BUFFER_SIZE 100
diff --git a/test/usb_tcpmv2_td_pd_src3_e7.c b/test/usb_tcpmv2_td_pd_src3_e7.c
index 40f65f2b9a..e94b017cc6 100644
--- a/test/usb_tcpmv2_td_pd_src3_e7.c
+++ b/test/usb_tcpmv2_td_pd_src3_e7.c
@@ -4,13 +4,13 @@
*/
#include "battery.h"
+#include "driver/tcpm/tcpci.h"
#include "mock/tcpci_i2c_mock.h"
#include "task.h"
-#include "driver/tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
#define BUFFER_SIZE 100
diff --git a/test/usb_tcpmv2_td_pd_src3_e8.c b/test/usb_tcpmv2_td_pd_src3_e8.c
index 8686226a50..a19f6c8c82 100644
--- a/test/usb_tcpmv2_td_pd_src3_e8.c
+++ b/test/usb_tcpmv2_td_pd_src3_e8.c
@@ -4,13 +4,13 @@
*/
#include "battery.h"
+#include "driver/tcpm/tcpci.h"
#include "mock/tcpci_i2c_mock.h"
#include "task.h"
-#include "driver/tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
#define BUFFER_SIZE 100
diff --git a/test/usb_tcpmv2_td_pd_src3_e9.c b/test/usb_tcpmv2_td_pd_src3_e9.c
index 59b7a22d74..833a9c056f 100644
--- a/test/usb_tcpmv2_td_pd_src3_e9.c
+++ b/test/usb_tcpmv2_td_pd_src3_e9.c
@@ -4,13 +4,13 @@
*/
#include "battery.h"
+#include "driver/tcpm/tcpci.h"
#include "mock/tcpci_i2c_mock.h"
#include "task.h"
-#include "driver/tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
#define BUFFER_SIZE 100
diff --git a/test/usb_tcpmv2_td_pd_src_e1.c b/test/usb_tcpmv2_td_pd_src_e1.c
index cfb62764b2..10166c4b65 100644
--- a/test/usb_tcpmv2_td_pd_src_e1.c
+++ b/test/usb_tcpmv2_td_pd_src_e1.c
@@ -8,8 +8,8 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
/*****************************************************************************
* TD.PD.SRC.E1 Source Capabilities sent timely
diff --git a/test/usb_tcpmv2_td_pd_src_e2.c b/test/usb_tcpmv2_td_pd_src_e2.c
index cabba40bb9..fbe3e4bce7 100644
--- a/test/usb_tcpmv2_td_pd_src_e2.c
+++ b/test/usb_tcpmv2_td_pd_src_e2.c
@@ -8,8 +8,8 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
#define BUFFER_SIZE 100
diff --git a/test/usb_tcpmv2_td_pd_src_e5.c b/test/usb_tcpmv2_td_pd_src_e5.c
index ef40ee75cf..bc391104ab 100644
--- a/test/usb_tcpmv2_td_pd_src_e5.c
+++ b/test/usb_tcpmv2_td_pd_src_e5.c
@@ -8,8 +8,8 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
/*****************************************************************************
* TD.PD.SRC.E5 SenderResponseTimer Timeout - Request
diff --git a/test/usb_tcpmv2_td_pd_vndi3_e3.c b/test/usb_tcpmv2_td_pd_vndi3_e3.c
index 8157835328..590c02a0e8 100644
--- a/test/usb_tcpmv2_td_pd_vndi3_e3.c
+++ b/test/usb_tcpmv2_td_pd_vndi3_e3.c
@@ -8,8 +8,8 @@
#include "tcpm/tcpci.h"
#include "test_util.h"
#include "timer.h"
-#include "usb_tcpmv2_compliance.h"
#include "usb_tc_sm.h"
+#include "usb_tcpmv2_compliance.h"
uint32_t vdo =
VDO(USB_SID_PD, 1, VDO_SVDM_VERS(VDM_VER20) | CMD_DISCOVER_IDENT);
diff --git a/test/usb_test/device_configuration.c b/test/usb_test/device_configuration.c
index 06c71fefd9..94496fa0fc 100644
--- a/test/usb_test/device_configuration.c
+++ b/test/usb_test/device_configuration.c
@@ -5,13 +5,14 @@
*/
#include <errno.h>
-#include <getopt.h>
-#include <libusb.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <getopt.h>
+#include <libusb.h>
+
/* Options */
static uint16_t vid = 0x18d1; /* Google */
static uint16_t pid = 0x5014; /* Cr50 */
diff --git a/test/usb_typec_ctvpd.c b/test/usb_typec_ctvpd.c
index 71d543cec0..17c3452a62 100644
--- a/test/usb_typec_ctvpd.c
+++ b/test/usb_typec_ctvpd.c
@@ -10,12 +10,12 @@
#include "test_util.h"
#include "timer.h"
#include "usb_pd.h"
-#include "usb_sm.h"
-#include "usb_tc_sm.h"
-#include "util.h"
#include "usb_pd_tcpm.h"
#include "usb_pd_test_util.h"
+#include "usb_sm.h"
#include "usb_sm_checks.h"
+#include "usb_tc_sm.h"
+#include "util.h"
#include "vpd_api.h"
#define PORT0 0
diff --git a/test/utils_str.c b/test/utils_str.c
index 36ad63989e..4b2e3d4427 100644
--- a/test/utils_str.c
+++ b/test/utils_str.c
@@ -7,8 +7,8 @@
#include "common.h"
#include "console.h"
-#include "system.h"
#include "printf.h"
+#include "system.h"
#include "test_util.h"
#include "timer.h"
#include "util.h"
diff --git a/test/vboot.c b/test/vboot.c
index f75208de90..caa3d2d7cb 100644
--- a/test/vboot.c
+++ b/test/vboot.c
@@ -7,10 +7,10 @@
#include "common.h"
#include "rsa.h"
-#include "test_util.h"
-#include "vboot.h"
#include "rsa2048-3.h"
#include "rwsig.h"
+#include "test_util.h"
+#include "vboot.h"
struct vboot_key {
struct vb21_packed_key vb21_key;
diff --git a/test/version.c b/test/version.c
index 9731863f29..fea691eef7 100644
--- a/test/version.c
+++ b/test/version.c
@@ -9,8 +9,8 @@
#include "ec_commands.h"
#include "stddef.h"
#include "system.h"
-#include "util.h"
#include "test_util.h"
+#include "util.h"
/*
* Tests that fw version adheres to the expected format.
diff --git a/test/vpd_api.c b/test/vpd_api.c
index 51a2e76cd6..e159dcb066 100644
--- a/test/vpd_api.c
+++ b/test/vpd_api.c
@@ -3,10 +3,10 @@
* found in the LICENSE file.
*/
+#include "console.h"
+#include "driver/tcpm/tcpm.h"
#include "registers.h"
#include "vpd_api.h"
-#include "driver/tcpm/tcpm.h"
-#include "console.h"
/*
* Polarity based on 'DFP Perspective' (see table USB Type-C Cable and Connector
* Specification)