diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-11-23 13:51:53 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-29 22:10:18 +0000 |
commit | e6da633c3840a90479a01224fcde04135408c787 (patch) | |
tree | e4676778af63ce1c39f2b745ebff008436713158 | |
parent | 0a26305e5e47487a35edba5f68695a08b522643a (diff) | |
download | chrome-ec-e6da633c3840a90479a01224fcde04135408c787.tar.gz |
driver: Sort header files
Sort all includes in driver 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: I675e0db416b6b7cbcfce031c97fd24ad97b66f4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4052767
Reviewed-by: Yuval Peress <peress@google.com>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
102 files changed, 178 insertions, 177 deletions
diff --git a/driver/accel_bma2x2.c b/driver/accel_bma2x2.c index 08e818cb8d..772ae64696 100644 --- a/driver/accel_bma2x2.c +++ b/driver/accel_bma2x2.c @@ -9,11 +9,11 @@ * Supported: BMA255 */ +#include "accel_bma2x2.h" #include "accelgyro.h" #include "builtin/assert.h" #include "common.h" #include "console.h" -#include "accel_bma2x2.h" #include "i2c.h" #include "math_util.h" #include "spi.h" diff --git a/driver/accel_bma4xx.c b/driver/accel_bma4xx.c index b731bca422..29d05a35d8 100644 --- a/driver/accel_bma4xx.c +++ b/driver/accel_bma4xx.c @@ -9,17 +9,18 @@ * Supported: BMA422 */ -#include "accelgyro.h" #include "accel_bma422.h" +#include "accelgyro.h" #include "builtin/assert.h" #include "common.h" #include "console.h" -#include "i2c.h" #include "hwtimer.h" +#include "i2c.h" #include "math_util.h" #include "spi.h" #include "task.h" #include "util.h" + #include <motion_sense_fifo.h> #ifdef CONFIG_ACCEL_BMA4XX_INT_EVENT diff --git a/driver/accel_kionix.c b/driver/accel_kionix.c index cc12987f40..c04855c89d 100644 --- a/driver/accel_kionix.c +++ b/driver/accel_kionix.c @@ -9,12 +9,12 @@ * Supported: KX022, KXCJ9 */ -#include "accelgyro.h" -#include "common.h" -#include "console.h" #include "accel_kionix.h" #include "accel_kx022.h" #include "accel_kxcj9.h" +#include "accelgyro.h" +#include "common.h" +#include "console.h" #include "i2c.h" #include "math_util.h" #include "motion_orientation.h" diff --git a/driver/accel_kionix.h b/driver/accel_kionix.h index 8777396e01..4f5d02ee55 100644 --- a/driver/accel_kionix.h +++ b/driver/accel_kionix.h @@ -8,8 +8,8 @@ #ifndef __CROS_EC_ACCEL_KIONIX_H #define __CROS_EC_ACCEL_KIONIX_H -#include "common.h" #include "accelgyro.h" +#include "common.h" #include "driver/accel_kx022.h" #include "driver/accel_kxcj9.h" diff --git a/driver/accel_lis2dh.c b/driver/accel_lis2dh.c index eaedb216d7..26954f3c4b 100644 --- a/driver/accel_lis2dh.c +++ b/driver/accel_lis2dh.c @@ -11,14 +11,14 @@ #include "accelgyro.h" #include "common.h" #include "console.h" +#include "driver/accel_lis2dh.h" +#include "driver/stm_mems_common.h" #include "hooks.h" #include "hwtimer.h" #include "i2c.h" #include "math_util.h" #include "task.h" #include "util.h" -#include "driver/accel_lis2dh.h" -#include "driver/stm_mems_common.h" #define CPUTS(outstr) cputs(CC_ACCEL, outstr) #define CPRINTS(format, args...) cprints(CC_ACCEL, format, ##args) diff --git a/driver/accel_lis2dw12.c b/driver/accel_lis2dw12.c index 3cf3e4b64a..42d9381bda 100644 --- a/driver/accel_lis2dw12.c +++ b/driver/accel_lis2dw12.c @@ -7,10 +7,10 @@ * LIS2DW12 accelerometer module for Chrome EC 3D digital accelerometer. * For more details on LIS2DW12 device please refers to www.st.com. */ +#include "accel_lis2dw12.h" #include "accelgyro.h" #include "common.h" #include "console.h" -#include "accel_lis2dw12.h" #include "hooks.h" #include "hwtimer.h" #include "math_util.h" diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c index 0a736760d0..7a398e5f4b 100644 --- a/driver/accelgyro_bmi160.c +++ b/driver/accelgyro_bmi160.c @@ -9,14 +9,14 @@ */ #include "accelgyro.h" +#include "accelgyro_bmi160.h" +#include "accelgyro_bmi_common.h" #include "builtin/assert.h" #include "common.h" #include "console.h" -#include "accelgyro_bmi_common.h" -#include "accelgyro_bmi160.h" -#include "mag_bmm150.h" #include "hwtimer.h" #include "i2c.h" +#include "mag_bmm150.h" #include "math_util.h" #include "motion_orientation.h" #include "motion_sense_fifo.h" diff --git a/driver/accelgyro_bmi260.c b/driver/accelgyro_bmi260.c index f0b16be4d5..1b47983b80 100644 --- a/driver/accelgyro_bmi260.c +++ b/driver/accelgyro_bmi260.c @@ -9,10 +9,10 @@ */ #include "accelgyro.h" +#include "accelgyro_bmi260.h" +#include "accelgyro_bmi_common.h" #include "builtin/assert.h" #include "console.h" -#include "accelgyro_bmi_common.h" -#include "accelgyro_bmi260.h" #include "hwtimer.h" #include "i2c.h" #include "init_rom.h" diff --git a/driver/accelgyro_bmi_common.c b/driver/accelgyro_bmi_common.c index 73131b0aae..27aab34c3e 100644 --- a/driver/accelgyro_bmi_common.c +++ b/driver/accelgyro_bmi_common.c @@ -9,11 +9,11 @@ */ #include "accelgyro.h" -#include "console.h" #include "accelgyro_bmi_common.h" +#include "console.h" +#include "i2c.h" #include "mag_bmm150.h" #include "mag_lis2mdl.h" -#include "i2c.h" #include "math_util.h" #include "motion_sense_fifo.h" #include "spi.h" diff --git a/driver/accelgyro_icm42607.c b/driver/accelgyro_icm42607.c index 28a131d33f..f57f11fae2 100644 --- a/driver/accelgyro_icm42607.c +++ b/driver/accelgyro_icm42607.c @@ -10,8 +10,8 @@ #include "accelgyro.h" #include "console.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "hwtimer.h" #include "i2c.h" #include "math_util.h" diff --git a/driver/accelgyro_icm426xx.c b/driver/accelgyro_icm426xx.c index 0311ed8187..c3c9e2225f 100644 --- a/driver/accelgyro_icm426xx.c +++ b/driver/accelgyro_icm426xx.c @@ -10,8 +10,8 @@ #include "accelgyro.h" #include "console.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "hwtimer.h" #include "i2c.h" #include "math_util.h" diff --git a/driver/accelgyro_icm_common.c b/driver/accelgyro_icm_common.c index 22a2b0820d..44a3b61370 100644 --- a/driver/accelgyro_icm_common.c +++ b/driver/accelgyro_icm_common.c @@ -10,10 +10,10 @@ #include "accelgyro.h" #include "console.h" +#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "i2c.h" #include "spi.h" -#include "driver/accelgyro_icm_common.h" -#include "driver/accelgyro_icm426xx.h" #define CPUTS(outstr) cputs(CC_ACCEL, outstr) #define CPRINTF(format, args...) cprintf(CC_ACCEL, format, ##args) diff --git a/driver/accelgyro_icm_common.h b/driver/accelgyro_icm_common.h index 400c56ba6f..32adf6f5ff 100644 --- a/driver/accelgyro_icm_common.h +++ b/driver/accelgyro_icm_common.h @@ -8,12 +8,12 @@ #ifndef __CROS_EC_ACCELGYRO_ICM_COMMON_H #define __CROS_EC_ACCELGYRO_ICM_COMMON_H -#include <sys/types.h> - #include "accelgyro.h" +#include "builtin/stddef.h" #include "hwtimer.h" #include "timer.h" -#include "builtin/stddef.h" + +#include <sys/types.h> #if !defined(CONFIG_ACCELGYRO_ICM_COMM_SPI) && \ !defined(CONFIG_ACCELGYRO_ICM_COMM_I2C) diff --git a/driver/accelgyro_lsm6dsm.h b/driver/accelgyro_lsm6dsm.h index 51da2a42fb..8fa53c6a6d 100644 --- a/driver/accelgyro_lsm6dsm.h +++ b/driver/accelgyro_lsm6dsm.h @@ -8,10 +8,10 @@ #ifndef __CROS_EC_ACCELGYRO_LSM6DSM_H #define __CROS_EC_ACCELGYRO_LSM6DSM_H -#include "stm_mems_common.h" -#include "mag_cal.h" #include "mag_bmm150.h" +#include "mag_cal.h" #include "mag_lis2mdl.h" +#include "stm_mems_common.h" /* * 7-bit address is 110101xb. Where 'x' is determined diff --git a/driver/als_cm32183.c b/driver/als_cm32183.c index d97c179fe8..a2ee9f365e 100644 --- a/driver/als_cm32183.c +++ b/driver/als_cm32183.c @@ -5,10 +5,10 @@ * CAPELLA CM32183 light sensor driver */ +#include "accelgyro.h" #include "common.h" #include "driver/als_cm32183.h" #include "i2c.h" -#include "accelgyro.h" #include "math_util.h" struct cm32183_drv_data { diff --git a/driver/als_tcs3400.c b/driver/als_tcs3400.c index 002e269ada..8874ce79d6 100644 --- a/driver/als_tcs3400.c +++ b/driver/als_tcs3400.c @@ -5,9 +5,9 @@ * AMS TCS3400 light sensor driver */ #include "accelgyro.h" +#include "als_tcs3400.h" #include "common.h" #include "console.h" -#include "als_tcs3400.h" #include "hooks.h" #include "hwtimer.h" #include "i2c.h" diff --git a/driver/amd_stt.c b/driver/amd_stt.c index 93da8cecb5..a80220033c 100644 --- a/driver/amd_stt.c +++ b/driver/amd_stt.c @@ -4,8 +4,8 @@ */ #include "amd_stt.h" -#include "common.h" #include "chipset.h" +#include "common.h" #include "console.h" #include "driver/sb_rmi.h" #include "hooks.h" diff --git a/driver/battery/bq27621_g1.c b/driver/battery/bq27621_g1.c index f29039f0c1..73ca8476b3 100644 --- a/driver/battery/bq27621_g1.c +++ b/driver/battery/bq27621_g1.c @@ -11,8 +11,8 @@ #include "extpower.h" #include "hooks.h" #include "i2c.h" -#include "util.h" #include "timer.h" +#include "util.h" #define BQ27621_ADDR_FLAGS 0x55 #define BQ27621_TYPE_ID 0x0621 diff --git a/driver/bc12/max14637.c b/driver/bc12/max14637.c index 09fa009c45..a2603c7973 100644 --- a/driver/bc12/max14637.c +++ b/driver/bc12/max14637.c @@ -13,13 +13,13 @@ */ #include "builtin/assert.h" -#include "max14637.h" #include "charge_manager.h" #include "chipset.h" #include "common.h" #include "console.h" #include "gpio.h" #include "hooks.h" +#include "max14637.h" #include "power.h" #include "power/cannonlake.h" #include "task.h" diff --git a/driver/bc12/mt6360.c b/driver/bc12/mt6360.c index 49ec031e09..ca4bf11794 100644 --- a/driver/bc12/mt6360.c +++ b/driver/bc12/mt6360.c @@ -3,15 +3,15 @@ * found in the LICENSE file. */ -#include "charger.h" #include "charge_manager.h" +#include "charger.h" #include "console.h" #include "crc8.h" -#include "mt6360.h" #include "ec_commands.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" +#include "mt6360.h" #include "task.h" #include "timer.h" #include "usb_charge.h" diff --git a/driver/bc12/pi3usb9201.c b/driver/bc12/pi3usb9201.c index e892c34e8c..4e39933657 100644 --- a/driver/bc12/pi3usb9201.c +++ b/driver/bc12/pi3usb9201.c @@ -5,12 +5,12 @@ /* PI3USB9201 USB BC 1.2 Charger Detector driver. */ -#include "pi3usb9201.h" #include "charge_manager.h" #include "chipset.h" #include "common.h" #include "console.h" #include "gpio.h" +#include "pi3usb9201.h" #include "power.h" #include "task.h" #include "timer.h" diff --git a/driver/charger/bd9995x.c b/driver/charger/bd9995x.c index f7e4ffacaa..f8e426fdc3 100644 --- a/driver/charger/bd9995x.c +++ b/driver/charger/bd9995x.c @@ -18,9 +18,9 @@ #include "panic.h" #include "task.h" #include "time.h" -#include "util.h" #include "usb_charge.h" #include "usb_pd.h" +#include "util.h" #define OTPROM_LOAD_WAIT_RETRY 3 diff --git a/driver/charger/bq24715.c b/driver/charger/bq24715.c index 0847618f3c..6855d6e334 100644 --- a/driver/charger/bq24715.c +++ b/driver/charger/bq24715.c @@ -8,8 +8,8 @@ #include "battery_smart.h" #include "bq24715.h" #include "charger.h" -#include "console.h" #include "common.h" +#include "console.h" #include "i2c.h" #include "util.h" diff --git a/driver/charger/bq24773.c b/driver/charger/bq24773.c index bfa0aa36e7..d678944ceb 100644 --- a/driver/charger/bq24773.c +++ b/driver/charger/bq24773.c @@ -8,8 +8,8 @@ #include "battery_smart.h" #include "bq24773.h" #include "charger.h" -#include "console.h" #include "common.h" +#include "console.h" #include "util.h" /* diff --git a/driver/charger/bq25710.c b/driver/charger/bq25710.c index 831f7e110d..222d2f58a4 100644 --- a/driver/charger/bq25710.c +++ b/driver/charger/bq25710.c @@ -5,8 +5,6 @@ * TI bq25710 battery charger driver. */ -#include <stdbool.h> - #include "battery.h" #include "battery_smart.h" #include "bq257x0_regs.h" @@ -17,11 +15,13 @@ #include "console.h" #include "hooks.h" #include "i2c.h" -#include "task.h" #include "system.h" +#include "task.h" #include "timer.h" #include "util.h" +#include <stdbool.h> + #if !defined(CONFIG_CHARGER_BQ25710) && !defined(CONFIG_CHARGER_BQ25720) #error Only the BQ25720 and BQ25710 are supported by bq25710 driver. #endif diff --git a/driver/charger/isl923x.c b/driver/charger/isl923x.c index 17798b113d..dac1df69a2 100644 --- a/driver/charger/isl923x.c +++ b/driver/charger/isl923x.c @@ -11,9 +11,9 @@ #include "builtin/assert.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "common.h" #include "hooks.h" #include "i2c.h" #include "isl923x.h" diff --git a/driver/charger/isl9241.c b/driver/charger/isl9241.c index 6ff0db26e9..445d94734c 100644 --- a/driver/charger/isl9241.c +++ b/driver/charger/isl9241.c @@ -11,11 +11,11 @@ #endif #include "battery.h" #include "battery_smart.h" -#include "charger.h" #include "charge_manager.h" #include "charge_state.h" -#include "console.h" +#include "charger.h" #include "common.h" +#include "console.h" #include "hooks.h" #include "i2c.h" #include "isl9241.h" diff --git a/driver/charger/rt946x.c b/driver/charger/rt946x.c index 58b5c1adb4..0e52d8e3bb 100644 --- a/driver/charger/rt946x.c +++ b/driver/charger/rt946x.c @@ -7,17 +7,17 @@ #include "battery.h" #include "battery_smart.h" -#include "charger.h" #include "charge_manager.h" +#include "charger.h" #include "common.h" #include "compile_time_macros.h" #include "config.h" #include "console.h" +#include "driver/wpc/p9221.h" #include "extpower.h" #include "hooks.h" #include "i2c.h" #include "printf.h" -#include "driver/wpc/p9221.h" #include "rt946x.h" #include "task.h" #include "tcpm/tcpm.h" diff --git a/driver/charger/rt9490.c b/driver/charger/rt9490.c index c0bf873e43..016ef12d44 100644 --- a/driver/charger/rt9490.c +++ b/driver/charger/rt9490.c @@ -9,8 +9,8 @@ #include "battery_smart.h" #include "builtin/assert.h" #include "builtin/endian.h" -#include "charger.h" #include "charge_manager.h" +#include "charger.h" #include "common.h" #include "config.h" #include "console.h" @@ -18,11 +18,11 @@ #include "i2c.h" #include "rt9490.h" #include "task.h" +#include "temp_sensor/temp_sensor.h" +#include "temp_sensor/thermistor.h" #include "usb_charge.h" #include "usb_pd.h" #include "util.h" -#include "temp_sensor/temp_sensor.h" -#include "temp_sensor/thermistor.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/driver/charger/rt9490.h b/driver/charger/rt9490.h index 135c3271be..88f979ae5e 100644 --- a/driver/charger/rt9490.h +++ b/driver/charger/rt9490.h @@ -4,10 +4,10 @@ * * Richtek 5A 1-4 cell buck-boost switching battery charger driver. */ -#include <stdbool.h> - #include "temp_sensor.h" +#include <stdbool.h> + #ifndef __CROS_EC_RT9490_H #define __CROS_EC_RT9490_H diff --git a/driver/charger/sm5803.c b/driver/charger/sm5803.c index a64e541f6b..57b1a0330f 100644 --- a/driver/charger/sm5803.c +++ b/driver/charger/sm5803.c @@ -14,8 +14,8 @@ #include "hooks.h" #include "i2c.h" #include "sm5803.h" -#include "system.h" #include "stdbool.h" +#include "system.h" #include "throttle_ap.h" #include "timer.h" #include "usb_charge.h" diff --git a/driver/fingerprint/elan/elan_private.c b/driver/fingerprint/elan/elan_private.c index fc95ceb685..a176f29f0d 100644 --- a/driver/fingerprint/elan/elan_private.c +++ b/driver/fingerprint/elan/elan_private.c @@ -3,24 +3,24 @@ * found in the LICENSE file. */ -#include <stddef.h> #include "common.h" #include "console.h" +#include "cryptoc/util.h" +#include "elan_sensor.h" +#include "elan_sensor_pal.h" +#include "elan_setting.h" #include "endian.h" +#include "fpsensor.h" #include "gpio.h" #include "link_defs.h" +#include "math_util.h" +#include "shared_mem.h" #include "spi.h" #include "system.h" #include "timer.h" #include "util.h" -#include "shared_mem.h" -#include "math_util.h" -#include "fpsensor.h" -#include "cryptoc/util.h" -#include "elan_sensor.h" -#include "elan_setting.h" -#include "elan_sensor_pal.h" +#include <stddef.h> static uint16_t errors; diff --git a/driver/fingerprint/elan/elan_sensor_pal.c b/driver/fingerprint/elan/elan_sensor_pal.c index 4056c52f38..2a91fe176e 100644 --- a/driver/fingerprint/elan/elan_sensor_pal.c +++ b/driver/fingerprint/elan/elan_sensor_pal.c @@ -4,24 +4,24 @@ */ /* ELAN Platform Abstraction Layer callbacks */ -#include <stddef.h> #include "common.h" #include "console.h" +#include "cryptoc/util.h" +#include "elan_sensor.h" +#include "elan_sensor_pal.h" +#include "elan_setting.h" #include "endian.h" #include "fpsensor.h" #include "gpio.h" #include "link_defs.h" +#include "math_util.h" +#include "shared_mem.h" #include "spi.h" #include "system.h" #include "timer.h" #include "util.h" -#include "shared_mem.h" -#include "math_util.h" -#include "cryptoc/util.h" -#include "elan_setting.h" -#include "elan_sensor.h" -#include "elan_sensor_pal.h" +#include <stddef.h> static uint8_t tx_buf[CONFIG_SPI_TX_BUF_SIZE] __uncached; static uint8_t rx_buf[CONFIG_SPI_RX_BUF_SIZE] __uncached; diff --git a/driver/fingerprint/fpc/bep/fpc_misc.c b/driver/fingerprint/fpc/bep/fpc_misc.c index f78a429233..6b716e0524 100644 --- a/driver/fingerprint/fpc/bep/fpc_misc.c +++ b/driver/fingerprint/fpc/bep/fpc_misc.c @@ -5,12 +5,12 @@ /* FPC Platform Abstraction Layer */ -#include <stdint.h> -#include <stddef.h> - #include "shared_mem.h" #include "uart.h" +#include <stddef.h> +#include <stdint.h> + void __unused *fpc_malloc(uint32_t size) { char *data; diff --git a/driver/fingerprint/fpc/bep/fpc_private.c b/driver/fingerprint/fpc/bep/fpc_private.c index ac20e10758..70aa8fe8c5 100644 --- a/driver/fingerprint/fpc/bep/fpc_private.c +++ b/driver/fingerprint/fpc/bep/fpc_private.c @@ -3,9 +3,7 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stddef.h> - +#include "driver/fingerprint/fpc/fpc_sensor.h" #include "fpc_bio_algorithm.h" #include "fpsensor.h" #include "gpio.h" @@ -13,7 +11,8 @@ #include "system.h" #include "util.h" -#include "driver/fingerprint/fpc/fpc_sensor.h" +#include <stddef.h> +#include <stdint.h> /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_FP, format, ##args) diff --git a/driver/fingerprint/fpc/bep/fpc_sensor_spi.c b/driver/fingerprint/fpc/bep/fpc_sensor_spi.c index 752b9909bc..565b29c69d 100644 --- a/driver/fingerprint/fpc/bep/fpc_sensor_spi.c +++ b/driver/fingerprint/fpc/bep/fpc_sensor_spi.c @@ -5,18 +5,17 @@ /* FPC Platform Abstraction Layer */ -#include <stdint.h> -#include <stdbool.h> -#include <stddef.h> - #include "console.h" -#include "fpsensor.h" +#include "driver/fingerprint/fpc/fpc_sensor.h" #include "fpc_sensor_spi.h" +#include "fpsensor.h" #include "gpio.h" #include "spi.h" #include "util.h" -#include "driver/fingerprint/fpc/fpc_sensor.h" +#include <stdbool.h> +#include <stddef.h> +#include <stdint.h> /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_FP, format, ##args) diff --git a/driver/fingerprint/fpc/bep/fpc_timebase.c b/driver/fingerprint/fpc/bep/fpc_timebase.c index a63a4c3d6d..c34b9e27db 100644 --- a/driver/fingerprint/fpc/bep/fpc_timebase.c +++ b/driver/fingerprint/fpc/bep/fpc_timebase.c @@ -5,11 +5,11 @@ /* FPC Platform Abstraction Layer */ -#include <stdint.h> - #include "fpc_timebase.h" #include "timer.h" +#include <stdint.h> + uint32_t __unused fpc_timebase_get_tick(void) { clock_t time; diff --git a/driver/fingerprint/fpc/bep/fpc_timebase.h b/driver/fingerprint/fpc/bep/fpc_timebase.h index ce9018461b..35cf67fed2 100644 --- a/driver/fingerprint/fpc/bep/fpc_timebase.h +++ b/driver/fingerprint/fpc/bep/fpc_timebase.h @@ -13,10 +13,10 @@ * Supplies tick counter and wait operation(s). */ -#include <stdint.h> - #include "common.h" +#include <stdint.h> + /** * @brief Reads the system tick counter. * diff --git a/driver/fingerprint/fpc/fpc_sensor.c b/driver/fingerprint/fpc/fpc_sensor.c index bbab729b12..9cb97a9125 100644 --- a/driver/fingerprint/fpc/fpc_sensor.c +++ b/driver/fingerprint/fpc/fpc_sensor.c @@ -4,9 +4,10 @@ */ #include <stddef.h> + +#include <common/fpsensor/fpsensor_private.h> #include <include/fpsensor.h> #include <include/fpsensor_state.h> -#include <common/fpsensor/fpsensor_private.h> #if defined(CONFIG_FP_SENSOR_FPC1025) || defined(CONFIG_FP_SENSOR_FPC1035) #include "bep/fpc_private.h" #elif defined(CONFIG_FP_SENSOR_FPC1145) diff --git a/driver/fingerprint/fpc/libfp/fpc_private.c b/driver/fingerprint/fpc/libfp/fpc_private.c index fcc0180784..8b1ceff405 100644 --- a/driver/fingerprint/fpc/libfp/fpc_private.c +++ b/driver/fingerprint/fpc/libfp/fpc_private.c @@ -3,10 +3,9 @@ * found in the LICENSE file. */ -#include <stddef.h> -#include <sys/types.h> #include "common.h" #include "console.h" +#include "driver/fingerprint/fpc/fpc_sensor.h" #include "fpc_bio_algorithm.h" #include "fpc_private.h" #include "fpsensor.h" @@ -17,7 +16,9 @@ #include "timer.h" #include "util.h" -#include "driver/fingerprint/fpc/fpc_sensor.h" +#include <stddef.h> + +#include <sys/types.h> #define CPRINTF(format, args...) cprintf(CC_FP, format, ##args) #define CPRINTS(format, args...) cprints(CC_FP, format, ##args) diff --git a/driver/fingerprint/fpc/libfp/fpc_sensor_pal.c b/driver/fingerprint/fpc/libfp/fpc_sensor_pal.c index c0578bc09b..a856e0afaf 100644 --- a/driver/fingerprint/fpc/libfp/fpc_sensor_pal.c +++ b/driver/fingerprint/fpc/libfp/fpc_sensor_pal.c @@ -6,8 +6,8 @@ #include "common.h" #include "console.h" -#include "fpsensor.h" #include "fpc_sensor_pal.h" +#include "fpsensor.h" #include "shared_mem.h" #include "spi.h" #include "timer.h" diff --git a/driver/gl3590.c b/driver/gl3590.c index da374fbc88..03af496293 100644 --- a/driver/gl3590.c +++ b/driver/gl3590.c @@ -4,13 +4,12 @@ */ #include "console.h" +#include "gl3590.h" #include "hooks.h" #include "i2c.h" +#include "pwr_defs.h" #include "system.h" #include "util.h" -#include "pwr_defs.h" - -#include "gl3590.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) #define CPRINTF(format, args...) cprintf(CC_I2C, format, ##args) diff --git a/driver/ina2xx.c b/driver/ina2xx.c index e09c141f50..64a2dadeed 100644 --- a/driver/ina2xx.c +++ b/driver/ina2xx.c @@ -8,9 +8,9 @@ #include "console.h" #include "hooks.h" #include "i2c.h" +#include "ina2xx.h" #include "system.h" #include "timer.h" -#include "ina2xx.h" #include "util.h" /* Console output macros */ diff --git a/driver/ina3221.c b/driver/ina3221.c index 4659552497..ec28ec3f26 100644 --- a/driver/ina3221.c +++ b/driver/ina3221.c @@ -8,9 +8,9 @@ #include "console.h" #include "hooks.h" #include "i2c.h" +#include "ina3221.h" #include "system.h" #include "timer.h" -#include "ina3221.h" #include "util.h" /* Console output macros */ diff --git a/driver/ioexpander/it8801.c b/driver/ioexpander/it8801.c index f484e33284..932cbb2648 100644 --- a/driver/ioexpander/it8801.c +++ b/driver/ioexpander/it8801.c @@ -10,12 +10,12 @@ #include "i2c.h" #include "ioexpander.h" #include "it8801.h" +#include "keyboard_backlight.h" #include "keyboard_raw.h" #include "keyboard_scan.h" #include "registers.h" #include "task.h" #include "util.h" -#include "keyboard_backlight.h" #define CPRINTS(format, args...) cprints(CC_KEYSCAN, format, ##args) diff --git a/driver/ioexpander/pcal6408.c b/driver/ioexpander/pcal6408.c index 1b746bffc3..cec5e5902e 100644 --- a/driver/ioexpander/pcal6408.c +++ b/driver/ioexpander/pcal6408.c @@ -6,10 +6,10 @@ */ #include "common.h" #include "console.h" -#include "math_util.h" #include "gpio.h" #include "i2c.h" #include "ioexpander.h" +#include "math_util.h" #include "pcal6408.h" #define CPRINTF(format, args...) cprintf(CC_GPIO, format, ##args) diff --git a/driver/led/aw20198.c b/driver/led/aw20198.c index e2eea69481..eca596d62e 100644 --- a/driver/led/aw20198.c +++ b/driver/led/aw20198.c @@ -2,8 +2,6 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include <string.h> - #include "aw20198.h" #include "common.h" #include "console.h" @@ -13,6 +11,8 @@ #include "stddef.h" #include "timer.h" +#include <string.h> + #define CPRINTF(fmt, args...) cprintf(CC_RGBKBD, "AW20198: " fmt, ##args) #define CPRINTS(fmt, args...) cprints(CC_RGBKBD, "AW20198: " fmt, ##args) diff --git a/driver/led/is31fl3733b.c b/driver/led/is31fl3733b.c index 33004d1cec..3ff0c19655 100644 --- a/driver/led/is31fl3733b.c +++ b/driver/led/is31fl3733b.c @@ -2,7 +2,6 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include <string.h> #include "common.h" #include "console.h" #include "gpio.h" @@ -11,6 +10,8 @@ #include "stddef.h" #include "timer.h" +#include <string.h> + #define CPRINTF(fmt, args...) cprintf(CC_RGBKBD, "RGBKBD: " fmt, ##args) #define CPRINTS(fmt, args...) cprints(CC_RGBKBD, "RGBKBD: " fmt, ##args) diff --git a/driver/led/is31fl3743b.c b/driver/led/is31fl3743b.c index 5eef21c388..6725c1d406 100644 --- a/driver/led/is31fl3743b.c +++ b/driver/led/is31fl3743b.c @@ -2,8 +2,6 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include <string.h> - #include "common.h" #include "console.h" #include "gpio.h" @@ -12,6 +10,8 @@ #include "stddef.h" #include "timer.h" +#include <string.h> + #define CPRINTF(fmt, args...) cprintf(CC_RGBKBD, "RGBKBD: " fmt, ##args) #define CPRINTS(fmt, args...) cprints(CC_RGBKBD, "RGBKBD: " fmt, ##args) diff --git a/driver/led/mp3385.h b/driver/led/mp3385.h index 733a8f76cd..2f179666d8 100644 --- a/driver/led/mp3385.h +++ b/driver/led/mp3385.h @@ -8,8 +8,8 @@ #ifndef __CROS_EC_MP3385_H #define __CROS_EC_MP3385_H -#include "gpio.h" #include "common.h" +#include "gpio.h" /* * Overridable board initialization. Should be overridden by a board diff --git a/driver/led/oz554.h b/driver/led/oz554.h index c735f9f3b9..27b43a1300 100644 --- a/driver/led/oz554.h +++ b/driver/led/oz554.h @@ -8,8 +8,8 @@ #ifndef __CROS_EC_OZ554_H #define __CROS_EC_OZ554_H -#include "gpio.h" #include "common.h" +#include "gpio.h" /* * Overridable board initialization. Should be overridden by a board diff --git a/driver/led/tlc59116f.c b/driver/led/tlc59116f.c index 1350602f6f..72e51e3fb8 100644 --- a/driver/led/tlc59116f.c +++ b/driver/led/tlc59116f.c @@ -2,8 +2,6 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include <string.h> - #include "common.h" #include "console.h" #include "i2c.h" @@ -11,6 +9,8 @@ #include "stddef.h" #include "tlc59116f.h" +#include <string.h> + #define CPRINTF(fmt, args...) cprintf(CC_RGBKBD, "TLC59116F: " fmt, ##args) #define CPRINTS(fmt, args...) cprints(CC_RGBKBD, "TLC59116F: " fmt, ##args) diff --git a/driver/ln9310.c b/driver/ln9310.c index 4a56568eb9..f9dfedfc54 100644 --- a/driver/ln9310.c +++ b/driver/ln9310.c @@ -10,8 +10,8 @@ #include "driver/ln9310.h" #include "hooks.h" #include "i2c.h" -#include "util.h" #include "timer.h" +#include "util.h" #define CPUTS(outstr) cputs(CC_I2C, outstr) #define CPRINTF(format, args...) cprintf(CC_I2C, format, ##args) diff --git a/driver/mag_lis2mdl.c b/driver/mag_lis2mdl.c index e8a8cb82ca..a871f9e310 100644 --- a/driver/mag_lis2mdl.c +++ b/driver/mag_lis2mdl.c @@ -10,9 +10,9 @@ */ #include "common.h" +#include "driver/accelgyro_lsm6dsm.h" #include "driver/mag_lis2mdl.h" #include "driver/sensorhub_lsm6dsm.h" -#include "driver/accelgyro_lsm6dsm.h" #include "driver/stm_mems_common.h" #include "hwtimer.h" #include "mag_cal.h" diff --git a/driver/mcdp28x0.c b/driver/mcdp28x0.c index 1b56e6d53f..791c3c519f 100644 --- a/driver/mcdp28x0.c +++ b/driver/mcdp28x0.c @@ -5,9 +5,9 @@ * Megachips DisplayPort to HDMI protocol converter / level shifter driver. */ +#include "common.h" #include "config.h" #include "console.h" -#include "common.h" #include "ec_commands.h" #include "mcdp28x0.h" #include "queue.h" diff --git a/driver/nfc/ctn730.c b/driver/nfc/ctn730.c index 4864d43080..c19b440824 100644 --- a/driver/nfc/ctn730.c +++ b/driver/nfc/ctn730.c @@ -4,9 +4,9 @@ */ #include "chipset.h" -#include "ctn730.h" #include "common.h" #include "console.h" +#include "ctn730.h" #include "gpio.h" #include "i2c.h" #include "peripheral_charger.h" diff --git a/driver/nvidia_gpu.c b/driver/nvidia_gpu.c index e9fbd156ac..b8a2195470 100644 --- a/driver/nvidia_gpu.c +++ b/driver/nvidia_gpu.c @@ -5,8 +5,6 @@ * Nvidia GPU D-Notify driver */ -#include <stddef.h> - #include "charge_manager.h" #include "charge_state.h" #include "compile_time_macros.h" @@ -19,6 +17,8 @@ #include "throttle_ap.h" #include "timer.h" +#include <stddef.h> + #define CPRINTS(fmt, args...) cprints(CC_GPU, "GPU: " fmt, ##args) #define CPRINTF(fmt, args...) cprintf(CC_GPU, "GPU: " fmt, ##args) diff --git a/driver/ppc/ktu1125.c b/driver/ppc/ktu1125.c index 047d011aac..f90168adef 100644 --- a/driver/ppc/ktu1125.c +++ b/driver/ppc/ktu1125.c @@ -7,14 +7,14 @@ #include "common.h" #include "console.h" -#include "ktu1125.h" #include "hooks.h" #include "i2c.h" +#include "ktu1125.h" #include "system.h" #include "timer.h" #include "usb_charge.h" -#include "usb_pd_tcpm.h" #include "usb_pd.h" +#include "usb_pd_tcpm.h" #include "usbc_ppc.h" #include "util.h" diff --git a/driver/ppc/ktu1125.h b/driver/ppc/ktu1125.h index 229c894b8c..9957ed80ec 100644 --- a/driver/ppc/ktu1125.h +++ b/driver/ppc/ktu1125.h @@ -9,7 +9,6 @@ #define __CROS_EC_KTU1125_H #include "common.h" - #include "driver/ppc/ktu1125_public.h" #define KTU1125_ID 0x0 diff --git a/driver/ppc/nx20p348x.c b/driver/ppc/nx20p348x.c index d202898a85..14dfb88e02 100644 --- a/driver/ppc/nx20p348x.c +++ b/driver/ppc/nx20p348x.c @@ -7,15 +7,15 @@ #include "common.h" #include "console.h" -#include "nx20p348x.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" +#include "nx20p348x.h" #include "system.h" #include "tcpm/tcpm.h" #include "usb_charge.h" -#include "usb_pd_tcpm.h" #include "usb_pd.h" +#include "usb_pd_tcpm.h" #include "usbc_ppc.h" #include "util.h" diff --git a/driver/ppc/sn5s330.c b/driver/ppc/sn5s330.c index 385f27fe52..9404c8df76 100644 --- a/driver/ppc/sn5s330.c +++ b/driver/ppc/sn5s330.c @@ -12,14 +12,14 @@ #include "common.h" #include "console.h" -#include "sn5s330.h" #include "hooks.h" #include "i2c.h" +#include "sn5s330.h" #include "system.h" #include "timer.h" #include "usb_charge.h" -#include "usb_pd_tcpm.h" #include "usb_pd.h" +#include "usb_pd_tcpm.h" #include "usbc_ppc.h" #include "util.h" diff --git a/driver/ppc/sn5s330.h b/driver/ppc/sn5s330.h index 70a46920ee..3748370007 100644 --- a/driver/ppc/sn5s330.h +++ b/driver/ppc/sn5s330.h @@ -9,7 +9,6 @@ #define __CROS_EC_SN5S330_H #include "common.h" - #include "driver/ppc/sn5s330_public.h" struct sn5s330_config { diff --git a/driver/ppc/syv682x.c b/driver/ppc/syv682x.c index 88c6443ad0..42488a4a26 100644 --- a/driver/ppc/syv682x.c +++ b/driver/ppc/syv682x.c @@ -8,17 +8,17 @@ #include "common.h" #include "config.h" #include "console.h" -#include "syv682x.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" #include "system.h" +#include "syv682x.h" #include "tcpm/tcpm.h" #include "timer.h" #include "usb_charge.h" +#include "usb_pd.h" #include "usb_pd_tcpm.h" #include "usbc_ppc.h" -#include "usb_pd.h" #include "util.h" #define SYV682X_FLAGS_SOURCE_ENABLED BIT(0) diff --git a/driver/retimer/anx7483.c b/driver/retimer/anx7483.c index c587bec91f..f8b11f0e85 100644 --- a/driver/retimer/anx7483.c +++ b/driver/retimer/anx7483.c @@ -6,11 +6,11 @@ */ #include "anx7483.h" -#include "retimer/anx7483_public.h" #include "chipset.h" #include "common.h" #include "console.h" #include "i2c.h" +#include "retimer/anx7483_public.h" #include "timer.h" #include "usb_mux.h" #include "util.h" diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c index cb7c58c058..3bee94bb56 100644 --- a/driver/retimer/bb_retimer.c +++ b/driver/retimer/bb_retimer.c @@ -5,10 +5,10 @@ * Driver for Intel Burnside Bridge - Thunderbolt/USB/DisplayPort Retimer */ -#include "driver/retimer/bb_retimer.h" #include "chipset.h" #include "common.h" #include "console.h" +#include "driver/retimer/bb_retimer.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" diff --git a/driver/retimer/nb7v904m.c b/driver/retimer/nb7v904m.c index 58c57e5c95..2990a906b5 100644 --- a/driver/retimer/nb7v904m.c +++ b/driver/retimer/nb7v904m.c @@ -4,7 +4,6 @@ * * ON Semiconductor NB7V904M USB Type-C DisplayPort Alt Mode Redriver */ -#include <stdbool.h> #include "common.h" #include "console.h" #include "ec_commands.h" @@ -12,6 +11,8 @@ #include "nb7v904m.h" #include "usb_mux.h" +#include <stdbool.h> + #define CPRINTS(format, args...) cprints(CC_USB, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USB, format, ##args) diff --git a/driver/retimer/pi3dpx1207.c b/driver/retimer/pi3dpx1207.c index 27ea474832..e40f269e3b 100644 --- a/driver/retimer/pi3dpx1207.c +++ b/driver/retimer/pi3dpx1207.c @@ -5,12 +5,12 @@ * PI3DPX1207 retimer. */ -#include "pi3dpx1207.h" #include "common.h" #include "console.h" #include "gpio.h" #include "i2c.h" #include "ioexpander.h" +#include "pi3dpx1207.h" #include "usb_mux.h" #define I2C_MAX_RETRIES 2 diff --git a/driver/sb_rmi.c b/driver/sb_rmi.c index 420ef672ad..62c105f6ff 100644 --- a/driver/sb_rmi.c +++ b/driver/sb_rmi.c @@ -5,8 +5,8 @@ /* AMD SB-RMI (Side-band Remote Management Interface) Driver */ -#include "common.h" #include "chipset.h" +#include "common.h" #include "console.h" #include "i2c.h" #include "sb_rmi.h" diff --git a/driver/stm_mems_common.h b/driver/stm_mems_common.h index 370ce10d9c..58e039bdd2 100644 --- a/driver/stm_mems_common.h +++ b/driver/stm_mems_common.h @@ -8,11 +8,11 @@ #ifndef __CROS_EC_ST_COMMONS_H #define __CROS_EC_ST_COMMONS_H -#include "common.h" -#include "util.h" #include "accelgyro.h" +#include "common.h" #include "console.h" #include "i2c.h" +#include "util.h" /* X, Y, Z axis data len */ #define OUT_XYZ_SIZE 6 diff --git a/driver/tcpm/anx7447.c b/driver/tcpm/anx7447.c index 8c21f77536..4b8d82c034 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 42de7502f1..56d810574d 100644 --- a/driver/tcpm/anx7447.h +++ b/driver/tcpm/anx7447.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#include "usb_mux.h" #include "driver/tcpm/anx7447_public.h" +#include "usb_mux.h" /* USB Power delivery port management */ diff --git a/driver/tcpm/anx74xx.c b/driver/tcpm/anx74xx.c index 64a9271f1c..e6ad23c25a 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 "console.h" #include "anx74xx.h" +#include "console.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 4b4a15c711..3f11e568d0 100644 --- a/driver/tcpm/fusb302.c +++ b/driver/tcpm/fusb302.c @@ -9,8 +9,8 @@ #include "console.h" #include "fusb302.h" -#include "task.h" #include "hooks.h" +#include "task.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 0b636e2e89..d04cb2f597 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 "hooks.h" +#include "util.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 1ab76e2b79..2cb63aa22f 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 <stdint.h> - #include "driver/tcpm/it8xxx2_pd_public.h" +#include <stdint.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 6782b528e5..9bf50e1335 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 "hooks.h" +#include "util.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 e3a9fc04a2..120749fb62 100644 --- a/driver/tcpm/nct38xx.c +++ b/driver/tcpm/nct38xx.c @@ -15,9 +15,10 @@ #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 7d873abc85..ed3197c822 100644 --- a/driver/tcpm/ps8xxx.h +++ b/driver/tcpm/ps8xxx.h @@ -2,9 +2,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include "usb_mux.h" - #include "driver/tcpm/ps8xxx_public.h" +#include "usb_mux.h" /* Parade Tech Type-C port controller */ diff --git a/driver/tcpm/rt1718s.h b/driver/tcpm/rt1718s.h index f7c821ba53..8ff977e26b 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 77a436b2ac..029570faca 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 "hooks.h" +#include "util.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 007d2aa2e6..243ca94bd5 100644 --- a/driver/tcpm/tcpci.c +++ b/driver/tcpm/tcpci.c @@ -5,8 +5,8 @@ /* Type-C port manager */ -#include "atomic.h" #include "anx74xx.h" +#include "atomic.h" #include "compile_time_macros.h" #include "console.h" #include "ec_commands.h" diff --git a/driver/tcpm/tusb422.c b/driver/tcpm/tusb422.c index 6d12d1758b..79554bd0cf 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 diff --git a/driver/temp_sensor/adt7481.c b/driver/temp_sensor/adt7481.c index 0157d64b2d..f0aee1506f 100644 --- a/driver/temp_sensor/adt7481.c +++ b/driver/temp_sensor/adt7481.c @@ -5,12 +5,12 @@ /* ADT7481 temperature sensor module for Chrome EC */ +#include "adt7481.h" #include "common.h" #include "console.h" -#include "adt7481.h" #include "gpio.h" -#include "i2c.h" #include "hooks.h" +#include "i2c.h" #include "util.h" static int temp_val_local; diff --git a/driver/temp_sensor/amd_r19me4070.c b/driver/temp_sensor/amd_r19me4070.c index 97868b6945..3ee230da09 100644 --- a/driver/temp_sensor/amd_r19me4070.c +++ b/driver/temp_sensor/amd_r19me4070.c @@ -5,12 +5,12 @@ /* R19ME4070 temperature sensor module for Chrome EC */ +#include "amd_r19me4070.h" #include "chipset.h" #include "common.h" #include "console.h" #include "hooks.h" #include "i2c.h" -#include "amd_r19me4070.h" #include "power.h" #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/driver/temp_sensor/f75303.c b/driver/temp_sensor/f75303.c index e686537c31..d83f7bc4a6 100644 --- a/driver/temp_sensor/f75303.c +++ b/driver/temp_sensor/f75303.c @@ -6,11 +6,11 @@ /* F75303 temperature sensor module for Chrome EC */ #include "common.h" +#include "console.h" #include "f75303.h" -#include "i2c.h" #include "hooks.h" +#include "i2c.h" #include "util.h" -#include "console.h" static int temps[F75303_IDX_COUNT]; static int8_t fake_temp[F75303_IDX_COUNT] = { -1, -1, -1 }; diff --git a/driver/temp_sensor/g753.c b/driver/temp_sensor/g753.c index 8d94cac4f8..f162cbf846 100644 --- a/driver/temp_sensor/g753.c +++ b/driver/temp_sensor/g753.c @@ -9,8 +9,8 @@ #include "console.h" #include "g753.h" #include "gpio.h" -#include "i2c.h" #include "hooks.h" +#include "i2c.h" #include "util.h" static int temp_val_local; diff --git a/driver/temp_sensor/g78x.c b/driver/temp_sensor/g78x.c index 82cb2d26e9..413e2dda8a 100644 --- a/driver/temp_sensor/g78x.c +++ b/driver/temp_sensor/g78x.c @@ -9,8 +9,8 @@ #include "console.h" #include "g78x.h" #include "gpio.h" -#include "i2c.h" #include "hooks.h" +#include "i2c.h" #include "util.h" static int temp_val_local; diff --git a/driver/temp_sensor/oti502.c b/driver/temp_sensor/oti502.c index 2051df89f6..4564ad9257 100644 --- a/driver/temp_sensor/oti502.c +++ b/driver/temp_sensor/oti502.c @@ -7,9 +7,9 @@ #include "common.h" #include "console.h" -#include "oti502.h" -#include "i2c.h" #include "hooks.h" +#include "i2c.h" +#include "oti502.h" #include "util.h" static int temp_val_ambient; /* Ambient is chip temperature*/ diff --git a/driver/temp_sensor/pct2075.c b/driver/temp_sensor/pct2075.c index de951ca6b1..02150ad796 100644 --- a/driver/temp_sensor/pct2075.c +++ b/driver/temp_sensor/pct2075.c @@ -7,8 +7,8 @@ #include "common.h" #include "console.h" -#include "i2c.h" #include "hooks.h" +#include "i2c.h" #include "math_util.h" #include "temp_sensor/pct2075.h" #include "util.h" diff --git a/driver/temp_sensor/tmp112.c b/driver/temp_sensor/tmp112.c index 1af8679421..267227f6f3 100644 --- a/driver/temp_sensor/tmp112.c +++ b/driver/temp_sensor/tmp112.c @@ -7,8 +7,8 @@ #include "common.h" #include "console.h" -#include "i2c.h" #include "hooks.h" +#include "i2c.h" #include "math_util.h" #include "temp_sensor/tmp112.h" #include "util.h" diff --git a/driver/temp_sensor/tmp411.c b/driver/temp_sensor/tmp411.c index 8a14440671..4f8a08a181 100644 --- a/driver/temp_sensor/tmp411.c +++ b/driver/temp_sensor/tmp411.c @@ -7,10 +7,10 @@ #include "common.h" #include "console.h" -#include "tmp411.h" #include "gpio.h" -#include "i2c.h" #include "hooks.h" +#include "i2c.h" +#include "tmp411.h" #include "util.h" static int temp_val_local; diff --git a/driver/temp_sensor/tmp432.c b/driver/temp_sensor/tmp432.c index fde6536536..581e33b979 100644 --- a/driver/temp_sensor/tmp432.c +++ b/driver/temp_sensor/tmp432.c @@ -7,10 +7,10 @@ #include "common.h" #include "console.h" -#include "tmp432.h" #include "gpio.h" -#include "i2c.h" #include "hooks.h" +#include "i2c.h" +#include "tmp432.h" #include "util.h" static int temp_val_local; diff --git a/driver/temp_sensor/tmp468.c b/driver/temp_sensor/tmp468.c index 87eb040460..3bfaeeedbb 100644 --- a/driver/temp_sensor/tmp468.c +++ b/driver/temp_sensor/tmp468.c @@ -7,13 +7,12 @@ #include "common.h" #include "console.h" -#include "tmp432.h" #include "gpio.h" -#include "i2c.h" #include "hooks.h" -#include "util.h" - +#include "i2c.h" +#include "tmp432.h" #include "tmp468.h" +#include "util.h" static int fake_temp[TMP468_CHANNEL_COUNT] = { -1, -1, -1, -1, -1, -1, -1, -1, -1 }; diff --git a/driver/touchpad_elan.c b/driver/touchpad_elan.c index 05c081a84a..7dacf9fdb1 100644 --- a/driver/touchpad_elan.c +++ b/driver/touchpad_elan.c @@ -7,20 +7,20 @@ #include "common.h" #include "console.h" #include "gpio.h" -#include "hwtimer.h" #include "hooks.h" +#include "hwtimer.h" #include "i2c.h" #include "math_util.h" #include "sha256.h" #include "shared_mem.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "timer.h" #include "touchpad.h" #include "update_fw.h" -#include "util.h" #include "usb_api.h" #include "usb_hid_touchpad.h" +#include "util.h" #include "watchdog.h" /* Console output macros */ diff --git a/driver/touchpad_gt7288.c b/driver/touchpad_gt7288.c index 9d9b31a22b..f225c5b7eb 100644 --- a/driver/touchpad_gt7288.c +++ b/driver/touchpad_gt7288.c @@ -3,8 +3,6 @@ * found in the LICENSE file. */ -#include <stdbool.h> - #include "common.h" #include "console.h" #include "hooks.h" @@ -13,6 +11,8 @@ #include "touchpad_gt7288.h" #include "util.h" +#include <stdbool.h> + /* Define this to enable various warning messages during report parsing. */ #undef DEBUG_CHECKS diff --git a/driver/touchpad_st.c b/driver/touchpad_st.c index f66df6ab2a..f71b952f86 100644 --- a/driver/touchpad_st.c +++ b/driver/touchpad_st.c @@ -8,14 +8,14 @@ #include "common.h" #include "console.h" #include "gpio.h" -#include "hwtimer.h" #include "hooks.h" +#include "hwtimer.h" #include "i2c.h" #include "printf.h" #include "registers.h" #include "spi.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "timer.h" #include "touchpad.h" #include "touchpad_st.h" diff --git a/driver/touchpad_st.h b/driver/touchpad_st.h index 6ea3f6aeb0..1dee7f0947 100644 --- a/driver/touchpad_st.h +++ b/driver/touchpad_st.h @@ -6,10 +6,10 @@ #ifndef __CROS_EC_TOUCHPAD_ST_H #define __CROS_EC_TOUCHPAD_ST_H -#include <stdint.h> - #include "common.h" +#include <stdint.h> + #define ST_VENDOR_ID 0x0483 #define ST_TP_EXTRA_BYTE 1 diff --git a/driver/usb_mux/pi3usb3x532.h b/driver/usb_mux/pi3usb3x532.h index 9214d349f0..d0a7abaa89 100644 --- a/driver/usb_mux/pi3usb3x532.h +++ b/driver/usb_mux/pi3usb3x532.h @@ -12,8 +12,8 @@ #ifndef __CROS_EC_PI3USB3X532_H #define __CROS_EC_PI3USB3X532_H -#include "usb_pd.h" #include "usb_mux.h" +#include "usb_pd.h" /* I2C Addresses */ #define PI3USB3X532_I2C_ADDR0 0x54 diff --git a/driver/usb_mux/tusb1064.h b/driver/usb_mux/tusb1064.h index 1a38290174..0e366f1bc9 100644 --- a/driver/usb_mux/tusb1064.h +++ b/driver/usb_mux/tusb1064.h @@ -6,9 +6,10 @@ #ifndef __CROS_EC_TUSB1064_H #define __CROS_EC_TUSB1064_H -#include <stdint.h> #include "usb_mux.h" +#include <stdint.h> + /* * TUSB1064 Has 16 possible device addresses which are selected by A1|A0 lines * using 4 level inputs. diff --git a/driver/usb_mux/usb_mux.c b/driver/usb_mux/usb_mux.c index edc9da5778..73c8a165bf 100644 --- a/driver/usb_mux/usb_mux.c +++ b/driver/usb_mux/usb_mux.c @@ -7,9 +7,9 @@ #include "atomic.h" #include "builtin/assert.h" +#include "chipset.h" #include "common.h" #include "console.h" -#include "chipset.h" #include "ec_commands.h" #include "hooks.h" #include "host_command.h" diff --git a/driver/wpc/p9221.h b/driver/wpc/p9221.h index 53dcc57aa7..1360c54ee7 100644 --- a/driver/wpc/p9221.h +++ b/driver/wpc/p9221.h @@ -10,9 +10,9 @@ #ifndef __P9221_R7_H #define __P9221_R7_H +#include "charge_manager.h" #include "common.h" #include "gpio.h" -#include "charge_manager.h" #include "task.h" /* ========== Variant-specific configuration ============ */ diff --git a/include/driver/accel_lis2dw12_public.h b/include/driver/accel_lis2dw12_public.h index 5596e6ba6a..163bc8ae21 100644 --- a/include/driver/accel_lis2dw12_public.h +++ b/include/driver/accel_lis2dw12_public.h @@ -8,6 +8,7 @@ #ifndef __CROS_EC_DRIVER_ACCEL_LIS2DW12_PUBLIC_H #define __CROS_EC_DRIVER_ACCEL_LIS2DW12_PUBLIC_H +#include "config.h" #include "gpio_signal.h" extern const struct accelgyro_drv lis2dw12_drv; |