diff options
511 files changed, 1203 insertions, 1074 deletions
diff --git a/baseboard/asurada/baseboard.c b/baseboard/asurada/baseboard.c index c315841a6a..0e467140b3 100644 --- a/baseboard/asurada/baseboard.c +++ b/baseboard/asurada/baseboard.c @@ -41,7 +41,7 @@ #include "timer.h" #include "uart.h" -/* This must be last. */ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Wake-up pins for hibernate */ diff --git a/baseboard/cherry/baseboard.c b/baseboard/cherry/baseboard.c index 4e0a00e1ad..1a4277a2b9 100644 --- a/baseboard/cherry/baseboard.c +++ b/baseboard/cherry/baseboard.c @@ -50,6 +50,7 @@ static void bc12_interrupt(enum gpio_signal signal); static void ppc_interrupt(enum gpio_signal signal); static void xhci_init_done_interrupt(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) diff --git a/baseboard/goroh/baseboard.c b/baseboard/goroh/baseboard.c index 3ad5eda917..c94e7a3af9 100644 --- a/baseboard/goroh/baseboard.c +++ b/baseboard/goroh/baseboard.c @@ -44,7 +44,7 @@ #include "usb_pd_tcpm.h" #include "usbc_ppc.h" -/* Must be last. */ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) diff --git a/baseboard/ite_evb/baseboard.c b/baseboard/ite_evb/baseboard.c index 4c82a91d4b..f2077197ff 100644 --- a/baseboard/ite_evb/baseboard.c +++ b/baseboard/ite_evb/baseboard.c @@ -26,7 +26,7 @@ #include "uart.h" #include "util.h" -/* Must be last. */ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #if defined(CONFIG_FANS) || defined(CONFIG_PWM) diff --git a/baseboard/kalista/baseboard.c b/baseboard/kalista/baseboard.c index 7b20ea6a43..e877b4ca15 100644 --- a/baseboard/kalista/baseboard.c +++ b/baseboard/kalista/baseboard.c @@ -87,6 +87,7 @@ void vbus0_evt(enum gpio_signal signal) task_wake(TASK_ID_PD_C0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Hibernate wake configuration */ diff --git a/baseboard/mtscp-rv32i/baseboard.c b/baseboard/mtscp-rv32i/baseboard.c index c86ef15ad7..e9ec4c6924 100644 --- a/baseboard/mtscp-rv32i/baseboard.c +++ b/baseboard/mtscp-rv32i/baseboard.c @@ -35,6 +35,7 @@ struct mpu_entry mpu_entries[NR_MPU_ENTRIES] = { #endif }; +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #ifdef CONFIG_PANIC_CONSOLE_OUTPUT diff --git a/board/adlrvpp_ite/board.c b/board/adlrvpp_ite/board.c index aa2764f823..63bbbfd78c 100644 --- a/board/adlrvpp_ite/board.c +++ b/board/adlrvpp_ite/board.c @@ -25,7 +25,8 @@ #include "usb_pd_tcpm.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* I2C ports */ diff --git a/board/adlrvpp_mchp1521/board.c b/board/adlrvpp_mchp1521/board.c index a65a3ec60e..0ec53d1eb5 100644 --- a/board/adlrvpp_mchp1521/board.c +++ b/board/adlrvpp_mchp1521/board.c @@ -27,7 +27,8 @@ #include "usb_pd_tcpm.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* I2C ports */ diff --git a/board/adlrvpp_mchp1727/board.c b/board/adlrvpp_mchp1727/board.c index 46092b91e3..1d0189d90b 100644 --- a/board/adlrvpp_mchp1727/board.c +++ b/board/adlrvpp_mchp1727/board.c @@ -11,14 +11,15 @@ #include "pca9675.h" #include "power.h" #include "power_button.h" +#include "spi.h" +#include "spi_chip.h" #include "switch.h" #include "tablet_mode.h" #include "uart.h" #include "usb_pd_tcpm.h" -#include "spi.h" -#include "spi_chip.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* I2C ports */ diff --git a/board/adlrvpp_npcx/board.c b/board/adlrvpp_npcx/board.c index f0b2a4408d..9736f81807 100644 --- a/board/adlrvpp_npcx/board.c +++ b/board/adlrvpp_npcx/board.c @@ -16,7 +16,8 @@ #include "uart.h" #include "usb_pd_tcpm.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* I2C ports */ diff --git a/board/agah/board.c b/board/agah/board.c index c8c98621d3..44f811688d 100644 --- a/board/agah/board.c +++ b/board/agah/board.c @@ -10,15 +10,15 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" +#include "driver/nvidia_gpu.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" #include "hooks.h" -#include "fw_config.h" -#include "hooks.h" #include "keyboard_scan.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "system.h" @@ -26,9 +26,8 @@ #include "usbc_config.h" #include "util.h" -#include "driver/nvidia_gpu.h" - -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/agah/charger_isl9241.c b/board/agah/charger_isl9241.c index d5f3d1a0b4..902bd57aa3 100644 --- a/board/agah/charger_isl9241.c +++ b/board/agah/charger_isl9241.c @@ -33,12 +33,11 @@ * bypass mode. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/isl9241.h" @@ -46,8 +45,8 @@ #include "hooks.h" #include "stdbool.h" #include "throttle_ap.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/agah/fans.c b/board/agah/fans.c index 8eaf7a41a8..be4d335cfe 100644 --- a/board/agah/fans.c +++ b/board/agah/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/agah/led.c b/board/agah/led.c index e16b3df5d6..d5b27f128d 100644 --- a/board/agah/led.c +++ b/board/agah/led.c @@ -5,8 +5,6 @@ * Battery LED control for Agah */ -#include <stdint.h> - #include "battery.h" #include "charge_manager.h" #include "charge_state.h" @@ -17,6 +15,8 @@ #include "led_common.h" #include "task.h" +#include <stdint.h> + #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/agah/pwm.c b/board/agah/pwm.c index 9fa0f41eff..e936feabfb 100644 --- a/board/agah/pwm.c +++ b/board/agah/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/agah/sensors.c b/board/agah/sensors.c index 046787872d..591eb9fccd 100644 --- a/board/agah/sensors.c +++ b/board/agah/sensors.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc.h" +#include "common.h" #include "hooks.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ struct adc_t adc_channels[] = { diff --git a/board/agah/usbc_config.c b/board/agah/usbc_config.c index d078ef59ac..ac2fb54b86 100644 --- a/board/agah/usbc_config.c +++ b/board/agah/usbc_config.c @@ -3,12 +3,9 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "cbi.h" -#include "charger.h" #include "charge_ramp.h" +#include "charger.h" #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -26,12 +23,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/akemi/board.c b/board/akemi/board.c index 7d480b1268..0665ca1c4e 100644 --- a/board/akemi/board.c +++ b/board/akemi/board.c @@ -6,6 +6,7 @@ /* Hatch board-specific configuration */ #include "adc.h" +#include "battery_smart.h" #include "button.h" #include "common.h" #include "cros_board_info.h" @@ -34,14 +35,13 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" #include "usbc_ppc.h" #include "util.h" -#include "battery_smart.h" #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) @@ -101,7 +101,8 @@ static void bc12_interrupt(enum gpio_signal signal) } } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/akemi/led.c b/board/akemi/led.c index 49f767a28e..b1fa2ddbb6 100644 --- a/board/akemi/led.c +++ b/board/akemi/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Akemi */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/aleena/board.c b/board/aleena/board.c index 0970a7513c..920b339bdf 100644 --- a/board/aleena/board.c +++ b/board/aleena/board.c @@ -6,10 +6,10 @@ /* Aleena board-specific configuration */ #include "button.h" -#include "driver/accelgyro_bmi_common.h" #include "console.h" -#include "driver/accelgyro_icm_common.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/led/lm3630a.h" #include "extpower.h" #include "hooks.h" @@ -23,6 +23,7 @@ #include "tablet_mode.h" #include "task.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" const enum gpio_signal hibernate_wake_pins[] = { diff --git a/board/aleena/led.c b/board/aleena/led.c index c24bc404cc..359e9814ca 100644 --- a/board/aleena/led.c +++ b/board/aleena/led.c @@ -4,11 +4,11 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" +#include "console.h" #include "gpio.h" #include "hooks.h" -#include "console.h" +#include "led_common.h" +#include "led_onoff_states.h" #define CPRINTS(format, args...) cprints(CC_HOOK, format, ##args) diff --git a/board/ambassador/board.c b/board/ambassador/board.c index 3eff9215bc..5d667e47e1 100644 --- a/board/ambassador/board.c +++ b/board/ambassador/board.c @@ -36,8 +36,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_common.h" @@ -237,7 +237,8 @@ static void adp_state_init(void) } DECLARE_HOOK(HOOK_INIT, adp_state_init, HOOK_PRIO_INIT_CHARGE_MANAGER + 1); -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/ampton/board.c b/board/ampton/board.c index f1346a6b07..ccd82d4e71 100644 --- a/board/ampton/board.c +++ b/board/ampton/board.c @@ -13,8 +13,8 @@ #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/ppc/sn5s330.h" #include "driver/sync.h" #include "driver/tcpm/it83xx_pd.h" @@ -60,7 +60,8 @@ int ppc_get_alert_status(int port) return gpio_get_level(GPIO_USB_C1_PD_INT_ODL) == 0; } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* USB-C MUX Configuration */ diff --git a/board/anahera/board.c b/board/anahera/board.c index cd9eb30870..4b328e6db2 100644 --- a/board/anahera/board.c +++ b/board/anahera/board.c @@ -11,21 +11,21 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" #include "hooks.h" -#include "fw_config.h" -#include "hooks.h" #include "lid_switch.h" #include "peripheral_charger.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/anahera/charger.c b/board/anahera/charger.c index 7fabd2082e..4976abdea6 100644 --- a/board/anahera/charger.c +++ b/board/anahera/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/bq25710.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/anahera/fans.c b/board/anahera/fans.c index 7d08701dc0..f60adb9cb4 100644 --- a/board/anahera/fans.c +++ b/board/anahera/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/anahera/i2c.c b/board/anahera/i2c.c index 7e7993b4d5..e9ccf2d928 100644 --- a/board/anahera/i2c.c +++ b/board/anahera/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/anahera/led.c b/board/anahera/led.c index d7a3d07efc..1d76fc342d 100644 --- a/board/anahera/led.c +++ b/board/anahera/led.c @@ -5,8 +5,6 @@ * Power and battery LED control for Redrix */ -#include <stdint.h> - #include "battery.h" #include "charge_manager.h" #include "charge_state.h" @@ -17,6 +15,8 @@ #include "led_common.h" #include "task.h" +#include <stdint.h> + #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/anahera/pwm.c b/board/anahera/pwm.c index b242683306..1d1747413f 100644 --- a/board/anahera/pwm.c +++ b/board/anahera/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/anahera/sensors.c b/board/anahera/sensors.c index 05d9a9080b..6946e0cd13 100644 --- a/board/anahera/sensors.c +++ b/board/anahera/sensors.c @@ -3,11 +3,11 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc_chip.h" +#include "common.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/anahera/usbc_config.c b/board/anahera/usbc_config.c index b0fd5551d9..907f236d70 100644 --- a/board/anahera/usbc_config.c +++ b/board/anahera/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -25,12 +22,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/arcada_ish/board.c b/board/arcada_ish/board.c index d340f61251..efd0f8a0ca 100644 --- a/board/arcada_ish/board.c +++ b/board/arcada_ish/board.c @@ -19,7 +19,8 @@ #include "tablet_mode.h" #include "task.h" -#include "gpio_list.h" /* has to be included last */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* I2C port map */ const struct i2c_port_t i2c_ports[] = { diff --git a/board/asurada/board.c b/board/asurada/board.c index 4e4aede76d..82cda97dfd 100644 --- a/board/asurada/board.c +++ b/board/asurada/board.c @@ -14,8 +14,8 @@ #include "console.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/als_tcs3400.h" #include "driver/tcpm/it83xx_pd.h" #include "driver/temp_sensor/thermistor.h" diff --git a/board/asurada/led_hayato.c b/board/asurada/led_hayato.c index be1a352289..2243895257 100644 --- a/board/asurada/led_hayato.c +++ b/board/asurada/led_hayato.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ +#include "chipset.h" +#include "driver/bc12/mt6360.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" -#include "driver/bc12/mt6360.h" __override const int led_charge_lvl_1 = 5; __override const int led_charge_lvl_2 = 95; diff --git a/board/atlas/board.c b/board/atlas/board.c index d2562d43d3..4ce7f97461 100644 --- a/board/atlas/board.c +++ b/board/atlas/board.c @@ -9,13 +9,13 @@ #include "bd99992gw.h" #include "board_config.h" #include "charge_manager.h" -#include "charger.h" #include "charge_state.h" +#include "charger.h" #include "chipset.h" #include "console.h" #include "driver/als_opt3001.h" -#include "driver/pmic_bd99992gw.h" #include "driver/charger/isl923x.h" +#include "driver/pmic_bd99992gw.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" #include "driver/tcpm/tcpm.h" @@ -30,10 +30,10 @@ #include "lid_switch.h" #include "motion_sense.h" #include "panic.h" -#include "power_button.h" #include "power.h" -#include "pwm_chip.h" +#include "power_button.h" #include "pwm.h" +#include "pwm_chip.h" #include "spi.h" #include "switch.h" #include "system.h" @@ -68,6 +68,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(port); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Keyboard scan. Increase output_settle_us to 80us from default 50us. */ diff --git a/board/atlas/usb_pd_policy.c b/board/atlas/usb_pd_policy.c index fc7a2141f5..6ade3c0b82 100644 --- a/board/atlas/usb_pd_policy.c +++ b/board/atlas/usb_pd_policy.c @@ -4,12 +4,12 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "chipset.h" #include "common.h" #include "console.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -18,10 +18,10 @@ #include "task.h" #include "tcpm/tcpci.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/baklava/board.c b/board/baklava/board.c index dc0b3a952a..7b945a11d9 100644 --- a/board/baklava/board.c +++ b/board/baklava/board.c @@ -21,11 +21,11 @@ #include "usb_descriptor.h" #include "usb_mux.h" #include "usb_pd.h" -#include "usbc_ppc.h" #include "usb_pd_dp_ufp.h" #include "usb_pe_sm.h" #include "usb_prl_sm.h" #include "usb_tc_sm.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) @@ -76,7 +76,8 @@ static void board_usbc_usb3_interrupt(enum gpio_signal signal) } #endif /* SECTION_IS_RW */ -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* * Table GPIO signals control both power rails and reset lines to various chips diff --git a/board/banshee/board.c b/board/banshee/board.c index 73363e8935..55922d056b 100644 --- a/board/banshee/board.c +++ b/board/banshee/board.c @@ -11,25 +11,25 @@ #include "compile_time_macros.h" #include "console.h" #include "cros_board_info.h" -#include "gpio.h" -#include "gpio_signal.h" -#include "hooks.h" #include "driver/als_tcs3400.h" #include "driver/charger/isl9241.h" #include "fw_config.h" +#include "gpio.h" +#include "gpio_signal.h" #include "hooks.h" #include "keyboard_customization.h" #include "keyboard_scan.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" #include "watchdog.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/banshee/charger.c b/board/banshee/charger.c index 7a16fcd5cb..c6ee062ab5 100644 --- a/board/banshee/charger.c +++ b/board/banshee/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/isl9241.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/banshee/fans.c b/board/banshee/fans.c index 0658dc8859..72bf05527f 100644 --- a/board/banshee/fans.c +++ b/board/banshee/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/banshee/keyboard_customization.c b/board/banshee/keyboard_customization.c index dfec873343..7cda869e1c 100644 --- a/board/banshee/keyboard_customization.c +++ b/board/banshee/keyboard_customization.c @@ -5,9 +5,9 @@ #include "common.h" #include "gpio.h" -#include "keyboard_customization.h" #include "keyboard_8042_sharedlib.h" #include "keyboard_config.h" +#include "keyboard_customization.h" #include "keyboard_protocol.h" #include "keyboard_raw.h" #include "keyboard_scan.h" diff --git a/board/banshee/led.c b/board/banshee/led.c index 1471388085..f0ea78cab2 100644 --- a/board/banshee/led.c +++ b/board/banshee/led.c @@ -10,21 +10,21 @@ * amber while charging the battery and white when the battery is charged. */ -#include <stdint.h> - -#include "common.h" #include "charge_manager.h" #include "charge_state.h" +#include "common.h" #include "compile_time_macros.h" #include "ec_commands.h" #include "gpio.h" #include "hooks.h" -#include "lid_switch.h" #include "led_common.h" #include "led_pwm.h" +#include "lid_switch.h" #include "pwm.h" #include "util.h" +#include <stdint.h> + #define LED_TICKS_PER_CYCLE 10 #define LED_ON_TICKS 5 diff --git a/board/banshee/pwm.c b/board/banshee/pwm.c index bfe5071eca..41e762d6f8 100644 --- a/board/banshee/pwm.c +++ b/board/banshee/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/banshee/sensors.c b/board/banshee/sensors.c index 57b81b2af8..a6bd3d3863 100644 --- a/board/banshee/sensors.c +++ b/board/banshee/sensors.c @@ -3,15 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc.h" +#include "common.h" #include "driver/als_cm32183.h" #include "hooks.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ struct adc_t adc_channels[] = { diff --git a/board/banshee/usbc_config.c b/board/banshee/usbc_config.c index 2b9d28f0e1..86d799a58b 100644 --- a/board/banshee/usbc_config.c +++ b/board/banshee/usbc_config.c @@ -3,12 +3,9 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "cbi.h" -#include "charger.h" #include "charge_ramp.h" +#include "charger.h" #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -29,12 +26,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/beadrix/board.c b/board/beadrix/board.c index 24c6cb960e..d14996c6e5 100644 --- a/board/beadrix/board.c +++ b/board/beadrix/board.c @@ -13,12 +13,12 @@ #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" #include "driver/retimer/nb7v904m.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/anx7447.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" -#include "driver/usb_mux/pi3usb3x532.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" +#include "driver/usb_mux/pi3usb3x532.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" diff --git a/board/beetley/board.c b/board/beetley/board.c index 89a1d6b13f..697e2a50fe 100644 --- a/board/beetley/board.c +++ b/board/beetley/board.c @@ -8,18 +8,18 @@ #include "adc_chip.h" #include "button.h" #include "cbi_fw_config.h" -#include "cros_board_info.h" #include "cbi_ssfc.h" #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "cros_board_info.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/beetley/led.c b/board/beetley/led.c index e3d4eb543e..8a79e41773 100644 --- a/board/beetley/led.c +++ b/board/beetley/led.c @@ -6,9 +6,9 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" #include "gpio.h" +#include "led_common.h" +#include "led_onoff_states.h" #include "pwm.h" #define LED_OFF_LVL 0 diff --git a/board/bellis/board.c b/board/bellis/board.c index 3acdb66e4f..a776f119fe 100644 --- a/board/bellis/board.c +++ b/board/bellis/board.c @@ -28,8 +28,8 @@ #include "i2c.h" #include "i2c_bitbang.h" #include "it8801.h" -#include "keyboard_scan.h" #include "keyboard_backlight.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "panic.h" #include "power.h" @@ -53,6 +53,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/bellis/led.c b/board/bellis/led.c index 658533d075..420c491308 100644 --- a/board/bellis/led.c +++ b/board/bellis/led.c @@ -5,9 +5,9 @@ * Power and battery LED control for Bellis */ #include "common.h" -#include "ioexpander.h" #include "driver/ioexpander/it8801.h" #include "ec_commands.h" +#include "ioexpander.h" #include "led_common.h" #include "led_onoff_states.h" diff --git a/board/berknip/board.c b/board/berknip/board.c index cade20a3c7..ee4158e671 100644 --- a/board/berknip/board.c +++ b/board/berknip/board.c @@ -7,12 +7,12 @@ #include "adc.h" #include "button.h" -#include "charger.h" #include "cbi_ec_fw_config.h" +#include "charger.h" #include "cros_board_info.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/retimer/pi3hdx1204.h" #include "driver/retimer/tusb544.h" #include "driver/temp_sensor/sb_tsi.h" @@ -38,6 +38,7 @@ static void hdmi_hpd_interrupt(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/berknip/board.h b/board/berknip/board.h index 62261f284b..454432ba0a 100644 --- a/board/berknip/board.h +++ b/board/berknip/board.h @@ -10,9 +10,10 @@ #define VARIANT_ZORK_TREMBYLE -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #define RPM_DEVIATION 1 #define CONFIG_FAN_RPM_CUSTOM diff --git a/board/berknip/led.c b/board/berknip/led.c index afa3c3e5d2..c2b0e69cbb 100644 --- a/board/berknip/led.c +++ b/board/berknip/led.c @@ -9,9 +9,9 @@ #include "chipset.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "hooks.h" #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/blipper/board.c b/board/blipper/board.c index ce1bc27700..58867cafb2 100644 --- a/board/blipper/board.c +++ b/board/blipper/board.c @@ -8,23 +8,23 @@ #include "adc_chip.h" #include "button.h" #include "cbi_fw_config.h" -#include "cros_board_info.h" #include "cbi_ssfc.h" #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "cros_board_info.h" #include "driver/accel_lis2dw12.h" +#include "driver/accelgyro_bmi260.h" +#include "driver/accelgyro_bmi_common.h" +#include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" -#include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_bmi260.h" -#include "driver/accelgyro_icm42607.h" -#include "driver/accelgyro_icm_common.h" #include "gpio.h" #include "hooks.h" #include "intc.h" diff --git a/board/blipper/led.c b/board/blipper/led.c index c6617d081c..afba103db6 100644 --- a/board/blipper/led.c +++ b/board/blipper/led.c @@ -6,9 +6,9 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" #include "gpio.h" +#include "led_common.h" +#include "led_onoff_states.h" #include "pwm.h" #define LED_OFF_LVL 0 diff --git a/board/bloog/led.c b/board/bloog/led.c index 22f5bc5523..c11244b613 100644 --- a/board/bloog/led.c +++ b/board/bloog/led.c @@ -11,9 +11,9 @@ #include "chipset.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "hooks.h" #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/boldar/board.c b/board/boldar/board.c index 1076ccc040..3972c6746a 100644 --- a/board/boldar/board.c +++ b/board/boldar/board.c @@ -4,10 +4,10 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi260.h" #include "driver/als_tcs3400.h" @@ -34,8 +34,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "uart.h" #include "usb_mux.h" @@ -45,7 +45,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/boldar/sensors.c b/board/boldar/sensors.c index 0670223f13..90c79a8675 100644 --- a/board/boldar/sensors.c +++ b/board/boldar/sensors.c @@ -4,19 +4,19 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" +#include "common.h" #include "driver/accel_lis2dh.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi260.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/als_tcs3400.h" #include "driver/sync.h" -#include "keyboard_scan.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "task.h" +#include "keyboard_scan.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" /******************************************************************************/ diff --git a/board/boten/board.c b/board/boten/board.c index fc70b11ada..fe23078c4c 100644 --- a/board/boten/board.c +++ b/board/boten/board.c @@ -15,9 +15,9 @@ #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/boten/led.c b/board/boten/led.c index ca2f7c9399..c61ffba6fe 100644 --- a/board/boten/led.c +++ b/board/boten/led.c @@ -6,9 +6,9 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" #include "gpio.h" +#include "led_common.h" +#include "led_onoff_states.h" #include "pwm.h" #define LED_OFF_LVL 0 diff --git a/board/brask/board.c b/board/brask/board.c index fa03ab35bd..19753765c2 100644 --- a/board/brask/board.c +++ b/board/brask/board.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 <stdbool.h> - #include "adc.h" #include "builtin/assert.h" #include "button.h" @@ -13,18 +11,20 @@ #include "compile_time_macros.h" #include "console.h" #include "cros_board_info.h" +#include "driver/tcpm/tcpci.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" -#include "power_button.h" #include "hooks.h" #include "peripheral_charger.h" #include "power.h" +#include "power_button.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" #include "usbc_ppc.h" -#include "driver/tcpm/tcpci.h" -#include "fw_config.h" + +#include <stdbool.h> /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) @@ -219,7 +219,8 @@ static void port_ocp_interrupt(enum gpio_signal signal) { hook_call_deferred(&update_5v_usage_data, 0); } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* diff --git a/board/brask/fans.c b/board/brask/fans.c index 6828438a10..3f3ad3ccea 100644 --- a/board/brask/fans.c +++ b/board/brask/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/brask/i2c.c b/board/brask/i2c.c index 3af3e43d75..b7666edc60 100644 --- a/board/brask/i2c.c +++ b/board/brask/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/brask/pwm.c b/board/brask/pwm.c index 1804cb5586..35fc1f5a98 100644 --- a/board/brask/pwm.c +++ b/board/brask/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/brask/sensors.c b/board/brask/sensors.c index b5caaaf717..c6b12a84bf 100644 --- a/board/brask/sensors.c +++ b/board/brask/sensors.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc_chip.h" +#include "common.h" #include "hooks.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/brask/usbc_config.c b/board/brask/usbc_config.c index 5cec791afc..b28f6dc28d 100644 --- a/board/brask/usbc_config.c +++ b/board/brask/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -25,12 +22,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/brya/board.c b/board/brya/board.c index 50b13e8743..66c25e0641 100644 --- a/board/brya/board.c +++ b/board/brya/board.c @@ -9,23 +9,24 @@ #include "charger.h" #include "common.h" #include "console.h" -#include "driver/accelgyro_lsm6dso.h" #include "driver/accel_lis2dw12.h" +#include "driver/accelgyro_lsm6dso.h" #include "driver/als_tcs3400.h" #include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" #include "hooks.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/brya/charger.c b/board/brya/charger.c index 7fabd2082e..4976abdea6 100644 --- a/board/brya/charger.c +++ b/board/brya/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/bq25710.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/brya/fans.c b/board/brya/fans.c index eb9bb8a809..ff8f27c69e 100644 --- a/board/brya/fans.c +++ b/board/brya/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/brya/keyboard.c b/board/brya/keyboard.c index 0ebe25dc90..156d4b49dd 100644 --- a/board/brya/keyboard.c +++ b/board/brya/keyboard.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "keyboard_scan.h" #include "timer.h" diff --git a/board/brya/led.c b/board/brya/led.c index fec5a13311..80814523e7 100644 --- a/board/brya/led.c +++ b/board/brya/led.c @@ -9,8 +9,6 @@ * amber while charging the battery and white when the battery is charged. */ -#include <stdint.h> - #include "common.h" #include "compile_time_macros.h" #include "ec_commands.h" @@ -18,6 +16,8 @@ #include "pwm.h" #include "util.h" +#include <stdint.h> + const enum ec_led_id supported_led_ids[] = { EC_LED_ID_LEFT_LED, EC_LED_ID_RIGHT_LED, diff --git a/board/brya/pwm.c b/board/brya/pwm.c index bb578968b7..dad5d5c444 100644 --- a/board/brya/pwm.c +++ b/board/brya/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/brya/sensors.c b/board/brya/sensors.c index 8ab5b58d7e..5868ba12ef 100644 --- a/board/brya/sensors.c +++ b/board/brya/sensors.c @@ -3,9 +3,9 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc.h" +#include "common.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_lsm6dso.h" #include "driver/als_tcs3400_public.h" @@ -13,8 +13,8 @@ #include "hooks.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ struct adc_t adc_channels[] = { diff --git a/board/brya/usbc_config.c b/board/brya/usbc_config.c index d30d9a4391..d9a2f4cc98 100644 --- a/board/brya/usbc_config.c +++ b/board/brya/usbc_config.c @@ -3,12 +3,9 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "cbi.h" -#include "charger.h" #include "charge_ramp.h" +#include "charger.h" #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -29,12 +26,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/bugzzy/board.c b/board/bugzzy/board.c index 443f5f6d2f..c3f62e8787 100644 --- a/board/bugzzy/board.c +++ b/board/bugzzy/board.c @@ -128,6 +128,7 @@ static void sub_hdmi_hpd_interrupt(enum gpio_signal s) gpio_set_level(GPIO_EC_AP_USB_C1_HDMI_HPD, !hdmi_hpd_odl); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/burnet/board.c b/board/burnet/board.c index a89250ae34..f7bfd3dfe3 100644 --- a/board/burnet/board.c +++ b/board/burnet/board.c @@ -16,8 +16,8 @@ #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/battery/max17055.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" @@ -57,6 +57,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/c2d2/board.c b/board/c2d2/board.c index fa6373c861..9c131e17d5 100644 --- a/board/c2d2/board.c +++ b/board/c2d2/board.c @@ -19,15 +19,16 @@ #include "task.h" #include "timer.h" #include "update_fw.h" +#include "usart-stm32f0.h" #include "usart_rx_dma.h" #include "usart_tx_dma.h" -#include "usart-stm32f0.h" +#include "usb-stream.h" #include "usb_hw.h" #include "usb_i2c.h" #include "usb_spi.h" -#include "usb-stream.h" #include "util.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) diff --git a/board/cappy2/board.c b/board/cappy2/board.c index 7956ae77f5..99f9f1bf73 100644 --- a/board/cappy2/board.c +++ b/board/cappy2/board.c @@ -89,6 +89,7 @@ static void c0_ccsbu_ovp_interrupt(enum gpio_signal s) /* Keyboard scan setting */ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/careena/board.c b/board/careena/board.c index cfe7199a91..01c92dfe1a 100644 --- a/board/careena/board.c +++ b/board/careena/board.c @@ -18,6 +18,7 @@ #include "switch.h" #include "thermal.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" const enum gpio_signal hibernate_wake_pins[] = { diff --git a/board/careena/led.c b/board/careena/led.c index 9a280a011b..fda7503974 100644 --- a/board/careena/led.c +++ b/board/careena/led.c @@ -14,8 +14,8 @@ #include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "util.h" #include "system.h" +#include "util.h" #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/casta/board.c b/board/casta/board.c index 2ae65c7d86..5529c3a36d 100644 --- a/board/casta/board.c +++ b/board/casta/board.c @@ -60,7 +60,7 @@ static void ppc_interrupt(enum gpio_signal signal) } } -/* Must come after other header files and GPIO interrupts*/ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/cerise/board.c b/board/cerise/board.c index 9b214f2dae..7e51420dfd 100644 --- a/board/cerise/board.c +++ b/board/cerise/board.c @@ -55,6 +55,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/cerise/led.c b/board/cerise/led.c index 81203ba331..622ab9feb6 100644 --- a/board/cerise/led.c +++ b/board/cerise/led.c @@ -5,12 +5,12 @@ * Power and battery LED control for Damu */ #include "common.h" -#include "ioexpander.h" #include "driver/ioexpander/it8801.h" #include "ec_commands.h" +#include "hooks.h" +#include "ioexpander.h" #include "led_common.h" #include "led_onoff_states.h" -#include "hooks.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/chocodile_vpdmcu/board.c b/board/chocodile_vpdmcu/board.c index a64da1633e..098d7bb61b 100644 --- a/board/chocodile_vpdmcu/board.c +++ b/board/chocodile_vpdmcu/board.c @@ -28,6 +28,7 @@ void board_config_pre_init(void) STM32_RCC_APB2ENR |= 1 << 0; } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Initialize board. */ diff --git a/board/chocodile_vpdmcu/vpd_api.c b/board/chocodile_vpdmcu/vpd_api.c index fdfdf47efc..53cc0fa733 100644 --- a/board/chocodile_vpdmcu/vpd_api.c +++ b/board/chocodile_vpdmcu/vpd_api.c @@ -4,10 +4,10 @@ */ #include "adc.h" +#include "driver/tcpm/tcpm.h" #include "gpio.h" #include "registers.h" #include "vpd_api.h" -#include "driver/tcpm/tcpm.h" /* * Polarity based on 'DFP Perspective' (see table 4-10 USB Type-C Cable and diff --git a/board/chronicler/board.c b/board/chronicler/board.c index 40cefc714d..daec7df9c3 100644 --- a/board/chronicler/board.c +++ b/board/chronicler/board.c @@ -4,13 +4,13 @@ */ /* Chronicler board-specific configuration */ +#include "accelgyro.h" #include "battery.h" #include "battery_smart.h" #include "button.h" +#include "cbi_ec_fw_config.h" #include "charge_state_v2.h" #include "common.h" -#include "accelgyro.h" -#include "cbi_ec_fw_config.h" #include "driver/sync.h" #include "driver/tcpm/ps8xxx.h" #include "extpower.h" @@ -34,7 +34,8 @@ #include "usb_pd_tcpm.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/chronicler/board.h b/board/chronicler/board.h index 71ef0bd959..d017b896be 100644 --- a/board/chronicler/board.h +++ b/board/chronicler/board.h @@ -138,7 +138,6 @@ #include "gpio_signal.h" #include "registers.h" - #include "usbc_config.h" enum battery_type { BATTERY_NVT_CP813907, BATTERY_TYPE_COUNT }; diff --git a/board/chronicler/cbi.c b/board/chronicler/cbi.c index 712461cd2c..a9c458b88d 100644 --- a/board/chronicler/cbi.c +++ b/board/chronicler/cbi.c @@ -4,9 +4,9 @@ */ /* Features common to ECOS and Zephyr */ -#include "common.h" #include "cbi.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "keyboard_raw.h" #include "usbc_config.h" diff --git a/board/chronicler/led.c b/board/chronicler/led.c index 8fd743101a..fd5308f09d 100644 --- a/board/chronicler/led.c +++ b/board/chronicler/led.c @@ -11,9 +11,9 @@ #include "chipset.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "hooks.h" #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/chronicler/usbc_config.c b/board/chronicler/usbc_config.c index 85c40e93e1..55ef253c5b 100644 --- a/board/chronicler/usbc_config.c +++ b/board/chronicler/usbc_config.c @@ -4,15 +4,8 @@ */ /* Volteer family-specific USB-C configuration */ -#include "common.h" #include "cbi_ec_fw_config.h" -#include "gpio.h" -#include "hooks.h" -#include "system.h" -#include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" -#include "usb_mux.h" +#include "common.h" #include "driver/bc12/pi3usb9201_public.h" #include "driver/ppc/sn5s330_public.h" #include "driver/ppc/syv682x_public.h" @@ -20,8 +13,15 @@ #include "driver/retimer/ps8811.h" #include "driver/tcpm/ps8xxx_public.h" #include "driver/tcpm/rt1715_public.h" -#include "driver/tcpm/tusb422_public.h" #include "driver/tcpm/tcpci.h" +#include "driver/tcpm/tusb422_public.h" +#include "gpio.h" +#include "hooks.h" +#include "system.h" +#include "timer.h" +#include "usb_mux.h" +#include "usbc_config.h" +#include "usbc_ppc.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/coachz/base_detect.c b/board/coachz/base_detect.c index f2195f4d8a..fbae1698de 100644 --- a/board/coachz/base_detect.c +++ b/board/coachz/base_detect.c @@ -6,8 +6,8 @@ /* Coachz base detection code */ #include "adc.h" -#include "board.h" #include "base_state.h" +#include "board.h" #include "chipset.h" #include "common.h" #include "console.h" diff --git a/board/coachz/board.c b/board/coachz/board.c index 4863cd94c9..85fe06c38d 100644 --- a/board/coachz/board.c +++ b/board/coachz/board.c @@ -10,13 +10,13 @@ #include "charge_manager.h" #include "charge_state.h" #include "common.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi260.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "lid_switch.h" @@ -29,9 +29,9 @@ #include "pwm.h" #include "pwm_chip.h" #include "queue.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_ppc.h" @@ -49,6 +49,7 @@ static void ppc_interrupt(enum gpio_signal signal); static void board_connect_c0_sbu(enum gpio_signal s); static void ks_interrupt(enum gpio_signal s); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* diff --git a/board/coachz/led.c b/board/coachz/led.c index 6623089db0..01873eae3e 100644 --- a/board/coachz/led.c +++ b/board/coachz/led.c @@ -10,13 +10,13 @@ #include "charge_state.h" #include "chipset.h" #include "ec_commands.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" #include "led_common.h" #include "system.h" #include "util.h" -#include "extpower.h" #define LED_ONE_SEC (1000 / HOOK_TICK_INTERVAL_MS) /* Battery LED blinks every per 400ms */ diff --git a/board/coachz/usbc_config.c b/board/coachz/usbc_config.c index 9409ee04fc..704d21722a 100644 --- a/board/coachz/usbc_config.c +++ b/board/coachz/usbc_config.c @@ -5,9 +5,9 @@ /* Trogdor family-specific USB-C configuration */ +#include "charge_state.h" #include "charger.h" #include "charger/isl923x_public.h" -#include "charge_state.h" #include "gpio.h" #include "usb_pd.h" diff --git a/board/coffeecake/board.c b/board/coffeecake/board.c index 05cba7e4f7..441f95d21b 100644 --- a/board/coffeecake/board.c +++ b/board/coffeecake/board.c @@ -16,10 +16,10 @@ #include "mcdp28x0.h" #include "registers.h" #include "task.h" +#include "timer.h" #include "usb_bb.h" #include "usb_descriptor.h" #include "usb_pd.h" -#include "timer.h" #include "util.h" static volatile uint64_t hpd_prev_ts; @@ -27,6 +27,7 @@ static volatile int hpd_prev_level; void hpd_event(enum gpio_signal signal); void vbus_event(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* I2C ports */ diff --git a/board/collis/board.c b/board/collis/board.c index 56c67989a5..43b8f8f6d3 100644 --- a/board/collis/board.c +++ b/board/collis/board.c @@ -4,17 +4,17 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi160.h" #include "driver/bc12/pi3usb9201.h" #include "driver/ppc/syv682x.h" +#include "driver/sync.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" -#include "driver/sync.h" #include "extpower.h" #include "fan.h" #include "fan_chip.h" @@ -28,8 +28,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "uart.h" #include "usb_mux.h" @@ -39,7 +39,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/collis/sensors.c b/board/collis/sensors.c index e647fe7d61..dac94535b3 100644 --- a/board/collis/sensors.c +++ b/board/collis/sensors.c @@ -4,23 +4,23 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" #include "cbi_ec_fw_config.h" #include "cbi_ssfc.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi160.h" -#include "driver/accelgyro_icm_common.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/sync.h" -#include "keyboard_scan.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "task.h" +#include "keyboard_scan.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" /******************************************************************************/ diff --git a/board/copano/board.c b/board/copano/board.c index 8d58fa1101..7608b8cee7 100644 --- a/board/copano/board.c +++ b/board/copano/board.c @@ -4,18 +4,18 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi160.h" #include "driver/bc12/pi3usb9201.h" #include "driver/ppc/syv682x.h" -#include "driver/tcpm/tcpci.h" -#include "driver/tcpm/rt1715.h" #include "driver/retimer/bb_retimer_public.h" #include "driver/sync.h" +#include "driver/tcpm/rt1715.h" +#include "driver/tcpm/tcpci.h" #include "extpower.h" #include "fan.h" #include "fan_chip.h" @@ -29,8 +29,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "uart.h" #include "usb_mux.h" @@ -40,7 +40,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/copano/sensors.c b/board/copano/sensors.c index 3884c5cc93..5a37f7ab8b 100644 --- a/board/copano/sensors.c +++ b/board/copano/sensors.c @@ -4,23 +4,23 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" #include "cbi_ec_fw_config.h" #include "cbi_ssfc.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi160.h" -#include "driver/accelgyro_icm_common.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/sync.h" -#include "keyboard_scan.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "task.h" +#include "keyboard_scan.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" /******************************************************************************/ diff --git a/board/coral/board.c b/board/coral/board.c index a2a99ed42b..2e42bbc0e0 100644 --- a/board/coral/board.c +++ b/board/coral/board.c @@ -13,10 +13,10 @@ #include "charger.h" #include "chipset.h" #include "console.h" -#include "driver/als_opt3001.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" #include "driver/accelgyro_bmi_common.h" +#include "driver/als_opt3001.h" #include "driver/charger/bd9995x.h" #include "driver/tcpm/anx74xx.h" #include "driver/tcpm/ps8xxx.h" @@ -31,8 +31,8 @@ #include "lid_angle.h" #include "lid_switch.h" #include "math_util.h" -#include "motion_sense.h" #include "motion_lid.h" +#include "motion_sense.h" #include "panic.h" #include "power.h" #include "power_button.h" @@ -124,6 +124,7 @@ void tablet_mode_interrupt(enum gpio_signal signal) hook_call_deferred(&enable_input_devices_data, LID_DEBOUNCE_US); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/coral/usb_pd_policy.c b/board/coral/usb_pd_policy.c index a2e1f3c412..ad6ac613e8 100644 --- a/board/coral/usb_pd_policy.c +++ b/board/coral/usb_pd_policy.c @@ -4,13 +4,13 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "common.h" #include "console.h" #include "driver/charger/bd9995x.h" #include "driver/tcpm/anx74xx.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -18,10 +18,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/corori/board.c b/board/corori/board.c index 52ef76a19c..545765b0d7 100644 --- a/board/corori/board.c +++ b/board/corori/board.c @@ -9,19 +9,17 @@ #include "button.h" #include "cbi_fw_config.h" #include "cbi_ssfc.h" -#include "cbi_fw_config.h" #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" #include "chipset.h" #include "common.h" #include "compile_time_macros.h" -#include "driver/temp_sensor/thermistor.h" -#include "temp_sensor.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/pi3usb3x532.h" #include "extpower.h" #include "gpio.h" @@ -36,6 +34,7 @@ #include "switch.h" #include "system.h" #include "task.h" +#include "temp_sensor.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" @@ -122,6 +121,7 @@ static void c0_ccsbu_ovp_interrupt(enum gpio_signal s) pd_handle_cc_overvoltage(0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/corori2/board.c b/board/corori2/board.c index e3103f65ff..7bfc7d2e10 100644 --- a/board/corori2/board.c +++ b/board/corori2/board.c @@ -14,8 +14,6 @@ #include "chipset.h" #include "common.h" #include "compile_time_macros.h" -#include "driver/temp_sensor/thermistor.h" -#include "temp_sensor.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" #include "driver/bc12/pi3usb9201.h" @@ -23,6 +21,7 @@ #include "driver/retimer/nb7v904m.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/pi3usb3x532.h" #include "extpower.h" #include "gpio.h" @@ -40,6 +39,7 @@ #include "system.h" #include "tablet_mode.h" #include "task.h" +#include "temp_sensor.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" @@ -128,6 +128,7 @@ static void sub_hdmi_hpd_interrupt(enum gpio_signal s) gpio_set_level(GPIO_EC_AP_USB_C1_HDMI_HPD, !hdmi_hpd_odl); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/cret/board.c b/board/cret/board.c index 3c56757ef7..4439a30044 100644 --- a/board/cret/board.c +++ b/board/cret/board.c @@ -101,6 +101,7 @@ static void c0_ccsbu_ovp_interrupt(enum gpio_signal s) pd_handle_cc_overvoltage(0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/crota/board.c b/board/crota/board.c index a12ef75d30..2e6f851ad5 100644 --- a/board/crota/board.c +++ b/board/crota/board.c @@ -10,24 +10,24 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "gpio.h" -#include "gpio_signal.h" -#include "hooks.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_bmi260.h" #include "driver/accelgyro_lsm6dso.h" #include "fw_config.h" +#include "gpio.h" +#include "gpio_signal.h" #include "hooks.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/crota/charger.c b/board/crota/charger.c index 9f044790e0..ce19b66194 100644 --- a/board/crota/charger.c +++ b/board/crota/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/bq25710.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/crota/fans.c b/board/crota/fans.c index f1360a3ea8..874f04317f 100644 --- a/board/crota/fans.c +++ b/board/crota/fans.c @@ -8,13 +8,13 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" #include "tablet_mode.h" -#include "timer.h" #include "thermal.h" +#include "timer.h" #include "util.h" #define RECORD_TIME (2 * MINUTE) diff --git a/board/crota/led.c b/board/crota/led.c index 83f3789e36..4b4be6fe39 100644 --- a/board/crota/led.c +++ b/board/crota/led.c @@ -5,8 +5,6 @@ /* Crota specific PWM LED settings. */ -#include <stdint.h> - #include "charge_manager.h" #include "charge_state.h" #include "common.h" @@ -18,6 +16,8 @@ #include "pwm.h" #include "util.h" +#include <stdint.h> + #define BAT_LED_ON_LVL 100 #define BAT_LED_OFF_LVL 0 diff --git a/board/crota/sensors.c b/board/crota/sensors.c index 7d60234dc3..9121976a40 100644 --- a/board/crota/sensors.c +++ b/board/crota/sensors.c @@ -3,10 +3,10 @@ * found in the LICENSE file. */ -#include "common.h" -#include "console.h" #include "accelgyro.h" #include "adc.h" +#include "common.h" +#include "console.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_lsm6dso.h" @@ -16,8 +16,8 @@ #include "motion_sense.h" #include "tablet_mode.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/crota/usbc_config.c b/board/crota/usbc_config.c index 87d98facdc..f8e3c0704a 100644 --- a/board/crota/usbc_config.c +++ b/board/crota/usbc_config.c @@ -3,12 +3,9 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "cbi.h" -#include "charger.h" #include "charge_ramp.h" +#include "charger.h" #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -29,12 +26,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/dalboz/board.c b/board/dalboz/board.c index 471446878f..20b8a0b9a8 100644 --- a/board/dalboz/board.c +++ b/board/dalboz/board.c @@ -73,6 +73,7 @@ void hdmi_hpd_interrupt(enum gpio_signal signal) hook_call_deferred(&hdmi_hpd_handler_data, (2 * MSEC)); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Motion sensors */ diff --git a/board/dalboz/board.h b/board/dalboz/board.h index 967d1dce8f..0d77b7be06 100644 --- a/board/dalboz/board.h +++ b/board/dalboz/board.h @@ -10,9 +10,10 @@ #define VARIANT_ZORK_DALBOZ -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #define CONFIG_IO_EXPANDER_PCAL6408 #define CONFIG_USBC_PPC_NX20P3483 diff --git a/board/damu/board.c b/board/damu/board.c index 717276e768..b8cbf05f3a 100644 --- a/board/damu/board.c +++ b/board/damu/board.c @@ -55,6 +55,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/damu/led.c b/board/damu/led.c index 9d2b70795b..7fcda9afda 100644 --- a/board/damu/led.c +++ b/board/damu/led.c @@ -5,9 +5,9 @@ * Power and battery LED control for Damu */ #include "common.h" -#include "ioexpander.h" #include "driver/ioexpander/it8801.h" #include "ec_commands.h" +#include "ioexpander.h" #include "led_common.h" #include "led_onoff_states.h" diff --git a/board/delbin/board.c b/board/delbin/board.c index 28a0c929e2..0e416e6e2e 100644 --- a/board/delbin/board.c +++ b/board/delbin/board.c @@ -4,11 +4,11 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" #include "cbi_ssfc.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi260.h" #include "driver/bc12/pi3usb9201.h" @@ -22,8 +22,8 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" -#include "keyboard_scan.h" #include "keyboard_customization.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -31,8 +31,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "uart.h" #include "usb_mux.h" @@ -41,7 +41,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/delbin/keyboard_customization.c b/board/delbin/keyboard_customization.c index 56cf33ad7a..3ee81cb093 100644 --- a/board/delbin/keyboard_customization.c +++ b/board/delbin/keyboard_customization.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#include "common.h" #include "cbi_ssfc.h" +#include "common.h" #include "gpio.h" -#include "keyboard_customization.h" #include "keyboard_8042_sharedlib.h" #include "keyboard_config.h" +#include "keyboard_customization.h" #include "keyboard_protocol.h" #include "keyboard_raw.h" #include "keyboard_scan.h" diff --git a/board/delbin/led.c b/board/delbin/led.c index 27eb98a75e..299071818b 100644 --- a/board/delbin/led.c +++ b/board/delbin/led.c @@ -3,11 +3,11 @@ * found in the LICENSE file. */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/delbin/sensors.c b/board/delbin/sensors.c index 77b5757e28..e8d2034015 100644 --- a/board/delbin/sensors.c +++ b/board/delbin/sensors.c @@ -4,22 +4,22 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" #include "cbi_ec_fw_config.h" #include "cbi_ssfc.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi260.h" -#include "driver/accelgyro_icm_common.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_icm426xx.h" -#include "keyboard_scan.h" +#include "driver/accelgyro_icm_common.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "task.h" +#include "keyboard_scan.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" /******************************************************************************/ diff --git a/board/dewatt/board.c b/board/dewatt/board.c index 4667979e15..14b646144f 100644 --- a/board/dewatt/board.c +++ b/board/dewatt/board.c @@ -14,13 +14,13 @@ #include "charger.h" #include "common.h" #include "cros_board_info.h" -#include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_bmi260.h" #include "driver/accel_bma422.h" +#include "driver/accelgyro_bmi260.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/retimer/ps8811.h" #include "driver/retimer/ps8818_public.h" -#include "driver/temp_sensor/sb_tsi.h" #include "driver/temp_sensor/pct2075.h" +#include "driver/temp_sensor/sb_tsi.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -32,12 +32,13 @@ #include "switch.h" #include "tablet_mode.h" #include "temp_sensor.h" -#include "temp_sensor/thermistor.h" #include "temp_sensor/pct2075.h" +#include "temp_sensor/thermistor.h" #include "thermal.h" #include "usb_mux.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Motion sensor mutex */ static struct mutex g_lid_mutex; diff --git a/board/dewatt/led.c b/board/dewatt/led.c index 9453bd8e6e..05bc7d88fc 100644 --- a/board/dewatt/led.c +++ b/board/dewatt/led.c @@ -7,10 +7,10 @@ #include "common.h" #include "cros_board_info.h" +#include "gpio.h" #include "hooks.h" -#include "led_onoff_states.h" #include "led_common.h" -#include "gpio.h" +#include "led_onoff_states.h" #include "pwm.h" /* Note PWM LEDs are active low */ diff --git a/board/dibbi/board.c b/board/dibbi/board.c index 9b3207859a..eee386a043 100644 --- a/board/dibbi/board.c +++ b/board/dibbi/board.c @@ -10,8 +10,8 @@ #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/it83xx_pd.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/dingdong/board.c b/board/dingdong/board.c index 7f17668313..bc9bb3803a 100644 --- a/board/dingdong/board.c +++ b/board/dingdong/board.c @@ -10,17 +10,18 @@ #include "gpio.h" #include "hooks.h" #include "registers.h" +#include "task.h" +#include "timer.h" #include "usb_bb.h" #include "usb_descriptor.h" #include "usb_pd.h" -#include "task.h" -#include "timer.h" #include "util.h" static volatile uint64_t hpd_prev_ts; static volatile int hpd_prev_level; void hpd_event(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /** diff --git a/board/dingdong/usb_pd_policy.c b/board/dingdong/usb_pd_policy.c index 493897c6da..c7e3f0e4a9 100644 --- a/board/dingdong/usb_pd_policy.c +++ b/board/dingdong/usb_pd_policy.c @@ -14,11 +14,11 @@ #include "registers.h" #include "task.h" #include "timer.h" -#include "util.h" -#include "usb_bb.h" #include "usb_api.h" +#include "usb_bb.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/dirinboz/board.c b/board/dirinboz/board.c index c6e35cf7e8..efdcac76ef 100644 --- a/board/dirinboz/board.c +++ b/board/dirinboz/board.c @@ -5,8 +5,8 @@ #include "battery_smart.h" #include "button.h" -#include "cros_board_info.h" #include "charge_state.h" +#include "cros_board_info.h" #include "driver/bc12/pi3usb9201.h" #include "driver/ppc/aoz1380_public.h" #include "driver/ppc/nx20p348x.h" @@ -18,8 +18,8 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" -#include "keyboard_8042_sharedlib.h" #include "ioexpander.h" +#include "keyboard_8042_sharedlib.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -41,6 +41,7 @@ /* This I2C moved. Temporarily detect and support the V0 HW. */ int I2C_PORT_BATTERY = I2C_PORT_BATTERY_V1; +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /***************************************************************************** diff --git a/board/dirinboz/board.h b/board/dirinboz/board.h index a27176fcae..8c77d0665e 100644 --- a/board/dirinboz/board.h +++ b/board/dirinboz/board.h @@ -10,9 +10,10 @@ #define VARIANT_ZORK_DALBOZ -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #define CONFIG_USBC_PPC_NX20P3483 #define CONFIG_USB_MUX_PS8743 #define CONFIG_USB_MUX_RUNTIME_CONFIG diff --git a/board/dirinboz/led.c b/board/dirinboz/led.c index 1c53b9173e..b4063177f4 100644 --- a/board/dirinboz/led.c +++ b/board/dirinboz/led.c @@ -10,9 +10,9 @@ #include "cros_board_info.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "hooks.h" #define LED_TICKS_PER_CYCLE 10 #define LED_ON_TICKS 5 diff --git a/board/discovery-stm32f072/board.c b/board/discovery-stm32f072/board.c index 478bce663c..6d8d9820ac 100644 --- a/board/discovery-stm32f072/board.c +++ b/board/discovery-stm32f072/board.c @@ -13,11 +13,11 @@ #include "spi.h" #include "task.h" #include "usart-stm32f0.h" -#include "usart_tx_dma.h" #include "usart_rx_dma.h" +#include "usart_tx_dma.h" +#include "usb-stream.h" #include "usb_gpio.h" #include "usb_spi.h" -#include "usb-stream.h" #include "util.h" /****************************************************************************** @@ -25,6 +25,7 @@ */ void button_event(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" static enum gpio_signal const usb_gpio_list[] = { diff --git a/board/discovery/board.c b/board/discovery/board.c index a9ba174a4f..7892f1a5e0 100644 --- a/board/discovery/board.c +++ b/board/discovery/board.c @@ -17,6 +17,7 @@ void button_event(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" void button_event(enum gpio_signal signal) diff --git a/board/dojo/board.c b/board/dojo/board.c index 5c7db8b443..ca85def38c 100644 --- a/board/dojo/board.c +++ b/board/dojo/board.c @@ -13,11 +13,11 @@ #include "cros_board_info.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" -#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_bmi260_public.h" +#include "driver/accelgyro_bmi_common_public.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm426xx.h" #include "driver/accelgyro_icm_common.h" -#include "driver/accelgyro_bmi_common_public.h" -#include "driver/accelgyro_bmi260_public.h" #include "driver/retimer/ps8802.h" #include "driver/usb_mux/anx3443.h" #include "gpio.h" diff --git a/board/dooly/board.c b/board/dooly/board.c index 9652de72c0..d0711c9c12 100644 --- a/board/dooly/board.c +++ b/board/dooly/board.c @@ -17,8 +17,8 @@ #include "driver/accel_bma2x2.h" #include "driver/als_tcs3400.h" #include "driver/ina3221.h" -#include "driver/led/oz554.h" #include "driver/led/mp3385.h" +#include "driver/led/oz554.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/anx7447.h" #include "driver/tcpm/ps8xxx.h" @@ -41,8 +41,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_common.h" @@ -463,7 +463,8 @@ static void adp_state_init(void) } DECLARE_HOOK(HOOK_INIT, adp_state_init, HOOK_PRIO_INIT_CHARGE_MANAGER + 1); -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/drallion_ish/board.c b/board/drallion_ish/board.c index b23748b62d..8cfee8c19d 100644 --- a/board/drallion_ish/board.c +++ b/board/drallion_ish/board.c @@ -19,7 +19,8 @@ #include "tablet_mode.h" #include "task.h" -#include "gpio_list.h" /* has to be included last */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* I2C port map */ const struct i2c_port_t i2c_ports[] = { diff --git a/board/dratini/board.c b/board/dratini/board.c index 84759b74b6..1f0a0ae899 100644 --- a/board/dratini/board.c +++ b/board/dratini/board.c @@ -35,8 +35,8 @@ #include "tablet_mode.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -124,7 +124,8 @@ static void bc12_interrupt(enum gpio_signal signal) } } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/dratini/led.c b/board/dratini/led.c index 029ae11da8..035bd963d5 100644 --- a/board/dratini/led.c +++ b/board/dratini/led.c @@ -11,9 +11,9 @@ #include "chipset.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "hooks.h" #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/drawcia/board.c b/board/drawcia/board.c index 58def569be..445ece3eb2 100644 --- a/board/drawcia/board.c +++ b/board/drawcia/board.c @@ -18,9 +18,9 @@ #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/sm5803.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/it83xx_pd.h" #include "driver/tcpm/ps8xxx.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/drawcia_riscv/board.c b/board/drawcia_riscv/board.c index ba325aedc6..6cd76b17bd 100644 --- a/board/drawcia_riscv/board.c +++ b/board/drawcia_riscv/board.c @@ -16,9 +16,9 @@ #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/sm5803.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/it83xx_pd.h" #include "driver/tcpm/ps8xxx.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" @@ -33,8 +33,8 @@ #include "system.h" #include "tablet_mode.h" #include "task.h" -#include "tcpm/tcpci.h" #include "tcpm/it8xxx2_pd_public.h" +#include "tcpm/tcpci.h" #include "temp_sensor.h" #include "uart.h" #include "usb_charge.h" diff --git a/board/driblee/board.c b/board/driblee/board.c index 05ec708ac5..fd03b64e03 100644 --- a/board/driblee/board.c +++ b/board/driblee/board.c @@ -9,21 +9,19 @@ #include "button.h" #include "cbi_fw_config.h" #include "cbi_ssfc.h" -#include "cbi_fw_config.h" #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" #include "chipset.h" #include "common.h" #include "compile_time_macros.h" -#include "driver/temp_sensor/thermistor.h" -#include "temp_sensor.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" +#include "driver/retimer/ps8802.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/pi3usb3x532.h" -#include "driver/retimer/ps8802.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -37,6 +35,7 @@ #include "switch.h" #include "system.h" #include "task.h" +#include "temp_sensor.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" @@ -134,6 +133,7 @@ static void c0_ccsbu_ovp_interrupt(enum gpio_signal s) pd_handle_cc_overvoltage(0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/driblee/led.c b/board/driblee/led.c index 7aa983ea79..4eecb2c590 100644 --- a/board/driblee/led.c +++ b/board/driblee/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for lalala */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/driblee/usb_pd_policy.c b/board/driblee/usb_pd_policy.c index 157f4be2cb..f8a1ee83a2 100644 --- a/board/driblee/usb_pd_policy.c +++ b/board/driblee/usb_pd_policy.c @@ -7,8 +7,8 @@ #include "chipset.h" #include "common.h" #include "console.h" -#include "driver/tcpm/tcpci.h" #include "driver/charger/isl923x_public.h" +#include "driver/tcpm/tcpci.h" #include "usb_pd.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) diff --git a/board/drobit/board.c b/board/drobit/board.c index 1d881d9a2c..d51097f97d 100644 --- a/board/drobit/board.c +++ b/board/drobit/board.c @@ -4,11 +4,11 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" #include "charge_state_v2.h" +#include "common.h" #include "driver/bc12/pi3usb9201.h" #include "driver/ppc/syv682x.h" #include "driver/retimer/bb_retimer_public.h" @@ -39,7 +39,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/eldrid/board.c b/board/eldrid/board.c index 1abf9c6acd..e43bc79b5b 100644 --- a/board/eldrid/board.c +++ b/board/eldrid/board.c @@ -4,11 +4,11 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" #include "charge_state_v2.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi160.h" #include "driver/bc12/pi3usb9201.h" @@ -27,16 +27,16 @@ #include "isl9241.h" #include "keyboard_8042_sharedlib.h" #include "keyboard_raw.h" -#include "lid_switch.h" #include "keyboard_scan.h" +#include "lid_switch.h" #include "power.h" #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "uart.h" #include "usb_mux.h" @@ -46,7 +46,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/eldrid/sensors.c b/board/eldrid/sensors.c index 538cacb985..9f8996d052 100644 --- a/board/eldrid/sensors.c +++ b/board/eldrid/sensors.c @@ -4,18 +4,18 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" +#include "common.h" #include "driver/accel_bma2x2.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi160.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/sync.h" -#include "keyboard_scan.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "task.h" +#include "keyboard_scan.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" /******************************************************************************/ diff --git a/board/elemi/board.c b/board/elemi/board.c index 96860d2335..944e585ea4 100644 --- a/board/elemi/board.c +++ b/board/elemi/board.c @@ -4,10 +4,10 @@ */ /* Elemi board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "driver/bc12/pi3usb9201.h" #include "driver/ppc/sn5s330.h" #include "driver/ppc/syv682x.h" @@ -40,7 +40,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/elemi/led.c b/board/elemi/led.c index 8deb12474a..810b8281db 100644 --- a/board/elemi/led.c +++ b/board/elemi/led.c @@ -11,9 +11,9 @@ #include "chipset.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "hooks.h" #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/elm/board.c b/board/elm/board.c index f8621d086e..15362ee635 100644 --- a/board/elm/board.c +++ b/board/elm/board.c @@ -69,6 +69,7 @@ void usb_evt(enum gpio_signal signal) usb_charger_task_set_event(0, USB_CHG_EVENT_BC12); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* power signal list. Must match order of enum power_signal. */ diff --git a/board/elm/led.c b/board/elm/led.c index 29140ce237..09b5c55f51 100644 --- a/board/elm/led.c +++ b/board/elm/led.c @@ -12,8 +12,8 @@ #include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "util.h" #include "system.h" +#include "util.h" #define CRITICAL_LOW_BATTERY_PERMILLAGE 71 #define LOW_BATTERY_PERMILLAGE 137 diff --git a/board/elm/usb_pd_policy.c b/board/elm/usb_pd_policy.c index 0ba277f71d..0369d8a15c 100644 --- a/board/elm/usb_pd_policy.c +++ b/board/elm/usb_pd_policy.c @@ -17,9 +17,9 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/endeavour/board.c b/board/endeavour/board.c index 0d5e633ea0..5843c2a350 100644 --- a/board/endeavour/board.c +++ b/board/endeavour/board.c @@ -45,6 +45,7 @@ static uint8_t board_version; static uint32_t oem; static uint32_t sku; +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Hibernate wake configuration */ diff --git a/board/eve/board.c b/board/eve/board.c index 96534f62c7..3193451ad1 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -10,8 +10,8 @@ #include "board_config.h" #include "button.h" #include "charge_manager.h" -#include "charge_state.h" #include "charge_ramp.h" +#include "charge_state.h" #include "charger.h" #include "chipset.h" #include "compiler.h" @@ -26,14 +26,15 @@ #include "driver/tcpm/tcpci.h" #include "driver/tcpm/tcpm.h" #include "driver/temp_sensor/bd99992gw.h" +#include "espi.h" #include "extpower.h" #include "gesture.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" #include "i2c.h" -#include "keyboard_scan.h" #include "keyboard_8042_sharedlib.h" +#include "keyboard_scan.h" #include "lid_angle.h" #include "lid_switch.h" #include "math_util.h" @@ -57,7 +58,6 @@ #include "usb_pd.h" #include "usb_pd_tcpm.h" #include "util.h" -#include "espi.h" #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) @@ -155,6 +155,7 @@ void anx74xx_cable_det_interrupt(enum gpio_signal signal) } #endif +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Keyboard scan. Increase output_settle_us to 80us from default 50us. */ diff --git a/board/eve/led.c b/board/eve/led.c index 9fe3becabd..e3dd8c09c4 100644 --- a/board/eve/led.c +++ b/board/eve/led.c @@ -13,8 +13,8 @@ #include "gpio.h" #include "hooks.h" #include "led_common.h" -#include "pwm.h" #include "math_util.h" +#include "pwm.h" #include "registers.h" #include "task.h" #include "util.h" diff --git a/board/eve/usb_pd_policy.c b/board/eve/usb_pd_policy.c index 729cdfa018..969876756e 100644 --- a/board/eve/usb_pd_policy.c +++ b/board/eve/usb_pd_policy.c @@ -4,13 +4,13 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "common.h" #include "console.h" #include "driver/charger/bd9995x.h" #include "driver/tcpm/anx74xx.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -18,10 +18,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/ezkinil/board.c b/board/ezkinil/board.c index 5e15b458cc..03d0727b70 100644 --- a/board/ezkinil/board.c +++ b/board/ezkinil/board.c @@ -8,12 +8,12 @@ #include "cbi_ssfc.h" #include "charge_state_v2.h" #include "cros_board_info.h" +#include "driver/accel_kionix.h" +#include "driver/accel_kx022.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" #include "driver/accelgyro_icm426xx.h" -#include "driver/accel_kionix.h" -#include "driver/accel_kx022.h" +#include "driver/accelgyro_icm_common.h" #include "driver/ppc/aoz1380_public.h" #include "driver/ppc/nx20p348x.h" #include "driver/retimer/pi3hdx1204.h" @@ -34,12 +34,13 @@ #include "switch.h" #include "system.h" #include "task.h" -#include "temp_sensor/thermistor.h" #include "temp_sensor.h" +#include "temp_sensor/thermistor.h" #include "usb_charge.h" #include "usb_mux.h" #include "usbc_ppc.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" static int board_ver; diff --git a/board/ezkinil/board.h b/board/ezkinil/board.h index c5e6ce1771..5c8fd2c075 100644 --- a/board/ezkinil/board.h +++ b/board/ezkinil/board.h @@ -8,9 +8,10 @@ #define VARIANT_ZORK_TREMBYLE -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #define CONFIG_FAN_RPM_CUSTOM #define CONFIG_KEYBOARD_FACTORY_TEST diff --git a/board/felwinter/board.c b/board/felwinter/board.c index 556ea2475e..630a8c331a 100644 --- a/board/felwinter/board.c +++ b/board/felwinter/board.c @@ -10,23 +10,23 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "gpio.h" -#include "gpio_signal.h" -#include "hooks.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_lsm6dso.h" #include "fw_config.h" +#include "gpio.h" +#include "gpio_signal.h" #include "hooks.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/felwinter/charger_isl9241.c b/board/felwinter/charger_isl9241.c index 95227f753a..ddb37cbbcb 100644 --- a/board/felwinter/charger_isl9241.c +++ b/board/felwinter/charger_isl9241.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/isl9241.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/felwinter/fans.c b/board/felwinter/fans.c index 5f68df09ff..891e8288a9 100644 --- a/board/felwinter/fans.c +++ b/board/felwinter/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/felwinter/i2c.c b/board/felwinter/i2c.c index b765ccff98..81f461a5ba 100644 --- a/board/felwinter/i2c.c +++ b/board/felwinter/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/felwinter/pwm.c b/board/felwinter/pwm.c index 97b5c17a03..5023f429cc 100644 --- a/board/felwinter/pwm.c +++ b/board/felwinter/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/felwinter/sensors.c b/board/felwinter/sensors.c index 6b62f5f4d2..4016b12514 100644 --- a/board/felwinter/sensors.c +++ b/board/felwinter/sensors.c @@ -3,17 +3,17 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc_chip.h" +#include "common.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_lsm6dso.h" #include "gpio.h" #include "hooks.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/felwinter/usbc_config.c b/board/felwinter/usbc_config.c index ebe77bf7c7..1c93f822c6 100644 --- a/board/felwinter/usbc_config.c +++ b/board/felwinter/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -26,12 +23,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/fennel/board.c b/board/fennel/board.c index 6d864252b6..0a960e7bd8 100644 --- a/board/fennel/board.c +++ b/board/fennel/board.c @@ -15,8 +15,8 @@ #include "console.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/battery/max17055.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" @@ -30,8 +30,8 @@ #include "i2c.h" #include "i2c_bitbang.h" #include "it8801.h" -#include "keyboard_scan.h" #include "keyboard_backlight.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "panic.h" #include "power.h" @@ -56,6 +56,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/fennel/led.c b/board/fennel/led.c index e6badd92bc..60fadc3eb0 100644 --- a/board/fennel/led.c +++ b/board/fennel/led.c @@ -5,9 +5,9 @@ * Power and battery LED control for Fennel */ #include "common.h" -#include "ioexpander.h" #include "driver/ioexpander/it8801.h" #include "ec_commands.h" +#include "ioexpander.h" #include "led_common.h" #include "led_onoff_states.h" diff --git a/board/fizz/board.c b/board/fizz/board.c index 296ddca5a7..7eb6efecab 100644 --- a/board/fizz/board.c +++ b/board/fizz/board.c @@ -18,13 +18,12 @@ #include "console.h" #include "cros_board_info.h" #include "driver/pmic_tps650x30.h" -#include "driver/temp_sensor/tmp432.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" #include "driver/tcpm/tcpm.h" +#include "driver/temp_sensor/tmp432.h" #include "espi.h" #include "extpower.h" -#include "espi.h" #include "fan.h" #include "fan_chip.h" #include "gpio.h" @@ -114,6 +113,7 @@ void vbus0_evt(enum gpio_signal signal) task_wake(TASK_ID_PD_C0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Hibernate wake configuration */ diff --git a/board/fizz/usb_pd_policy.c b/board/fizz/usb_pd_policy.c index b3b1ee5971..0c22427ce5 100644 --- a/board/fizz/usb_pd_policy.c +++ b/board/fizz/usb_pd_policy.c @@ -4,12 +4,12 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "common.h" #include "console.h" #include "driver/tcpm/anx74xx.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -17,11 +17,11 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_pdo.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/fleex/board.c b/board/fleex/board.c index 063222fbe3..c8cecbadd4 100644 --- a/board/fleex/board.c +++ b/board/fleex/board.c @@ -33,8 +33,8 @@ #include "power_button.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "tcpm/tcpci.h" #include "temp_sensor.h" #include "temp_sensor/thermistor.h" diff --git a/board/fluffy/board.c b/board/fluffy/board.c index 90de54a761..b16170148e 100644 --- a/board/fluffy/board.c +++ b/board/fluffy/board.c @@ -11,12 +11,13 @@ #include "ec_version.h" #include "hooks.h" #include "i2c.h" -#include "usb_descriptor.h" #include "registers.h" #include "timer.h" +#include "usb_descriptor.h" #include "usb_pd.h" #include "util.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) diff --git a/board/foob/board.c b/board/foob/board.c index c9bf0934ad..65fafddd45 100644 --- a/board/foob/board.c +++ b/board/foob/board.c @@ -6,6 +6,7 @@ /* Phaser board-specific configuration */ #include "adc.h" +#include "battery_smart.h" #include "button.h" #include "charge_state.h" #include "common.h" @@ -23,13 +24,12 @@ #include "power.h" #include "power_button.h" #include "switch.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "tcpm/tcpci.h" #include "temp_sensor.h" #include "temp_sensor/thermistor.h" #include "util.h" -#include "battery_smart.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTFUSB(format, args...) cprintf(CC_USBCHARGE, format, ##args) diff --git a/board/foob/led.c b/board/foob/led.c index b8cdc4c252..a7271f95d3 100644 --- a/board/foob/led.c +++ b/board/foob/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Phaser */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/fusb307bgevb/board.c b/board/fusb307bgevb/board.c index 1388aef49a..2b9f4dac2f 100644 --- a/board/fusb307bgevb/board.c +++ b/board/fusb307bgevb/board.c @@ -17,11 +17,11 @@ #include "task.h" #include "timer.h" #include "usart-stm32f0.h" -#include "usart_tx_dma.h" #include "usart_rx_dma.h" -#include "usb_gpio.h" +#include "usart_tx_dma.h" #include "usb-stream.h" #include "usb_common.h" +#include "usb_gpio.h" #include "util.h" #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) @@ -155,6 +155,7 @@ void button_down_event(enum gpio_signal signal) /****************************************************************************** * Build GPIO tables and expose a subset of the GPIOs over USB. */ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" static enum gpio_signal const usb_gpio_list[] = { diff --git a/board/gaelin/board.c b/board/gaelin/board.c index 7228c9e2f2..7544085c9c 100644 --- a/board/gaelin/board.c +++ b/board/gaelin/board.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 <stdbool.h> - #include "adc.h" #include "assert.h" #include "button.h" @@ -13,17 +11,19 @@ #include "compile_time_macros.h" #include "console.h" #include "cros_board_info.h" +#include "driver/tcpm/tcpci.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" -#include "power_button.h" #include "hooks.h" #include "power.h" +#include "power_button.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" #include "usbc_ppc.h" -#include "driver/tcpm/tcpci.h" -#include "fw_config.h" + +#include <stdbool.h> /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) @@ -190,7 +190,8 @@ static void port_ocp_interrupt(enum gpio_signal signal) { hook_call_deferred(&update_5v_usage_data, 0); } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* diff --git a/board/gaelin/fans.c b/board/gaelin/fans.c index 5f54e6e63c..c92ae84872 100644 --- a/board/gaelin/fans.c +++ b/board/gaelin/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/gaelin/i2c.c b/board/gaelin/i2c.c index f9bfa11657..ef7e1ca09f 100644 --- a/board/gaelin/i2c.c +++ b/board/gaelin/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/gaelin/pwm.c b/board/gaelin/pwm.c index fe7e82894a..bf90ad5f63 100644 --- a/board/gaelin/pwm.c +++ b/board/gaelin/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/gaelin/sensors.c b/board/gaelin/sensors.c index 162140d37d..13948f60d8 100644 --- a/board/gaelin/sensors.c +++ b/board/gaelin/sensors.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc_chip.h" +#include "common.h" #include "hooks.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/gaelin/usbc_config.c b/board/gaelin/usbc_config.c index 98595fc607..90b9f73d87 100644 --- a/board/gaelin/usbc_config.c +++ b/board/gaelin/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -21,12 +18,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/galtic/board.c b/board/galtic/board.c index 9800c1150c..68a36216fe 100644 --- a/board/galtic/board.c +++ b/board/galtic/board.c @@ -14,15 +14,15 @@ #include "charger.h" #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi160.h" -#include "driver/accelgyro_icm_common.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" #include "driver/retimer/tusb544.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/raa489000.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "driver/usb_mux/ps8743_public.h" #include "gpio.h" diff --git a/board/gelarshie/base_detect.c b/board/gelarshie/base_detect.c index e045e9ea4f..9c1a47d2e4 100644 --- a/board/gelarshie/base_detect.c +++ b/board/gelarshie/base_detect.c @@ -6,8 +6,8 @@ /* Gelarshie base detection code */ #include "adc.h" -#include "board.h" #include "base_state.h" +#include "board.h" #include "chipset.h" #include "common.h" #include "console.h" diff --git a/board/gelarshie/board.c b/board/gelarshie/board.c index 174e4b0764..bb823f7795 100644 --- a/board/gelarshie/board.c +++ b/board/gelarshie/board.c @@ -10,14 +10,14 @@ #include "charge_manager.h" #include "charge_state.h" #include "common.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi260.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/ln9310.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "lid_switch.h" @@ -30,9 +30,9 @@ #include "pwm.h" #include "pwm_chip.h" #include "queue.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_ppc.h" @@ -51,6 +51,7 @@ static void board_connect_c0_sbu(enum gpio_signal s); static void ks_interrupt(enum gpio_signal s); static void switchcap_interrupt(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* GPIO Interrupt Handlers */ diff --git a/board/gelarshie/led.c b/board/gelarshie/led.c index e401787f7f..e8b4dbbd8e 100644 --- a/board/gelarshie/led.c +++ b/board/gelarshie/led.c @@ -10,13 +10,13 @@ #include "charge_state.h" #include "chipset.h" #include "ec_commands.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" #include "led_common.h" #include "system.h" #include "util.h" -#include "extpower.h" #define LED_ONE_SEC (1000 / HOOK_TICK_INTERVAL_MS) /* Battery LED blinks every per 400ms */ diff --git a/board/gelarshie/usbc_config.c b/board/gelarshie/usbc_config.c index 7389f8cb52..70c0229793 100644 --- a/board/gelarshie/usbc_config.c +++ b/board/gelarshie/usbc_config.c @@ -5,9 +5,9 @@ /* Trogdor family-specific USB-C configuration */ +#include "charge_state.h" #include "charger.h" #include "charger/isl923x_public.h" -#include "charge_state.h" #include "gpio.h" #include "usb_pd.h" diff --git a/board/genesis/board.c b/board/genesis/board.c index 5c3f1c5c00..96a553c7c4 100644 --- a/board/genesis/board.c +++ b/board/genesis/board.c @@ -30,8 +30,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_common.h" #include "util.h" @@ -108,7 +108,8 @@ static void port_ocp_interrupt(enum gpio_signal signal) /******************************************************************************/ -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/gimble/board.c b/board/gimble/board.c index 5373eb2bff..8b849f7613 100644 --- a/board/gimble/board.c +++ b/board/gimble/board.c @@ -11,20 +11,19 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "driver/charger/bq25710.h" -#include "gpio.h" -#include "gpio_signal.h" -#include "hooks.h" #include "driver/accel_bma2x2_public.h" #include "driver/accel_bma422.h" #include "driver/accelgyro_bmi160.h" #include "driver/accelgyro_lsm6dsm.h" +#include "driver/charger/bq25710.h" #include "fw_config.h" +#include "gpio.h" +#include "gpio_signal.h" #include "hooks.h" #include "keyboard_8042_sharedlib.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "ps8xxx.h" #include "registers.h" #include "switch.h" @@ -32,7 +31,8 @@ #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/gimble/charger.c b/board/gimble/charger.c index 7fabd2082e..4976abdea6 100644 --- a/board/gimble/charger.c +++ b/board/gimble/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/bq25710.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/gimble/fans.c b/board/gimble/fans.c index 90e251511f..69d7542f37 100644 --- a/board/gimble/fans.c +++ b/board/gimble/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/gimble/led.c b/board/gimble/led.c index 7b6fd5c24e..b56ccbbdca 100644 --- a/board/gimble/led.c +++ b/board/gimble/led.c @@ -3,8 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> - #include "charge_manager.h" #include "common.h" #include "compile_time_macros.h" @@ -15,6 +13,8 @@ #include "pwm.h" #include "util.h" +#include <stdint.h> + #define BAT_LED_ON_LVL 100 #define BAT_LED_OFF_LVL 0 diff --git a/board/gimble/sensors.c b/board/gimble/sensors.c index d39d43d887..0f415f168f 100644 --- a/board/gimble/sensors.c +++ b/board/gimble/sensors.c @@ -3,9 +3,9 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc_chip.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accel_bma2x2_public.h" #include "driver/accel_bma422.h" @@ -18,8 +18,8 @@ #include "keyboard_scan.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/gimble/usbc_config.c b/board/gimble/usbc_config.c index feb123a525..c566cbdcf6 100644 --- a/board/gimble/usbc_config.c +++ b/board/gimble/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "battery.h" #include "common.h" #include "compile_time_macros.h" @@ -27,12 +24,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/gingerbread/board.c b/board/gingerbread/board.c index 8d14bda30c..62f871b55a 100644 --- a/board/gingerbread/board.c +++ b/board/gingerbread/board.c @@ -23,12 +23,11 @@ #include "uart.h" #include "usb_descriptor.h" #include "usb_pd.h" -#include "usbc_ppc.h" -#include "usb_descriptor.h" #include "usb_pd_dp_ufp.h" #include "usb_pe_sm.h" #include "usb_prl_sm.h" #include "usb_tc_sm.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) @@ -94,7 +93,8 @@ static void board_pwr_btn_interrupt(enum gpio_signal signal) } #endif /* SECTION_IS_RW */ -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* * Table GPIO signals control both power rails and reset lines to various chips diff --git a/board/gooey/board.c b/board/gooey/board.c index 544117f9c6..6a9d07dbce 100644 --- a/board/gooey/board.c +++ b/board/gooey/board.c @@ -14,15 +14,15 @@ #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" #include "intc.h" -#include "keyboard_scan.h" #include "keyboard_8042.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" diff --git a/board/gooey/led.c b/board/gooey/led.c index 5c7eb08407..751ffa30bf 100644 --- a/board/gooey/led.c +++ b/board/gooey/led.c @@ -6,9 +6,9 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" #include "gpio.h" +#include "led_common.h" +#include "led_onoff_states.h" #include "pwm.h" #define LED_OFF_LVL 0 diff --git a/board/goroh/sensors.c b/board/goroh/sensors.c index 4499ebf64c..8236627e47 100644 --- a/board/goroh/sensors.c +++ b/board/goroh/sensors.c @@ -11,8 +11,8 @@ #include "lid_switch.h" #include "motion_sense.h" #include "spi.h" -#include "thermal.h" #include "temp_sensor.h" +#include "thermal.h" static struct mutex g_base_mutex; static struct mutex g_lid_mutex; diff --git a/board/goroh/usbc_confg.c b/board/goroh/usbc_confg.c index 2f1b4a021f..a2d268877f 100644 --- a/board/goroh/usbc_confg.c +++ b/board/goroh/usbc_confg.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -20,6 +17,9 @@ #include "fw_config.h" #include "gpio.h" +#include <stdbool.h> +#include <stdint.h> + static void board_tcpc_init(void) { /* Don't reset TCPCs after initial reset */ diff --git a/board/grunt/board.c b/board/grunt/board.c index 9c4666fec5..96b8f986b7 100644 --- a/board/grunt/board.c +++ b/board/grunt/board.c @@ -18,6 +18,7 @@ #include "pwm_chip.h" #include "switch.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" const enum gpio_signal hibernate_wake_pins[] = { diff --git a/board/gumboz/board.c b/board/gumboz/board.c index 82522ada4d..b6388983d7 100644 --- a/board/gumboz/board.c +++ b/board/gumboz/board.c @@ -5,8 +5,8 @@ #include "battery_smart.h" #include "button.h" -#include "cros_board_info.h" #include "charge_state.h" +#include "cros_board_info.h" #include "driver/accel_kionix.h" #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" @@ -42,6 +42,7 @@ /* This I2C moved. Temporarily detect and support the V0 HW. */ int I2C_PORT_BATTERY = I2C_PORT_BATTERY_V1; +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Motion sensors */ diff --git a/board/gumboz/board.h b/board/gumboz/board.h index b2f7682ed8..abf8280f74 100644 --- a/board/gumboz/board.h +++ b/board/gumboz/board.h @@ -10,9 +10,10 @@ #define VARIANT_ZORK_DALBOZ -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #define CONFIG_USBC_PPC_NX20P3483 #define CONFIG_USB_MUX_PS8743 #define CONFIG_USB_MUX_RUNTIME_CONFIG diff --git a/board/gumboz/led.c b/board/gumboz/led.c index 95f61494f9..c90caeec12 100644 --- a/board/gumboz/led.c +++ b/board/gumboz/led.c @@ -10,9 +10,9 @@ #include "cros_board_info.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "hooks.h" #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/guybrush/board.c b/board/guybrush/board.c index 663094233e..cbe1049d98 100644 --- a/board/guybrush/board.c +++ b/board/guybrush/board.c @@ -12,10 +12,10 @@ #include "button.h" #include "common.h" #include "cros_board_info.h" -#include "driver/accelgyro_bmi_common.h" +#include "driver/accel_bma422.h" #include "driver/accelgyro_bmi160.h" #include "driver/accelgyro_bmi323.h" -#include "driver/accel_bma422.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/retimer/ps8811.h" #include "driver/retimer/ps8818_public.h" #include "driver/temp_sensor/sb_tsi.h" @@ -35,7 +35,8 @@ #include "thermal.h" #include "usb_mux.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Motion sensor mutex */ static struct mutex g_lid_mutex; diff --git a/board/guybrush/led.c b/board/guybrush/led.c index 26b1fc826a..c61886de15 100644 --- a/board/guybrush/led.c +++ b/board/guybrush/led.c @@ -6,9 +6,9 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" #include "gpio.h" +#include "led_common.h" +#include "led_onoff_states.h" #include "pwm.h" /* Note PWM LEDs are active low */ diff --git a/board/haboki/board.c b/board/haboki/board.c index 8814871ed7..2b5e852824 100644 --- a/board/haboki/board.c +++ b/board/haboki/board.c @@ -16,9 +16,9 @@ #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/sm5803.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/it83xx_pd.h" #include "driver/tcpm/ps8xxx.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/hammer/board.c b/board/hammer/board.c index 4700130b4b..496555149d 100644 --- a/board/hammer/board.c +++ b/board/hammer/board.c @@ -9,8 +9,8 @@ #include "common.h" #include "driver/charger/isl923x.h" #include "driver/led/lm3630a.h" -#include "ec_version.h" #include "ec_ec_comm_server.h" +#include "ec_version.h" #include "gpio.h" #include "hooks.h" #include "hwtimer.h" @@ -28,18 +28,19 @@ #include "system.h" #include "tablet_mode.h" #include "task.h" -#include "touchpad.h" #include "timer.h" +#include "touchpad.h" #include "update_fw.h" #include "usart-stm32f0.h" -#include "usart_tx_dma.h" #include "usart_rx_dma.h" +#include "usart_tx_dma.h" #include "usb_api.h" #include "usb_descriptor.h" #include "usb_i2c.h" #include "usb_spi.h" #include "util.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #ifdef SECTION_IS_RW diff --git a/board/hatch/board.c b/board/hatch/board.c index a15e276113..373afcaea6 100644 --- a/board/hatch/board.c +++ b/board/hatch/board.c @@ -34,8 +34,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -105,7 +105,8 @@ static void bc12_interrupt(enum gpio_signal signal) } } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/hatch/led.c b/board/hatch/led.c index 5bb76e1812..92332d5978 100644 --- a/board/hatch/led.c +++ b/board/hatch/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Hatch */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/hatch_fp/board.c b/board/hatch_fp/board.c index 00e7949083..b213d1ab9e 100644 --- a/board/hatch_fp/board.c +++ b/board/hatch_fp/board.c @@ -24,6 +24,7 @@ int console_is_restricted(void) return system_is_locked(); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* diff --git a/board/hatch_fp/board.h b/board/hatch_fp/board.h index 9e900a126a..3d380e1265 100644 --- a/board/hatch_fp/board.h +++ b/board/hatch_fp/board.h @@ -254,8 +254,8 @@ #define TIM_CLOCK32 2 #define TIM_WATCHDOG 9 -#include "gpio_signal.h" #include "board_rw.h" +#include "gpio_signal.h" void slp_event(enum gpio_signal signal); diff --git a/board/hatch_fp/board_rw.h b/board/hatch_fp/board_rw.h index fc38dcc259..22495ec6d4 100644 --- a/board/hatch_fp/board_rw.h +++ b/board/hatch_fp/board_rw.h @@ -6,6 +6,8 @@ #ifndef __CROS_EC_BOARD_HATCH_FP_BOARD_RW_H #define __CROS_EC_BOARD_HATCH_FP_BOARD_RW_H +#include "gpio_signal.h" + void fps_event(enum gpio_signal signal); void board_init_rw(void); diff --git a/board/helios/board.c b/board/helios/board.c index 256459314c..1cc7de762c 100644 --- a/board/helios/board.c +++ b/board/helios/board.c @@ -11,8 +11,8 @@ #include "cros_board_info.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/als_opt3001.h" #include "driver/bc12/pi3usb9201.h" #include "driver/ppc/sn5s330.h" @@ -36,8 +36,8 @@ #include "tablet_mode.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -130,7 +130,8 @@ static void board_gmr_tablet_switch_isr(enum gpio_signal signal) gmr_tablet_switch_isr(signal); } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/helios/led.c b/board/helios/led.c index 92fb7d80ce..262f6a055a 100644 --- a/board/helios/led.c +++ b/board/helios/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Helios */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/herobrine/board.c b/board/herobrine/board.c index 1ef1801c44..37c88818b0 100644 --- a/board/herobrine/board.c +++ b/board/herobrine/board.c @@ -7,9 +7,9 @@ #include "adc_chip.h" #include "button.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_scan.h" @@ -18,9 +18,9 @@ #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_config.h" @@ -29,6 +29,7 @@ #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" static uint8_t sku_id; diff --git a/board/herobrine/usbc_config.c b/board/herobrine/usbc_config.c index c80b00f0de..7709a3ba25 100644 --- a/board/herobrine/usbc_config.c +++ b/board/herobrine/usbc_config.c @@ -17,9 +17,9 @@ #include "tcpm/ps8xxx_public.h" #include "tcpm/tcpci.h" #include "timer.h" +#include "usb_mux.h" #include "usb_pd.h" #include "usbc_config.h" -#include "usb_mux.h" #include "usbc_ocp.h" #include "usbc_ppc.h" diff --git a/board/hoho/board.c b/board/hoho/board.c index e981c9ce87..a671ef707d 100644 --- a/board/hoho/board.c +++ b/board/hoho/board.c @@ -13,16 +13,17 @@ #include "mcdp28x0.h" #include "registers.h" #include "task.h" +#include "timer.h" #include "usb_bb.h" #include "usb_descriptor.h" #include "usb_pd.h" -#include "timer.h" #include "util.h" static volatile uint64_t hpd_prev_ts; static volatile int hpd_prev_level; void hpd_event(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /** diff --git a/board/homestar/board.c b/board/homestar/board.c index 11035d2034..306fd7c2a3 100644 --- a/board/homestar/board.c +++ b/board/homestar/board.c @@ -10,15 +10,15 @@ #include "charge_manager.h" #include "charge_state.h" #include "common.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/ln9310.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_mkbp.h" @@ -32,9 +32,9 @@ #include "pwm.h" #include "pwm_chip.h" #include "queue.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_ppc.h" @@ -52,6 +52,7 @@ static void ppc_interrupt(enum gpio_signal signal); static void board_connect_c0_sbu(enum gpio_signal s); static void switchcap_interrupt(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* GPIO Interrupt Handlers */ diff --git a/board/homestar/led.c b/board/homestar/led.c index c314d584c3..f6b3cddf48 100644 --- a/board/homestar/led.c +++ b/board/homestar/led.c @@ -10,13 +10,13 @@ #include "charge_state.h" #include "chipset.h" #include "ec_commands.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" #include "led_common.h" #include "system.h" #include "util.h" -#include "extpower.h" #define LED_ONE_SEC (1000 / HOOK_TICK_INTERVAL_MS) /* Battery LED blinks every per 400ms */ diff --git a/board/homestar/usbc_config.c b/board/homestar/usbc_config.c index 5d30adb6e2..28f6b7a1c9 100644 --- a/board/homestar/usbc_config.c +++ b/board/homestar/usbc_config.c @@ -5,9 +5,9 @@ /* Trogdor family-specific USB-C configuration */ +#include "charge_state.h" #include "charger.h" #include "charger/isl923x_public.h" -#include "charge_state.h" #include "console.h" #include "usb_pd.h" diff --git a/board/host/board.c b/board/host/board.c index baaed22b43..1be8d5c1a8 100644 --- a/board/host/board.c +++ b/board/host/board.c @@ -13,8 +13,8 @@ #include "i2c.h" #include "inductive_charging.h" #include "lid_switch.h" -#include "motion_sense.h" #include "motion_lid.h" +#include "motion_sense.h" #include "power_button.h" #include "spi.h" #include "temp_sensor.h" @@ -30,6 +30,7 @@ */ #define GPIO_0 0 +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" test_mockable const struct tcpc_config_t tcpc_config[] = { diff --git a/board/host/charger.c b/board/host/charger.c index 0580ddcb41..7fa9b78dd1 100644 --- a/board/host/charger.c +++ b/board/host/charger.c @@ -7,8 +7,8 @@ #include "battery_smart.h" #include "charger.h" -#include "console.h" #include "common.h" +#include "console.h" #include "util.h" static const struct charger_info mock_charger_info = { diff --git a/board/host/chipset.c b/board/host/chipset.c index 47ad097c53..ece97dc4fd 100644 --- a/board/host/chipset.c +++ b/board/host/chipset.c @@ -8,13 +8,14 @@ /* Does not run a chipset task, but does emulate an AP chipset */ #define CONFIG_AP_POWER_CONTROL -#include <stdio.h> #include "chipset.h" #include "common.h" #include "hooks.h" #include "task.h" #include "test_util.h" +#include <stdio.h> + static int chipset_state = CHIPSET_STATE_SOFT_OFF; static int power_on_req; static int power_off_req; diff --git a/board/hyperdebug/board.c b/board/hyperdebug/board.c index 66cd981dca..b98cbc8d4c 100644 --- a/board/hyperdebug/board.c +++ b/board/hyperdebug/board.c @@ -15,13 +15,15 @@ #include "task.h" #include "timer.h" #include "usart-stm32l5.h" +#include "usb-stream.h" #include "usb_hw.h" #include "usb_spi.h" -#include "usb-stream.h" -#include "gpio_list.h" #include <stdio.h> +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" + void board_config_pre_init(void) { /* enable SYSCFG clock */ diff --git a/board/icarus/board.c b/board/icarus/board.c index 4d145287a4..35514f11a7 100644 --- a/board/icarus/board.c +++ b/board/icarus/board.c @@ -44,6 +44,7 @@ #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c index d9e88d3f80..2bfce62e98 100644 --- a/board/jacuzzi/board.c +++ b/board/jacuzzi/board.c @@ -15,8 +15,8 @@ #include "console.h" #include "driver/accel_kionix.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/battery/max17055.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" @@ -55,6 +55,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/jacuzzi/led.c b/board/jacuzzi/led.c index f648e879d0..ee4df43121 100644 --- a/board/jacuzzi/led.c +++ b/board/jacuzzi/led.c @@ -5,9 +5,9 @@ * Power and battery LED control for Jacuzzi */ #include "common.h" -#include "ioexpander.h" #include "driver/ioexpander/it8801.h" #include "ec_commands.h" +#include "ioexpander.h" #include "led_common.h" #include "led_onoff_states.h" #define LED_ON_LVL 0 diff --git a/board/jinlon/board.c b/board/jinlon/board.c index 717c8db09c..290fa19000 100644 --- a/board/jinlon/board.c +++ b/board/jinlon/board.c @@ -36,8 +36,8 @@ #include "tablet_mode.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -110,7 +110,8 @@ static void bc12_interrupt(enum gpio_signal signal) } } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/jinlon/led.c b/board/jinlon/led.c index 8ab3d7631f..a77ee8ba62 100644 --- a/board/jinlon/led.c +++ b/board/jinlon/led.c @@ -11,9 +11,9 @@ #include "chipset.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "hooks.h" #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/kakadu/board.c b/board/kakadu/board.c index 4be1e3f795..4cafc11a8e 100644 --- a/board/kakadu/board.c +++ b/board/kakadu/board.c @@ -14,8 +14,8 @@ #include "common.h" #include "console.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/charger/rt946x.h" #include "driver/sync.h" #include "driver/tcpm/mt6370.h" @@ -57,6 +57,7 @@ static void gauge_interrupt(enum gpio_signal signal) task_wake(TASK_ID_CHARGER); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/kano/board.c b/board/kano/board.c index 06f4a543d8..0d40a655bb 100644 --- a/board/kano/board.c +++ b/board/kano/board.c @@ -10,21 +10,21 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" #include "hooks.h" -#include "fw_config.h" -#include "hooks.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/kano/charger.c b/board/kano/charger.c index 95227f753a..ddb37cbbcb 100644 --- a/board/kano/charger.c +++ b/board/kano/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/isl9241.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/kano/fans.c b/board/kano/fans.c index 54ec134fd2..4ae6edf1c3 100644 --- a/board/kano/fans.c +++ b/board/kano/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/kano/i2c.c b/board/kano/i2c.c index 6f5983c928..70ca87f1b0 100644 --- a/board/kano/i2c.c +++ b/board/kano/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/kano/keyboard.c b/board/kano/keyboard.c index a96971c781..3a15831adc 100644 --- a/board/kano/keyboard.c +++ b/board/kano/keyboard.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "ec_commands.h" #include "keyboard_scan.h" #include "timer.h" diff --git a/board/kano/led.c b/board/kano/led.c index 1bbfc283de..6539ec3819 100644 --- a/board/kano/led.c +++ b/board/kano/led.c @@ -4,11 +4,11 @@ * Power and battery LED control for kano */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/kano/pwm.c b/board/kano/pwm.c index 6aae786cf3..3286e37631 100644 --- a/board/kano/pwm.c +++ b/board/kano/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/kano/sensors.c b/board/kano/sensors.c index 5eb1f6f933..cce5adcef9 100644 --- a/board/kano/sensors.c +++ b/board/kano/sensors.c @@ -3,22 +3,22 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc_chip.h" -#include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_bmi260.h" +#include "common.h" #include "driver/accel_bma422.h" +#include "driver/accel_kionix.h" +#include "driver/accelgyro_bmi260.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_icm426xx.h" #include "driver/accelgyro_icm_common.h" -#include "driver/accel_kionix.h" #include "fw_config.h" #include "gpio.h" #include "hooks.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/kano/usbc_config.c b/board/kano/usbc_config.c index ed18b2d021..d725ab91d2 100644 --- a/board/kano/usbc_config.c +++ b/board/kano/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -24,12 +21,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/kappa/board.c b/board/kappa/board.c index c00e375560..eec792c76b 100644 --- a/board/kappa/board.c +++ b/board/kappa/board.c @@ -53,6 +53,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/katsu/board.c b/board/katsu/board.c index 3527214f62..299ae558a8 100644 --- a/board/katsu/board.c +++ b/board/katsu/board.c @@ -13,8 +13,8 @@ #include "chipset.h" #include "common.h" #include "console.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/charger/rt946x.h" #include "driver/sync.h" #include "driver/tcpm/mt6370.h" @@ -56,6 +56,7 @@ static void gauge_interrupt(enum gpio_signal signal) task_wake(TASK_ID_CHARGER); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/kindred/board.c b/board/kindred/board.c index d6c9372d47..99375e94c7 100644 --- a/board/kindred/board.c +++ b/board/kindred/board.c @@ -12,8 +12,8 @@ #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/bc12/pi3usb9201.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/anx7447.h" @@ -31,15 +31,15 @@ #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" -#include "stdbool.h" #include "spi.h" +#include "stdbool.h" #include "switch.h" #include "system.h" #include "tablet_mode.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -132,7 +132,8 @@ static void bc12_interrupt(enum gpio_signal signal) } } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/kindred/led.c b/board/kindred/led.c index 05cc15b617..21be931889 100644 --- a/board/kindred/led.c +++ b/board/kindred/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Hatch */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/kingoftown/board.c b/board/kingoftown/board.c index 9ee1402380..b8bbd08d2e 100644 --- a/board/kingoftown/board.c +++ b/board/kingoftown/board.c @@ -7,9 +7,9 @@ #include "adc_chip.h" #include "button.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_scan.h" @@ -18,9 +18,9 @@ #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_config.h" @@ -29,6 +29,7 @@ #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Keyboard scan setting */ diff --git a/board/kingoftown/usbc_config.c b/board/kingoftown/usbc_config.c index eafd55bcf2..b18b43ed37 100644 --- a/board/kingoftown/usbc_config.c +++ b/board/kingoftown/usbc_config.c @@ -6,10 +6,10 @@ /* Kingoftown board-specific USB-C configuration */ #include "bc12/pi3usb9201_public.h" -#include "charger.h" -#include "charger/isl923x_public.h" #include "charge_manager.h" #include "charge_state.h" +#include "charger.h" +#include "charger/isl923x_public.h" #include "common.h" #include "config.h" #include "gpio.h" @@ -19,9 +19,9 @@ #include "tcpm/ps8xxx_public.h" #include "tcpm/tcpci.h" #include "timer.h" +#include "usb_mux.h" #include "usb_pd.h" #include "usbc_config.h" -#include "usb_mux.h" #include "usbc_ocp.h" #include "usbc_ppc.h" diff --git a/board/kinox/board.c b/board/kinox/board.c index 7d9955e05f..5748e5b013 100644 --- a/board/kinox/board.c +++ b/board/kinox/board.c @@ -11,18 +11,19 @@ #include "compile_time_macros.h" #include "console.h" #include "cros_board_info.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" -#include "power_button.h" #include "hooks.h" #include "power.h" +#include "power_button.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" #include "usbc_ppc.h" -#include "fw_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/kinox/fans.c b/board/kinox/fans.c index cb65e95f62..e5724e345a 100644 --- a/board/kinox/fans.c +++ b/board/kinox/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/kinox/i2c.c b/board/kinox/i2c.c index 0213134fcb..0412640a19 100644 --- a/board/kinox/i2c.c +++ b/board/kinox/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/kinox/pwm.c b/board/kinox/pwm.c index ce1f83e187..cee2bfd59c 100644 --- a/board/kinox/pwm.c +++ b/board/kinox/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/kinox/sensors.c b/board/kinox/sensors.c index c4262c7bde..ea193ddc53 100644 --- a/board/kinox/sensors.c +++ b/board/kinox/sensors.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc_chip.h" +#include "common.h" #include "hooks.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/kinox/usbc_config.c b/board/kinox/usbc_config.c index feeb3be6d1..381f82be44 100644 --- a/board/kinox/usbc_config.c +++ b/board/kinox/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -21,12 +18,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/kodama/board.c b/board/kodama/board.c index 5ebcf00d40..dcacdedc7d 100644 --- a/board/kodama/board.c +++ b/board/kodama/board.c @@ -49,6 +49,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/kodama/led.c b/board/kodama/led.c index d6c4297a44..8ea6f2e308 100644 --- a/board/kodama/led.c +++ b/board/kodama/led.c @@ -6,10 +6,10 @@ */ #include "charge_state.h" #include "driver/charger/rt946x.h" +#include "ec_commands.h" #include "hooks.h" #include "led_common.h" #include "led_onoff_states.h" -#include "ec_commands.h" #define LED_RED MT6370_LED_ID1 #define LED_GREEN MT6370_LED_ID2 diff --git a/board/kohaku/board.c b/board/kohaku/board.c index 42a5304353..fc7f77b369 100644 --- a/board/kohaku/board.c +++ b/board/kohaku/board.c @@ -13,8 +13,8 @@ #include "driver/accelgyro_bmi_common.h" #include "driver/als_bh1730.h" #include "driver/als_tcs3400.h" -#include "driver/ppc/sn5s330.h" #include "driver/bc12/max14637.h" +#include "driver/ppc/sn5s330.h" #include "driver/sync.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" @@ -33,8 +33,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -94,7 +94,8 @@ static void bc12_interrupt(enum gpio_signal signal) } } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/kracko/board.c b/board/kracko/board.c index 47bf6a7687..e0415b5c14 100644 --- a/board/kracko/board.c +++ b/board/kracko/board.c @@ -18,9 +18,9 @@ #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/sm5803.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/it83xx_pd.h" #include "driver/tcpm/ps8xxx.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/kukui/board.c b/board/kukui/board.c index 27ff7274d8..c41e98501e 100644 --- a/board/kukui/board.c +++ b/board/kukui/board.c @@ -61,6 +61,7 @@ static void gauge_interrupt(enum gpio_signal signal) static void motion_interrupt(enum gpio_signal signal); #endif /* SECTION_IS_RW */ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/kukui_scp/board.c b/board/kukui_scp/board.c index 7eab3c59a6..e961b91a94 100644 --- a/board/kukui_scp/board.c +++ b/board/kukui_scp/board.c @@ -16,5 +16,5 @@ #include "timer.h" #include "util.h" -/* Build GPIO tables */ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" diff --git a/board/kuldax/board.c b/board/kuldax/board.c index b5aeaf96b7..922a7a3a75 100644 --- a/board/kuldax/board.c +++ b/board/kuldax/board.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 <stdbool.h> - #include "adc.h" #include "builtin/assert.h" #include "button.h" @@ -13,18 +11,20 @@ #include "compile_time_macros.h" #include "console.h" #include "cros_board_info.h" +#include "driver/tcpm/tcpci.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" -#include "power_button.h" #include "hooks.h" #include "peripheral_charger.h" #include "power.h" +#include "power_button.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" #include "usbc_ppc.h" -#include "driver/tcpm/tcpci.h" -#include "fw_config.h" + +#include <stdbool.h> /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) @@ -217,7 +217,8 @@ static void port_ocp_interrupt(enum gpio_signal signal) { hook_call_deferred(&update_5v_usage_data, 0); } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* diff --git a/board/kuldax/fans.c b/board/kuldax/fans.c index a2acd805f8..6e3740a894 100644 --- a/board/kuldax/fans.c +++ b/board/kuldax/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/kuldax/i2c.c b/board/kuldax/i2c.c index b38080f6a5..e7868b4b08 100644 --- a/board/kuldax/i2c.c +++ b/board/kuldax/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/kuldax/pwm.c b/board/kuldax/pwm.c index 9ad0a686cc..21f0fa3c98 100644 --- a/board/kuldax/pwm.c +++ b/board/kuldax/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/kuldax/sensors.c b/board/kuldax/sensors.c index a41d5be713..687bfe3851 100644 --- a/board/kuldax/sensors.c +++ b/board/kuldax/sensors.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc_chip.h" +#include "common.h" #include "hooks.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/kuldax/usbc_config.c b/board/kuldax/usbc_config.c index c0d34fc581..a485dfb326 100644 --- a/board/kuldax/usbc_config.c +++ b/board/kuldax/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -23,12 +20,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/lalala/board.c b/board/lalala/board.c index f0f354fcf3..ed8c5ae2e5 100644 --- a/board/lalala/board.c +++ b/board/lalala/board.c @@ -9,7 +9,6 @@ #include "button.h" #include "cbi_fw_config.h" #include "cbi_ssfc.h" -#include "cbi_fw_config.h" #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" @@ -17,18 +16,17 @@ #include "common.h" #include "compile_time_macros.h" #include "driver/accel_bma2x2.h" +#include "driver/accel_kionix.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" -#include "driver/accel_kionix.h" -#include "driver/temp_sensor/thermistor.h" -#include "temp_sensor.h" +#include "driver/accelgyro_icm_common.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" +#include "driver/retimer/ps8802.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/pi3usb3x532.h" -#include "driver/retimer/ps8802.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -47,6 +45,7 @@ #include "system.h" #include "tablet_mode.h" #include "task.h" +#include "temp_sensor.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" @@ -188,6 +187,7 @@ static void sub_usb_c1_interrupt(enum gpio_signal s) hook_call_deferred(&check_c1_line_data, INT_RECHECK_US); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/lalala/led.c b/board/lalala/led.c index db36e2cb0b..94e55a8597 100644 --- a/board/lalala/led.c +++ b/board/lalala/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for lalala */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/lantis/board.c b/board/lantis/board.c index 9917231474..5ec54802d6 100644 --- a/board/lantis/board.c +++ b/board/lantis/board.c @@ -18,9 +18,9 @@ #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/sm5803.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/it83xx_pd.h" #include "driver/tcpm/ps8xxx.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/lazor/board.c b/board/lazor/board.c index 974f09e55f..ecfa4ace6b 100644 --- a/board/lazor/board.c +++ b/board/lazor/board.c @@ -7,14 +7,14 @@ #include "adc_chip.h" #include "button.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" -#include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" -#include "driver/accelgyro_icm426xx.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/accelgyro_bmi_common.h" +#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/ln9310.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_scan.h" @@ -24,10 +24,10 @@ #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" -#include "system.h" #include "shi_chip.h" #include "sku.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_config.h" @@ -37,6 +37,7 @@ #define CPRINTS(format, args...) #define CPRINTF(format, args...) +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Keyboard scan setting */ diff --git a/board/lazor/sku.c b/board/lazor/sku.c index 625231f5a9..0b622046a7 100644 --- a/board/lazor/sku.c +++ b/board/lazor/sku.c @@ -7,11 +7,11 @@ #include "config.h" #include "console.h" #include "driver/ln9310.h" -#include "tcpm/ps8xxx_public.h" #include "gpio.h" #include "hooks.h" #include "sku.h" #include "system.h" +#include "tcpm/ps8xxx_public.h" #include "util.h" #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/lazor/switchcap.c b/board/lazor/switchcap.c index f18378cab7..fc9dce3ada 100644 --- a/board/lazor/switchcap.c +++ b/board/lazor/switchcap.c @@ -11,8 +11,8 @@ #include "hooks.h" #include "i2c.h" #include "power/qcom.h" -#include "system.h" #include "sku.h" +#include "system.h" #define CPRINTS(format, args...) cprints(CC_I2C, format, ##args) #define CPRINTF(format, args...) cprintf(CC_I2C, format, ##args) diff --git a/board/lazor/usbc_config.c b/board/lazor/usbc_config.c index 26a8a5692d..410d0c19d1 100644 --- a/board/lazor/usbc_config.c +++ b/board/lazor/usbc_config.c @@ -7,10 +7,10 @@ #include "battery_fuel_gauge.h" #include "bc12/pi3usb9201_public.h" -#include "charger.h" -#include "charger/isl923x_public.h" #include "charge_manager.h" #include "charge_state.h" +#include "charger.h" +#include "charger/isl923x_public.h" #include "common.h" #include "config.h" #include "driver/ln9310.h" @@ -21,9 +21,9 @@ #include "tcpm/ps8xxx_public.h" #include "tcpm/tcpci.h" #include "timer.h" +#include "usb_mux.h" #include "usb_pd.h" #include "usbc_config.h" -#include "usb_mux.h" #include "usbc_ocp.h" #include "usbc_ppc.h" diff --git a/board/liara/board.c b/board/liara/board.c index f51fa1e2dd..e919cdb4e7 100644 --- a/board/liara/board.c +++ b/board/liara/board.c @@ -17,6 +17,7 @@ #include "pwm_chip.h" #include "switch.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" const enum gpio_signal hibernate_wake_pins[] = { diff --git a/board/lick/board.c b/board/lick/board.c index d20aad2968..2aea264d69 100644 --- a/board/lick/board.c +++ b/board/lick/board.c @@ -6,6 +6,7 @@ /* Lick board-specific configuration */ #include "adc.h" +#include "battery_smart.h" #include "button.h" #include "charge_state.h" #include "common.h" @@ -23,13 +24,12 @@ #include "power.h" #include "power_button.h" #include "switch.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "tcpm/tcpci.h" #include "temp_sensor.h" #include "temp_sensor/thermistor.h" #include "util.h" -#include "battery_smart.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTFUSB(format, args...) cprintf(CC_USBCHARGE, format, ##args) diff --git a/board/lick/led.c b/board/lick/led.c index 80972c468b..1d5bd17c0d 100644 --- a/board/lick/led.c +++ b/board/lick/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Lick */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/lindar/board.c b/board/lindar/board.c index e3ee0ff9c4..49d90502ba 100644 --- a/board/lindar/board.c +++ b/board/lindar/board.c @@ -14,8 +14,8 @@ #include "driver/ppc/syv682x.h" #include "driver/sync.h" #include "driver/tcpm/ps8xxx.h" -#include "driver/tcpm/tcpci.h" #include "driver/tcpm/rt1715.h" +#include "driver/tcpm/tcpci.h" #include "driver/tcpm/tusb422.h" #include "extpower.h" #include "fan.h" @@ -30,8 +30,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "uart.h" #include "usb_mux.h" #include "usb_pd.h" @@ -39,7 +39,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) #define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ##args) diff --git a/board/lisbon/board.c b/board/lisbon/board.c index aa9a2fb7b0..62198744af 100644 --- a/board/lisbon/board.c +++ b/board/lisbon/board.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 <stdbool.h> - #include "adc.h" #include "builtin/assert.h" #include "button.h" @@ -13,18 +11,20 @@ #include "compile_time_macros.h" #include "console.h" #include "cros_board_info.h" +#include "driver/tcpm/tcpci.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" -#include "power_button.h" #include "hooks.h" #include "peripheral_charger.h" #include "power.h" +#include "power_button.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" #include "usbc_ppc.h" -#include "driver/tcpm/tcpci.h" -#include "fw_config.h" + +#include <stdbool.h> /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) @@ -215,7 +215,8 @@ static void port_ocp_interrupt(enum gpio_signal signal) { hook_call_deferred(&update_5v_usage_data, 0); } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* diff --git a/board/lisbon/fans.c b/board/lisbon/fans.c index 6828438a10..3f3ad3ccea 100644 --- a/board/lisbon/fans.c +++ b/board/lisbon/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/lisbon/i2c.c b/board/lisbon/i2c.c index 0a0b6b69a6..45eba1e13c 100644 --- a/board/lisbon/i2c.c +++ b/board/lisbon/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/lisbon/pwm.c b/board/lisbon/pwm.c index 3d4335f453..53e59919ab 100644 --- a/board/lisbon/pwm.c +++ b/board/lisbon/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/lisbon/sensors.c b/board/lisbon/sensors.c index 162140d37d..13948f60d8 100644 --- a/board/lisbon/sensors.c +++ b/board/lisbon/sensors.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc_chip.h" +#include "common.h" #include "hooks.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/lisbon/usbc_config.c b/board/lisbon/usbc_config.c index 806ff2c4ee..125b443f8c 100644 --- a/board/lisbon/usbc_config.c +++ b/board/lisbon/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -25,12 +22,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/madoo/board.c b/board/madoo/board.c index 77c939143a..a1cdb024f9 100644 --- a/board/madoo/board.c +++ b/board/madoo/board.c @@ -28,8 +28,8 @@ #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "keyboard_scan.h" #include "keyboard_8042_sharedlib.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "motion_sense.h" #include "power.h" @@ -129,6 +129,7 @@ static void c0_ccsbu_ovp_interrupt(enum gpio_signal s) pd_handle_cc_overvoltage(0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/madoo/led.c b/board/madoo/led.c index 90cd0ab210..5d17acee6e 100644 --- a/board/madoo/led.c +++ b/board/madoo/led.c @@ -9,9 +9,9 @@ #include "driver/tcpm/tcpci.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "led_common.h" #include "led_onoff_states.h" -#include "hooks.h" #include "system.h" #define LED_OFF_LVL 1 diff --git a/board/magolor/board.c b/board/magolor/board.c index 3ddc1af3d1..af524d9bfa 100644 --- a/board/magolor/board.c +++ b/board/magolor/board.c @@ -9,7 +9,6 @@ #include "button.h" #include "cbi_fw_config.h" #include "cbi_ssfc.h" -#include "cbi_fw_config.h" #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" @@ -17,19 +16,18 @@ #include "common.h" #include "compile_time_macros.h" #include "driver/accel_bma2x2.h" +#include "driver/accel_kionix.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" -#include "driver/accel_kionix.h" -#include "driver/temp_sensor/thermistor.h" -#include "temp_sensor.h" +#include "driver/accelgyro_icm_common.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" +#include "driver/retimer/ps8802.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/pi3usb3x532.h" #include "driver/usb_mux/ps8743.h" -#include "driver/retimer/ps8802.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -48,6 +46,7 @@ #include "system.h" #include "tablet_mode.h" #include "task.h" +#include "temp_sensor.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" @@ -285,6 +284,7 @@ static void sub_hdmi_hpd_interrupt(enum gpio_signal s) gpio_set_level(GPIO_EC_AP_USB_C1_HDMI_HPD, !hdmi_hpd_odl); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/magolor/led.c b/board/magolor/led.c index 891bc4cecb..2076532142 100644 --- a/board/magolor/led.c +++ b/board/magolor/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Magolor */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/makomo/board.c b/board/makomo/board.c index 5a7158b58a..08a2bf75f3 100644 --- a/board/makomo/board.c +++ b/board/makomo/board.c @@ -28,8 +28,8 @@ #include "i2c.h" #include "i2c_bitbang.h" #include "it8801.h" -#include "keyboard_scan.h" #include "keyboard_backlight.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "panic.h" #include "power.h" @@ -54,6 +54,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/makomo/led.c b/board/makomo/led.c index 0870806eff..d0a7f7165c 100644 --- a/board/makomo/led.c +++ b/board/makomo/led.c @@ -5,9 +5,9 @@ * Power and battery LED control for Makomo */ #include "common.h" -#include "ioexpander.h" #include "driver/ioexpander/it8801.h" #include "ec_commands.h" +#include "ioexpander.h" #include "led_common.h" #include "led_onoff_states.h" diff --git a/board/marasov/board.c b/board/marasov/board.c index e48dfaa163..b7f9745fa8 100644 --- a/board/marasov/board.c +++ b/board/marasov/board.c @@ -9,23 +9,24 @@ #include "charger.h" #include "common.h" #include "console.h" -#include "driver/accelgyro_lsm6dso.h" #include "driver/accel_lis2dw12.h" +#include "driver/accelgyro_lsm6dso.h" #include "driver/als_tcs3400.h" #include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" #include "hooks.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/marasov/charger.c b/board/marasov/charger.c index 68fff4f283..c531286643 100644 --- a/board/marasov/charger.c +++ b/board/marasov/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/bq25710.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/marasov/fans.c b/board/marasov/fans.c index 158f4bf704..d9b4d0d99a 100644 --- a/board/marasov/fans.c +++ b/board/marasov/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/marasov/keyboard.c b/board/marasov/keyboard.c index 936aeb290b..457a55718c 100644 --- a/board/marasov/keyboard.c +++ b/board/marasov/keyboard.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "keyboard_scan.h" #include "timer.h" diff --git a/board/marasov/pwm.c b/board/marasov/pwm.c index f693a6e27f..a1ffcbef30 100644 --- a/board/marasov/pwm.c +++ b/board/marasov/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/marasov/sensors.c b/board/marasov/sensors.c index 2a25141639..a17b6f3e04 100644 --- a/board/marasov/sensors.c +++ b/board/marasov/sensors.c @@ -3,13 +3,13 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc.h" +#include "common.h" #include "gpio.h" #include "hooks.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ struct adc_t adc_channels[] = { diff --git a/board/marasov/usbc_config.c b/board/marasov/usbc_config.c index b974ba7509..d0acbb33c2 100644 --- a/board/marasov/usbc_config.c +++ b/board/marasov/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "cbi.h" #include "charger.h" #include "common.h" @@ -26,11 +23,14 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/marzipan/board.c b/board/marzipan/board.c index cf59f133e7..b2f7ade2ba 100644 --- a/board/marzipan/board.c +++ b/board/marzipan/board.c @@ -10,16 +10,16 @@ #include "button.h" #include "charge_manager.h" #include "charge_state.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" -#include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" -#include "driver/accelgyro_icm426xx.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/accelgyro_bmi_common.h" +#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_scan.h" @@ -30,9 +30,9 @@ #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_config.h" @@ -42,6 +42,7 @@ #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" void usb0_evt(enum gpio_signal signal) diff --git a/board/marzipan/usbc_config.c b/board/marzipan/usbc_config.c index 5b41e22d33..f7e9bd6220 100644 --- a/board/marzipan/usbc_config.c +++ b/board/marzipan/usbc_config.c @@ -5,9 +5,9 @@ /* Marzipan board-specific USB-C configuration */ +#include "charge_state.h" #include "charger.h" #include "charger/isl923x_public.h" -#include "charge_state.h" #include "usb_pd.h" #include "usbc_config.h" diff --git a/board/max32660-eval/board.c b/board/max32660-eval/board.c index 91e78287f3..442469ba27 100644 --- a/board/max32660-eval/board.c +++ b/board/max32660-eval/board.c @@ -5,15 +5,17 @@ /* MAX32660 EvalKit Board Specific Configuration */ -#include "i2c.h" -#include "board.h" +#include "config.h" #include "console.h" #include "ec_commands.h" #include "gpio.h" #include "hooks.h" -#include "timer.h" +#include "i2c.h" #include "registers.h" +#include "timer.h" #include "util.h" + +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c index 3b7b34843b..c10520276b 100644 --- a/board/mchpevb1/board.c +++ b/board/mchpevb1/board.c @@ -12,6 +12,7 @@ #include "adc.h" #include "als.h" +#include "battery_smart.h" #include "bd99992gw.h" #include "button.h" #include "charge_manager.h" @@ -19,24 +20,24 @@ #include "charger.h" #include "chipset.h" #include "console.h" -#include "driver/als_opt3001.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" #include "driver/accelgyro_bmi_common.h" +#include "driver/als_opt3001.h" #include "driver/tcpm/tcpci.h" +#include "espi.h" #include "extpower.h" -#include "gpio_chip.h" #include "gpio.h" +#include "gpio_chip.h" #include "hooks.h" #include "host_command.h" #include "i2c.h" -#include "espi.h" -#include "lpc_chip.h" #include "keyboard_scan.h" #include "lid_switch.h" +#include "lpc_chip.h" #include "math_util.h" -#include "motion_sense.h" #include "motion_lid.h" +#include "motion_sense.h" #include "pi3usb9281.h" #include "power.h" #include "power_button.h" @@ -53,8 +54,6 @@ #include "usb_pd.h" #include "usb_pd_tcpm.h" #include "util.h" -#include "espi.h" -#include "battery_smart.h" /* Console output macros */ #define CPUTS(outstr) cputs(CC_LPC, outstr) @@ -206,6 +205,7 @@ void tablet_mode_interrupt(enum gpio_signal signal) hook_call_deferred(&enable_input_devices_data, 0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels diff --git a/board/mchpevb1/usb_pd_policy.c b/board/mchpevb1/usb_pd_policy.c index f84d5d1171..107b5029cf 100644 --- a/board/mchpevb1/usb_pd_policy.c +++ b/board/mchpevb1/usb_pd_policy.c @@ -14,9 +14,9 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/meep/led.c b/board/meep/led.c index 87d94904c4..dab78ccad4 100644 --- a/board/meep/led.c +++ b/board/meep/led.c @@ -7,9 +7,9 @@ #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "led_common.h" #include "led_onoff_states.h" -#include "hooks.h" #define LED_OFF_LVL 1 #define LED_ON_LVL 0 diff --git a/board/metaknight/board.c b/board/metaknight/board.c index e5d86aba63..cde7ed51ec 100644 --- a/board/metaknight/board.c +++ b/board/metaknight/board.c @@ -18,16 +18,15 @@ #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_lsm6dsm.h" -#include "driver/temp_sensor/thermistor.h" -#include "temp_sensor.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" #include "driver/retimer/nb7v904m.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/pi3usb3x532.h" #include "extpower.h" #include "gpio.h" @@ -45,6 +44,7 @@ #include "system.h" #include "tablet_mode.h" #include "task.h" +#include "temp_sensor.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" @@ -142,6 +142,7 @@ static void pen_charge_check(void) DECLARE_HOOK(HOOK_CHIPSET_STARTUP, pen_charge_check, HOOK_PRIO_LAST); DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, pen_charge_check, HOOK_PRIO_LAST); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/metaknight/led.c b/board/metaknight/led.c index a48b4bcf2a..f117146f48 100644 --- a/board/metaknight/led.c +++ b/board/metaknight/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Metaknight */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/mithrax/board.c b/board/mithrax/board.c index 69ba7d5b32..49d2849ab1 100644 --- a/board/mithrax/board.c +++ b/board/mithrax/board.c @@ -10,26 +10,26 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "gpio.h" -#include "gpio_signal.h" -#include "hooks.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_lsm6dso.h" +#include "ec_commands.h" #include "fw_config.h" +#include "gpio.h" +#include "gpio_signal.h" #include "hooks.h" +#include "keyboard_backlight.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" +#include "rgb_keyboard.h" #include "switch.h" #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "keyboard_backlight.h" -#include "rgb_keyboard.h" -#include "ec_commands.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/mithrax/charger_isl9241.c b/board/mithrax/charger_isl9241.c index 7a16fcd5cb..c6ee062ab5 100644 --- a/board/mithrax/charger_isl9241.c +++ b/board/mithrax/charger_isl9241.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/isl9241.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/mithrax/fans.c b/board/mithrax/fans.c index fd7b380f77..9dbc34589e 100644 --- a/board/mithrax/fans.c +++ b/board/mithrax/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/mithrax/i2c.c b/board/mithrax/i2c.c index 76a9dfdc1c..1a5d348c30 100644 --- a/board/mithrax/i2c.c +++ b/board/mithrax/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/mithrax/keyboard_customization.c b/board/mithrax/keyboard_customization.c index cc3623390f..c241189a21 100644 --- a/board/mithrax/keyboard_customization.c +++ b/board/mithrax/keyboard_customization.c @@ -5,9 +5,9 @@ #include "common.h" #include "gpio.h" -#include "keyboard_customization.h" #include "keyboard_8042_sharedlib.h" #include "keyboard_config.h" +#include "keyboard_customization.h" #include "keyboard_protocol.h" #include "keyboard_raw.h" diff --git a/board/mithrax/pwm.c b/board/mithrax/pwm.c index 8f3759316e..c889b1d70e 100644 --- a/board/mithrax/pwm.c +++ b/board/mithrax/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/mithrax/sensors.c b/board/mithrax/sensors.c index b72022a0e0..215b0cd2c5 100644 --- a/board/mithrax/sensors.c +++ b/board/mithrax/sensors.c @@ -3,17 +3,17 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc_chip.h" +#include "common.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_lsm6dso.h" #include "gpio.h" #include "hooks.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/mithrax/usbc_config.c b/board/mithrax/usbc_config.c index 10189bbf50..8557da622f 100644 --- a/board/mithrax/usbc_config.c +++ b/board/mithrax/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -26,12 +23,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/moli/board.c b/board/moli/board.c index a63c93ae50..e3a7bd0fa9 100644 --- a/board/moli/board.c +++ b/board/moli/board.c @@ -281,7 +281,8 @@ void board_overcurrent_event(int port, int is_overcurrented) #define POWER_DELAY_MS 2 #define POWER_READINGS (10 / POWER_DELAY_MS) -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" static void power_monitor(void) { diff --git a/board/moli/fans.c b/board/moli/fans.c index 7ad99d4af1..88eb45935e 100644 --- a/board/moli/fans.c +++ b/board/moli/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/moli/i2c.c b/board/moli/i2c.c index 97625c9b29..472eb35424 100644 --- a/board/moli/i2c.c +++ b/board/moli/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/moli/pwm.c b/board/moli/pwm.c index 480c90a78f..405dcddcae 100644 --- a/board/moli/pwm.c +++ b/board/moli/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/moli/sensors.c b/board/moli/sensors.c index 5394f16f5d..2ad327617e 100644 --- a/board/moli/sensors.c +++ b/board/moli/sensors.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc_chip.h" +#include "common.h" #include "hooks.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/moli/usbc_config.c b/board/moli/usbc_config.c index fce8b46aa2..1c2f7eccf8 100644 --- a/board/moli/usbc_config.c +++ b/board/moli/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -23,12 +20,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/moonbuggy/board.c b/board/moonbuggy/board.c index 9d8162c2d0..198c16851c 100644 --- a/board/moonbuggy/board.c +++ b/board/moonbuggy/board.c @@ -30,8 +30,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_common.h" #include "util.h" @@ -143,7 +143,8 @@ void ads_12v_interrupt(enum gpio_signal signal) /******************************************************************************/ -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/morphius/board.c b/board/morphius/board.c index e801fd8569..03a141e98b 100644 --- a/board/morphius/board.c +++ b/board/morphius/board.c @@ -11,11 +11,11 @@ #include "cbi_ssfc.h" #include "charger.h" #include "cros_board_info.h" -#include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" -#include "driver/accelgyro_icm426xx.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/accelgyro_bmi_common.h" +#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/ppc/aoz1380_public.h" #include "driver/ppc/nx20p348x.h" #include "driver/retimer/pi3dpx1207.h" @@ -24,9 +24,9 @@ #include "driver/temp_sensor/tmp432.h" #include "driver/usb_mux/amd_fp5.h" #include "extpower.h" -#include "gpio.h" #include "fan.h" #include "fan_chip.h" +#include "gpio.h" #include "hooks.h" #include "keyboard_8042.h" #include "lid_switch.h" @@ -42,14 +42,15 @@ #include "task.h" #include "temp_sensor.h" #include "temp_sensor/thermistor.h" -#include "usb_mux.h" #include "usb_charge.h" +#include "usb_mux.h" #include "usbc_ppc.h" static void hdmi_hpd_interrupt_v2(enum ioex_signal signal); static void hdmi_hpd_interrupt_v3(enum gpio_signal signal); static void board_gmr_tablet_switch_isr(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" static bool support_aoz_ppc; diff --git a/board/morphius/board.h b/board/morphius/board.h index 39bce41a46..b430055930 100644 --- a/board/morphius/board.h +++ b/board/morphius/board.h @@ -10,9 +10,10 @@ #define VARIANT_ZORK_TREMBYLE -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #define CONFIG_USBC_RETIMER_PI3DPX1207 #define CONFIG_8042_AUX #define CONFIG_PS2 diff --git a/board/mrbland/board.c b/board/mrbland/board.c index 52b1c50a1b..c078d29ef7 100644 --- a/board/mrbland/board.c +++ b/board/mrbland/board.c @@ -10,15 +10,15 @@ #include "charge_manager.h" #include "charge_state.h" #include "common.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/ln9310.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_mkbp.h" @@ -32,9 +32,9 @@ #include "pwm.h" #include "pwm_chip.h" #include "queue.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_ppc.h" @@ -51,6 +51,7 @@ static void ppc_interrupt(enum gpio_signal signal); static void board_connect_c0_sbu(enum gpio_signal s); static void switchcap_interrupt(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* GPIO Interrupt Handlers */ diff --git a/board/mrbland/led.c b/board/mrbland/led.c index 07994b8f51..fbc7bf3c19 100644 --- a/board/mrbland/led.c +++ b/board/mrbland/led.c @@ -10,13 +10,13 @@ #include "charge_state.h" #include "chipset.h" #include "ec_commands.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" #include "led_common.h" #include "system.h" #include "util.h" -#include "extpower.h" #define LED_ONE_SEC (1000 / HOOK_TICK_INTERVAL_MS) /* Battery LED blinks every per 400ms */ diff --git a/board/mrbland/usbc_config.c b/board/mrbland/usbc_config.c index 5d30adb6e2..28f6b7a1c9 100644 --- a/board/mrbland/usbc_config.c +++ b/board/mrbland/usbc_config.c @@ -5,9 +5,9 @@ /* Trogdor family-specific USB-C configuration */ +#include "charge_state.h" #include "charger.h" #include "charger/isl923x_public.h" -#include "charge_state.h" #include "console.h" #include "usb_pd.h" diff --git a/board/munna/board.c b/board/munna/board.c index 6d7b35da1c..b09605cae4 100644 --- a/board/munna/board.c +++ b/board/munna/board.c @@ -28,8 +28,8 @@ #include "i2c.h" #include "i2c_bitbang.h" #include "it8801.h" -#include "keyboard_scan.h" #include "keyboard_backlight.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "panic.h" #include "power.h" @@ -53,6 +53,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/munna/led.c b/board/munna/led.c index bd286b25a3..e537863e80 100644 --- a/board/munna/led.c +++ b/board/munna/led.c @@ -5,9 +5,9 @@ * Power and battery LED control for Munna */ #include "common.h" -#include "ioexpander.h" #include "driver/ioexpander/it8801.h" #include "ec_commands.h" +#include "ioexpander.h" #include "led_common.h" #include "led_onoff_states.h" diff --git a/board/mushu/board.c b/board/mushu/board.c index 7197f7e136..15893a4b87 100644 --- a/board/mushu/board.c +++ b/board/mushu/board.c @@ -36,8 +36,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -107,7 +107,8 @@ static void bc12_interrupt(enum gpio_signal signal) } } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/mushu/led.c b/board/mushu/led.c index 6d20ecdedf..1ec2075586 100644 --- a/board/mushu/led.c +++ b/board/mushu/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Mushu */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/nami/board.c b/board/nami/board.c index 2ab66ab951..468dd428c3 100644 --- a/board/nami/board.c +++ b/board/nami/board.c @@ -11,24 +11,27 @@ #include "board_config.h" #include "button.h" #include "charge_manager.h" -#include "charge_state.h" #include "charge_ramp.h" +#include "charge_state.h" #include "charger.h" #include "chipset.h" #include "console.h" #include "cros_board_info.h" -#include "driver/pmic_tps650x30.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/baro_bmp280.h" #include "driver/charger/isl923x.h" #include "driver/led/lm3509.h" +#include "driver/pmic_tps650x30.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" #include "driver/tcpm/tcpm.h" #include "driver/temp_sensor/f75303.h" +#include "espi.h" #include "extpower.h" +#include "fan.h" +#include "fan_chip.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -61,9 +64,6 @@ #include "usb_pd.h" #include "usb_pd_tcpm.h" #include "util.h" -#include "espi.h" -#include "fan.h" -#include "fan_chip.h" #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) @@ -145,6 +145,7 @@ void usb1_evt(enum gpio_signal signal) usb_charger_task_set_event(1, USB_CHG_EVENT_BC12); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/nami/led.c b/board/nami/led.c index ce9cefed7f..a92302b860 100644 --- a/board/nami/led.c +++ b/board/nami/led.c @@ -25,10 +25,10 @@ * connected to a regular GPIO pin. */ -#include "cros_board_info.h" #include "charge_state.h" #include "chipset.h" #include "console.h" +#include "cros_board_info.h" #include "ec_commands.h" #include "gpio.h" #include "hooks.h" diff --git a/board/nami/usb_pd_policy.c b/board/nami/usb_pd_policy.c index e022adc5d9..e8111e7cbd 100644 --- a/board/nami/usb_pd_policy.c +++ b/board/nami/usb_pd_policy.c @@ -4,12 +4,12 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "chipset.h" #include "common.h" #include "console.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -17,10 +17,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/nautilus/board.c b/board/nautilus/board.c index af7d7f48d4..c3569ce56b 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -6,24 +6,25 @@ /* Poppy board-specific configuration */ #include "adc.h" +#include "battery_smart.h" #include "bd99992gw.h" #include "board_config.h" -#include "battery_smart.h" #include "button.h" #include "charge_manager.h" -#include "charge_state.h" #include "charge_ramp.h" +#include "charge_state.h" #include "charger.h" #include "chipset.h" #include "console.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accel_bma2x2.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/baro_bmp280.h" #include "driver/charger/isl923x.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" #include "driver/tcpm/tcpm.h" #include "driver/temp_sensor/bd99992gw.h" +#include "espi.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -34,8 +35,8 @@ #include "math_util.h" #include "motion_lid.h" #include "motion_sense.h" -#include "pi3usb9281.h" #include "panic.h" +#include "pi3usb9281.h" #include "power.h" #include "power_button.h" #include "spi.h" @@ -51,7 +52,6 @@ #include "usb_pd.h" #include "usb_pd_tcpm.h" #include "util.h" -#include "espi.h" #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) @@ -111,6 +111,7 @@ void usb1_evt(enum gpio_signal signal) usb_charger_task_set_event(1, USB_CHG_EVENT_BC12); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Hibernate wake configuration */ diff --git a/board/nautilus/usb_pd_policy.c b/board/nautilus/usb_pd_policy.c index e01fd75f73..050eae9a64 100644 --- a/board/nautilus/usb_pd_policy.c +++ b/board/nautilus/usb_pd_policy.c @@ -4,11 +4,11 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "common.h" #include "console.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -16,10 +16,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/nightfury/board.c b/board/nightfury/board.c index bfcdd14628..bc1c26de12 100644 --- a/board/nightfury/board.c +++ b/board/nightfury/board.c @@ -13,8 +13,8 @@ #include "driver/accelgyro_bmi_common.h" #include "driver/als_opt3001.h" #include "driver/als_tcs3400.h" -#include "driver/ppc/sn5s330.h" #include "driver/bc12/pi3usb9201.h" +#include "driver/ppc/sn5s330.h" #include "driver/sync.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" @@ -36,8 +36,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -97,7 +97,8 @@ static void bc12_interrupt(enum gpio_signal signal) } } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/nipperkin/board.c b/board/nipperkin/board.c index e4f3c0db57..0111f9c04e 100644 --- a/board/nipperkin/board.c +++ b/board/nipperkin/board.c @@ -18,8 +18,8 @@ #include "driver/retimer/pi3hdx1204.h" #include "driver/retimer/ps8811.h" #include "driver/retimer/ps8818_public.h" -#include "driver/temp_sensor/sb_tsi.h" #include "driver/temp_sensor/pct2075.h" +#include "driver/temp_sensor/sb_tsi.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -37,7 +37,8 @@ static void hdmi_hpd_interrupt(enum gpio_signal signal); -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* * We have total 30 pins for keyboard connecter {-1, -1} mean diff --git a/board/nipperkin/led.c b/board/nipperkin/led.c index c7d6e0e0bc..5390748af1 100644 --- a/board/nipperkin/led.c +++ b/board/nipperkin/led.c @@ -9,9 +9,9 @@ #include "chipset.h" #include "ec_commands.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "led_common.h" -#include "hooks.h" #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/nocturne/battery.c b/board/nocturne/battery.c index c81640e983..bfb4b25467 100644 --- a/board/nocturne/battery.c +++ b/board/nocturne/battery.c @@ -8,9 +8,9 @@ #include "battery.h" #include "battery_smart.h" #include "charge_manager.h" +#include "charge_state_v2.h" #include "charger.h" #include "chipset.h" -#include "charge_state_v2.h" #include "common.h" #include "console.h" #include "ec_commands.h" diff --git a/board/nocturne/board.c b/board/nocturne/board.c index 1c0b2b3397..b566d43e41 100644 --- a/board/nocturne/board.c +++ b/board/nocturne/board.c @@ -12,8 +12,8 @@ #include "charge_state_v2.h" #include "chipset.h" #include "common.h" -#include "console.h" #include "compile_time_macros.h" +#include "console.h" #include "driver/accelgyro_bmi_common.h" #include "driver/als_opt3001.h" #include "driver/charger/isl923x.h" @@ -36,9 +36,9 @@ #include "pwm.h" #include "pwm_chip.h" #include "registers.h" +#include "switch.h" #include "system.h" #include "system_chip.h" -#include "switch.h" #include "task.h" #include "tcpm/tcpci.h" #include "temp_sensor.h" @@ -95,6 +95,7 @@ static void board_connect_c0_sbu(enum gpio_signal s) hook_call_deferred(&board_connect_c0_sbu_deferred_data, 0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" const enum gpio_signal hibernate_wake_pins[] = { diff --git a/board/nocturne/usb_pd_policy.c b/board/nocturne/usb_pd_policy.c index 5f1e5af365..26c654d346 100644 --- a/board/nocturne/usb_pd_policy.c +++ b/board/nocturne/usb_pd_policy.c @@ -6,8 +6,8 @@ #include "charge_manager.h" #include "chipset.h" #include "common.h" -#include "console.h" #include "compile_time_macros.h" +#include "console.h" #include "ec_commands.h" #include "gpio.h" #include "system.h" diff --git a/board/nocturne_fp/board.h b/board/nocturne_fp/board.h index d95df6101a..6b09187642 100644 --- a/board/nocturne_fp/board.h +++ b/board/nocturne_fp/board.h @@ -226,8 +226,8 @@ #define TIM_CLOCK32 2 #define TIM_WATCHDOG 16 -#include "gpio_signal.h" #include "board_rw.h" +#include "gpio_signal.h" void slp_event(enum gpio_signal signal); diff --git a/board/nocturne_fp/board_ro.c b/board/nocturne_fp/board_ro.c index f215cd91cf..7350e5bded 100644 --- a/board/nocturne_fp/board_ro.c +++ b/board/nocturne_fp/board_ro.c @@ -25,6 +25,7 @@ int console_is_restricted(void) return system_is_locked(); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" static void ap_deferred(void) diff --git a/board/nocturne_fp/board_rw.c b/board/nocturne_fp/board_rw.c index fd5899c799..6c6de4fbae 100644 --- a/board/nocturne_fp/board_rw.c +++ b/board/nocturne_fp/board_rw.c @@ -3,6 +3,7 @@ * found in the LICENSE file. */ +#include "board_rw.h" #include "common.h" #include "console.h" #include "fpsensor_detect.h" @@ -13,7 +14,6 @@ #include "system.h" #include "task.h" #include "util.h" -#include "board_rw.h" #ifndef SECTION_IS_RW #error "This file should only be built for RW." @@ -29,6 +29,7 @@ int console_is_restricted(void) return system_is_locked(); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* SPI devices */ diff --git a/board/nocturne_fp/board_rw.h b/board/nocturne_fp/board_rw.h index 1687da3737..ebb0892829 100644 --- a/board/nocturne_fp/board_rw.h +++ b/board/nocturne_fp/board_rw.h @@ -6,6 +6,9 @@ #ifndef __CROS_EC_BOARD_NOCTURNE_FP_BOARD_RW_H #define __CROS_EC_BOARD_NOCTURNE_FP_BOARD_RW_H +#include "config.h" +#include "gpio_signal.h" + void fps_event(enum gpio_signal signal); /* Defined in ro_workarounds.c */ diff --git a/board/nocturne_fp/ro_workarounds.c b/board/nocturne_fp/ro_workarounds.c index 11f025fd5b..92f7dacd28 100644 --- a/board/nocturne_fp/ro_workarounds.c +++ b/board/nocturne_fp/ro_workarounds.c @@ -5,9 +5,6 @@ /* A place to organize workarounds for legacy RO */ -#include <assert.h> -#include <stdbool.h> - #include "bkpdata.h" #include "common.h" #include "console.h" @@ -18,6 +15,9 @@ #include "task.h" #include "watchdog.h" +#include <assert.h> +#include <stdbool.h> + /* Console output macros */ #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) diff --git a/board/npcx7_evb/board.c b/board/npcx7_evb/board.c index c78a30f3de..250f963b88 100644 --- a/board/npcx7_evb/board.c +++ b/board/npcx7_evb/board.c @@ -27,10 +27,11 @@ #include "switch.h" #include "temp_sensor.h" #include "temp_sensor_chip.h" -#include "timer.h" #include "thermal.h" +#include "timer.h" #include "util.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/npcx9_evb/board.c b/board/npcx9_evb/board.c index d0c90ee9b1..27b1651a0c 100644 --- a/board/npcx9_evb/board.c +++ b/board/npcx9_evb/board.c @@ -27,10 +27,11 @@ #include "switch.h" #include "temp_sensor.h" #include "temp_sensor_chip.h" -#include "timer.h" #include "thermal.h" +#include "timer.h" #include "util.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/npcx_evb/board.c b/board/npcx_evb/board.c index 06ab55f94a..dab80f8531 100644 --- a/board/npcx_evb/board.c +++ b/board/npcx_evb/board.c @@ -26,10 +26,11 @@ #include "switch.h" #include "temp_sensor.h" #include "temp_sensor_chip.h" -#include "timer.h" #include "thermal.h" +#include "timer.h" #include "util.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/npcx_evb_arm/board.c b/board/npcx_evb_arm/board.c index 209bf047e2..28b72d5f3c 100644 --- a/board/npcx_evb_arm/board.c +++ b/board/npcx_evb_arm/board.c @@ -22,14 +22,15 @@ #include "pwm.h" #include "pwm_chip.h" #include "registers.h" +#include "shi_chip.h" #include "switch.h" #include "temp_sensor.h" #include "temp_sensor_chip.h" -#include "timer.h" #include "thermal.h" +#include "timer.h" #include "util.h" -#include "shi_chip.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/nucleo-dartmonkey/board.c b/board/nucleo-dartmonkey/board.c index 1cd6ef5dee..165ae8eb93 100644 --- a/board/nucleo-dartmonkey/board.c +++ b/board/nucleo-dartmonkey/board.c @@ -63,6 +63,7 @@ void fps_event(enum gpio_signal signal) } #endif +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* SPI devices */ diff --git a/board/nucleo-f072rb/board.c b/board/nucleo-f072rb/board.c index 729589a702..8d75379f97 100644 --- a/board/nucleo-f072rb/board.c +++ b/board/nucleo-f072rb/board.c @@ -6,9 +6,9 @@ #include "common.h" #include "gpio.h" #include "hooks.h" +#include "i2c.h" #include "registers.h" #include "task.h" -#include "i2c.h" #include "timer.h" void button_event(enum gpio_signal signal) @@ -29,6 +29,7 @@ __attribute__((weak)) void cts_irq2(enum gpio_signal signal) } #endif +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" void tick_event(void) diff --git a/board/nucleo-f411re/board.c b/board/nucleo-f411re/board.c index 0c77a64e71..8fce43c988 100644 --- a/board/nucleo-f411re/board.c +++ b/board/nucleo-f411re/board.c @@ -13,8 +13,6 @@ #include "hooks.h" #include "i2c.h" #include "motion_sense.h" - -#include "gpio.h" #include "registers.h" #include "task.h" #include "util.h" @@ -24,6 +22,7 @@ void user_button_evt(enum gpio_signal signal) ccprintf("Button %d, %d!\n", signal, gpio_get_level(signal)); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Initialize board. */ diff --git a/board/nucleo-f412zg/board.c b/board/nucleo-f412zg/board.c index 9ab9bfa190..39110cd82b 100644 --- a/board/nucleo-f412zg/board.c +++ b/board/nucleo-f412zg/board.c @@ -50,6 +50,7 @@ static void slp_event(enum gpio_signal signal) hook_call_deferred(&ap_deferred_data, 0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Initialize board. */ diff --git a/board/nucleo-g431rb/board.c b/board/nucleo-g431rb/board.c index ef73c00924..5a6a0a6f5c 100644 --- a/board/nucleo-g431rb/board.c +++ b/board/nucleo-g431rb/board.c @@ -9,7 +9,8 @@ #include "gpio.h" #include "hooks.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" static void board_init(void) { diff --git a/board/nucleo-h743zi/board.c b/board/nucleo-h743zi/board.c index f63c362d5f..0752b02f0c 100644 --- a/board/nucleo-h743zi/board.c +++ b/board/nucleo-h743zi/board.c @@ -50,6 +50,7 @@ static void slp_event(enum gpio_signal signal) hook_call_deferred(&ap_deferred_data, 0); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Initialize board. */ diff --git a/board/nuwani/board.c b/board/nuwani/board.c index eb36ad9df8..de2506d0a1 100644 --- a/board/nuwani/board.c +++ b/board/nuwani/board.c @@ -16,11 +16,12 @@ #include "power.h" #include "power_button.h" #include "pwm.h" -#include "system.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" const enum gpio_signal hibernate_wake_pins[] = { diff --git a/board/nuwani/led.c b/board/nuwani/led.c index 4013f22bd5..f04a422592 100644 --- a/board/nuwani/led.c +++ b/board/nuwani/led.c @@ -4,9 +4,9 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" #include "gpio.h" +#include "led_common.h" +#include "led_onoff_states.h" #define LED_OFF_LVL 1 #define LED_ON_LVL 0 diff --git a/board/oak/board.c b/board/oak/board.c index 17908caa7a..f53d61cd9d 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -72,6 +72,7 @@ void usb_evt(enum gpio_signal signal) } #endif /* BOARD_REV >= OAK_REV4 */ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* power signal list. Must match order of enum power_signal. */ diff --git a/board/oak/led.c b/board/oak/led.c index 64f5123b3c..cbf951dec5 100644 --- a/board/oak/led.c +++ b/board/oak/led.c @@ -11,8 +11,8 @@ #include "gpio.h" #include "hooks.h" #include "led_common.h" -#include "util.h" #include "system.h" +#include "util.h" const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; diff --git a/board/oak/usb_pd_policy.c b/board/oak/usb_pd_policy.c index c337aa4b59..2419927c17 100644 --- a/board/oak/usb_pd_policy.c +++ b/board/oak/usb_pd_policy.c @@ -14,9 +14,9 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/osiris/board.c b/board/osiris/board.c index 6cfd7d8c26..20c1ae0993 100644 --- a/board/osiris/board.c +++ b/board/osiris/board.c @@ -10,20 +10,20 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" #include "hooks.h" -#include "fw_config.h" -#include "hooks.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/osiris/charger.c b/board/osiris/charger.c index 7a16fcd5cb..c6ee062ab5 100644 --- a/board/osiris/charger.c +++ b/board/osiris/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/isl9241.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/osiris/fans.c b/board/osiris/fans.c index 5878d4c4c5..af7bc1e17f 100644 --- a/board/osiris/fans.c +++ b/board/osiris/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" #include "util.h" diff --git a/board/osiris/led.c b/board/osiris/led.c index 993c2969d4..f06cc17f8f 100644 --- a/board/osiris/led.c +++ b/board/osiris/led.c @@ -4,11 +4,11 @@ * Power and battery LED control for osiris */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/osiris/pwm.c b/board/osiris/pwm.c index eb178750e9..cc093a208f 100644 --- a/board/osiris/pwm.c +++ b/board/osiris/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/osiris/sensors.c b/board/osiris/sensors.c index 9ad528c069..4232a1a3fa 100644 --- a/board/osiris/sensors.c +++ b/board/osiris/sensors.c @@ -3,15 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc.h" +#include "common.h" #include "gpio.h" #include "hooks.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/osiris/usbc_config.c b/board/osiris/usbc_config.c index d116e080ad..3f5e5adb91 100644 --- a/board/osiris/usbc_config.c +++ b/board/osiris/usbc_config.c @@ -3,12 +3,9 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "cbi.h" -#include "charger.h" #include "charge_ramp.h" +#include "charger.h" #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -25,12 +22,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/palkia/board.c b/board/palkia/board.c index e0aab014a0..342d3e05e9 100644 --- a/board/palkia/board.c +++ b/board/palkia/board.c @@ -31,8 +31,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -114,7 +114,8 @@ static void board_lid_interrupt(enum gpio_signal signal) lid_interrupt(signal); } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/palkia/keyboard_customization.c b/board/palkia/keyboard_customization.c index da69078c35..d436513b93 100644 --- a/board/palkia/keyboard_customization.c +++ b/board/palkia/keyboard_customization.c @@ -5,9 +5,9 @@ #include "common.h" #include "gpio.h" -#include "keyboard_customization.h" #include "keyboard_8042_sharedlib.h" #include "keyboard_config.h" +#include "keyboard_customization.h" #include "keyboard_protocol.h" #include "keyboard_raw.h" diff --git a/board/palkia/led.c b/board/palkia/led.c index f5242a04c0..a8ac1bcb44 100644 --- a/board/palkia/led.c +++ b/board/palkia/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Palkia */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/panqueque/board.c b/board/panqueque/board.c index 786fe5f5aa..42df0896cb 100644 --- a/board/panqueque/board.c +++ b/board/panqueque/board.c @@ -21,11 +21,11 @@ #include "usb_descriptor.h" #include "usb_mux.h" #include "usb_pd.h" -#include "usbc_ppc.h" #include "usb_pd_dp_ufp.h" #include "usb_pe_sm.h" #include "usb_prl_sm.h" #include "usb_tc_sm.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) @@ -76,7 +76,8 @@ static void board_usbc_usb3_interrupt(enum gpio_signal signal) } #endif /* SECTION_IS_RW */ -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* * Table GPIO signals control both power rails and reset lines to various chips diff --git a/board/pazquel/board.c b/board/pazquel/board.c index 1efad2255f..7502d18b4d 100644 --- a/board/pazquel/board.c +++ b/board/pazquel/board.c @@ -9,14 +9,14 @@ #include "button.h" #include "charge_manager.h" #include "charge_state.h" -#include "extpower.h" -#include "driver/accel_kionix.h" #include "driver/accel_bma2x2.h" -#include "driver/accelgyro_bmi_common.h" +#include "driver/accel_kionix.h" #include "driver/accelgyro_bmi323.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_scan.h" @@ -27,9 +27,9 @@ #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_ocp.h" @@ -46,6 +46,7 @@ static void usba_oc_interrupt(enum gpio_signal signal); static void ppc_interrupt(enum gpio_signal signal); static void board_connect_c0_sbu(enum gpio_signal s); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* GPIO Interrupt Handlers */ diff --git a/board/pazquel/usbc_config.c b/board/pazquel/usbc_config.c index 5d30adb6e2..28f6b7a1c9 100644 --- a/board/pazquel/usbc_config.c +++ b/board/pazquel/usbc_config.c @@ -5,9 +5,9 @@ /* Trogdor family-specific USB-C configuration */ +#include "charge_state.h" #include "charger.h" #include "charger/isl923x_public.h" -#include "charge_state.h" #include "console.h" #include "usb_pd.h" diff --git a/board/pdeval-stm32f072/board.c b/board/pdeval-stm32f072/board.c index e1e75bcea7..f170319cc6 100644 --- a/board/pdeval-stm32f072/board.c +++ b/board/pdeval-stm32f072/board.c @@ -4,8 +4,8 @@ */ /* STM32F072-discovery board based USB PD evaluation configuration */ -#include "common.h" #include "anx7447.h" +#include "common.h" #include "ec_version.h" #include "gpio.h" #include "hooks.h" @@ -27,6 +27,7 @@ void alert_event(enum gpio_signal signal) host_command_pd_send_status(PD_CHARGE_NO_CHANGE); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" const void *const usb_strings[] = { diff --git a/board/pdeval-stm32f072/usb_pd_policy.c b/board/pdeval-stm32f072/usb_pd_policy.c index 9ea36a1b0d..965cee0dc0 100644 --- a/board/pdeval-stm32f072/usb_pd_policy.c +++ b/board/pdeval-stm32f072/usb_pd_policy.c @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#include "common.h" #include "anx7447.h" +#include "common.h" #include "console.h" #include "gpio.h" #include "hooks.h" @@ -12,10 +12,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_pdo.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/phaser/board.c b/board/phaser/board.c index 6ebaab0b4a..803cb18dd2 100644 --- a/board/phaser/board.c +++ b/board/phaser/board.c @@ -6,6 +6,7 @@ /* Phaser board-specific configuration */ #include "adc.h" +#include "battery_smart.h" #include "builtin/stdnoreturn.h" #include "button.h" #include "charge_state.h" @@ -26,14 +27,13 @@ #include "power_button.h" #include "switch.h" #include "system_chip.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "tcpm/tcpci.h" #include "temp_sensor.h" #include "temp_sensor/thermistor.h" #include "usbc_ppc.h" #include "util.h" -#include "battery_smart.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTFUSB(format, args...) cprintf(CC_USBCHARGE, format, ##args) diff --git a/board/phaser/led.c b/board/phaser/led.c index 998b948804..16f68b28f9 100644 --- a/board/phaser/led.c +++ b/board/phaser/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Phaser */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/pico/board.c b/board/pico/board.c index 801c344a69..541feffd18 100644 --- a/board/pico/board.c +++ b/board/pico/board.c @@ -47,6 +47,7 @@ #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #ifndef VARIANT_KUKUI_NO_SENSORS diff --git a/board/pirika/board.c b/board/pirika/board.c index ae1c74bdfc..f153da2ce7 100644 --- a/board/pirika/board.c +++ b/board/pirika/board.c @@ -16,8 +16,8 @@ #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" #include "driver/retimer/tusb544.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/raa489000.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/plankton/board.c b/board/plankton/board.c index 2bf57084ce..160192e7ff 100644 --- a/board/plankton/board.c +++ b/board/plankton/board.c @@ -22,6 +22,7 @@ void button_event(enum gpio_signal signal); void hpd_event(enum gpio_signal signal); void vbus_event(enum gpio_signal signal); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" static volatile uint64_t hpd_prev_ts; diff --git a/board/plankton/usb_pd_policy.c b/board/plankton/usb_pd_policy.c index 355919e06a..622489c744 100644 --- a/board/plankton/usb_pd_policy.c +++ b/board/plankton/usb_pd_policy.c @@ -13,10 +13,10 @@ #include "registers.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_pd.h" #include "usb_pd_pdo.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/polyberry/board.c b/board/polyberry/board.c index f9fdd44ff8..52d27e5a37 100644 --- a/board/polyberry/board.c +++ b/board/polyberry/board.c @@ -8,17 +8,19 @@ #include "dma.h" #include "ec_version.h" #include "gpio.h" -#include "gpio_list.h" #include "hooks.h" #include "registers.h" #include "stm32-dma.h" #include "task.h" #include "update_fw.h" #include "usb_descriptor.h" -#include "util.h" #include "usb_dwc_console.h" #include "usb_dwc_update.h" #include "usb_hw.h" +#include "util.h" + +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /****************************************************************************** * Define the strings used in our USB descriptors. diff --git a/board/pompom/board.c b/board/pompom/board.c index ccaff4f55f..9f0b9e484a 100644 --- a/board/pompom/board.c +++ b/board/pompom/board.c @@ -9,13 +9,13 @@ #include "button.h" #include "charge_manager.h" #include "charge_state.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_bmi_common.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_scan.h" @@ -26,9 +26,9 @@ #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_ocp.h" @@ -44,6 +44,7 @@ static void usba_oc_interrupt(enum gpio_signal signal); static void ppc_interrupt(enum gpio_signal signal); static void board_connect_c0_sbu(enum gpio_signal s); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* GPIO Interrupt Handlers */ diff --git a/board/pompom/usbc_config.c b/board/pompom/usbc_config.c index 5d30adb6e2..28f6b7a1c9 100644 --- a/board/pompom/usbc_config.c +++ b/board/pompom/usbc_config.c @@ -5,9 +5,9 @@ /* Trogdor family-specific USB-C configuration */ +#include "charge_state.h" #include "charger.h" #include "charger/isl923x_public.h" -#include "charge_state.h" #include "console.h" #include "usb_pd.h" diff --git a/board/poppy/board.c b/board/poppy/board.c index ab3f3b40b0..a757515aa4 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -11,8 +11,8 @@ #include "board_config.h" #include "button.h" #include "charge_manager.h" -#include "charge_state.h" #include "charge_ramp.h" +#include "charge_state.h" #include "charger.h" #include "chipset.h" #include "console.h" @@ -25,6 +25,7 @@ #include "driver/tcpm/tcpci.h" #include "driver/tcpm/tcpm.h" #include "driver/temp_sensor/bd99992gw.h" +#include "espi.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -51,7 +52,6 @@ #include "usb_pd.h" #include "usb_pd_tcpm.h" #include "util.h" -#include "espi.h" #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) @@ -140,6 +140,7 @@ void anx74xx_cable_det_interrupt(enum gpio_signal signal) } #endif +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Hibernate wake configuration */ diff --git a/board/poppy/usb_pd_policy.c b/board/poppy/usb_pd_policy.c index ec2ea00076..96e13aa73b 100644 --- a/board/poppy/usb_pd_policy.c +++ b/board/poppy/usb_pd_policy.c @@ -4,12 +4,12 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "common.h" #include "console.h" #include "driver/tcpm/anx74xx.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -17,10 +17,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/primus/board.c b/board/primus/board.c index 3f438cee00..2a8ff39ac7 100644 --- a/board/primus/board.c +++ b/board/primus/board.c @@ -5,11 +5,11 @@ #include "battery.h" #include "button.h" +#include "charge_manager.h" #include "charge_ramp.h" +#include "charge_state_v2.h" #include "charger.h" #include "common.h" -#include "charge_manager.h" -#include "charge_state_v2.h" #include "compile_time_macros.h" #include "console.h" #include "fw_config.h" @@ -18,8 +18,8 @@ #include "hooks.h" #include "keyboard_8042_sharedlib.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "pwm.h" #include "registers.h" #include "switch.h" @@ -27,7 +27,8 @@ #include "usbc_config.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/primus/charger.c b/board/primus/charger.c index 7fabd2082e..4976abdea6 100644 --- a/board/primus/charger.c +++ b/board/primus/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/bq25710.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/primus/fans.c b/board/primus/fans.c index b3c72c074b..b109fcf5da 100644 --- a/board/primus/fans.c +++ b/board/primus/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/primus/i2c.c b/board/primus/i2c.c index 21939347b1..02892af19d 100644 --- a/board/primus/i2c.c +++ b/board/primus/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/primus/led.c b/board/primus/led.c index 70c1c89188..269b497c4b 100644 --- a/board/primus/led.c +++ b/board/primus/led.c @@ -5,15 +5,12 @@ /* Primus specific PWM LED settings. */ -#include <stdint.h> - -#include "common.h" -#include "compile_time_macros.h" #include "battery.h" #include "charge_manager.h" #include "charge_state.h" #include "chipset.h" #include "common.h" +#include "compile_time_macros.h" #include "console.h" #include "ec_commands.h" #include "extpower.h" @@ -24,6 +21,8 @@ #include "task.h" #include "timer.h" #include "util.h" + +#include <stdint.h> #define CPRINTS(format, args...) cprints(CC_LOGOLED, format, ##args) #define LED_ON_LVL 100 diff --git a/board/primus/ps2.c b/board/primus/ps2.c index 2a0a764d5e..685c036fc2 100644 --- a/board/primus/ps2.c +++ b/board/primus/ps2.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stddef.h> -#include <string.h> - #include "cbi_ssfc.h" #include "gpio.h" #include "hooks.h" @@ -15,6 +12,9 @@ #include "registers.h" #include "time.h" +#include <stddef.h> +#include <string.h> + #define PS2_TRANSMIT_DELAY_MS 10 static uint8_t queue_data[3]; diff --git a/board/primus/sensors.c b/board/primus/sensors.c index 9c0a9d69e8..67ec6c6310 100644 --- a/board/primus/sensors.c +++ b/board/primus/sensors.c @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc_chip.h" +#include "common.h" #include "hooks.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/primus/usbc_config.c b/board/primus/usbc_config.c index a11a8d588f..aca27e9c8e 100644 --- a/board/primus/usbc_config.c +++ b/board/primus/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -24,12 +21,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/prism/board.c b/board/prism/board.c index 1c7778f72f..efdc4f5cd1 100644 --- a/board/prism/board.c +++ b/board/prism/board.c @@ -3,8 +3,6 @@ * found in the LICENSE file. */ -#include <stdbool.h> - #include "clock.h" #include "common.h" #include "ec_commands.h" @@ -23,12 +21,15 @@ #include "timer.h" #include "update_fw.h" #include "usart-stm32f0.h" -#include "usart_tx_dma.h" #include "usart_rx_dma.h" +#include "usart_tx_dma.h" #include "usb_api.h" #include "usb_descriptor.h" #include "util.h" +#include <stdbool.h> + +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #ifdef SECTION_IS_RW diff --git a/board/puff/board.c b/board/puff/board.c index 5475773aa0..ce2a59d8cb 100644 --- a/board/puff/board.c +++ b/board/puff/board.c @@ -36,8 +36,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_common.h" @@ -237,7 +237,8 @@ static void adp_state_init(void) } DECLARE_HOOK(HOOK_INIT, adp_state_init, HOOK_PRIO_INIT_CHARGE_MANAGER + 1); -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/quackingstick/base_detect.c b/board/quackingstick/base_detect.c index 620381f09b..f3045897d6 100644 --- a/board/quackingstick/base_detect.c +++ b/board/quackingstick/base_detect.c @@ -6,8 +6,8 @@ /* Coachz base detection code */ #include "adc.h" -#include "board.h" #include "base_state.h" +#include "board.h" #include "chipset.h" #include "common.h" #include "console.h" diff --git a/board/quackingstick/board.c b/board/quackingstick/board.c index 7002a62e03..2cb1ac37e5 100644 --- a/board/quackingstick/board.c +++ b/board/quackingstick/board.c @@ -10,14 +10,14 @@ #include "charge_manager.h" #include "charge_state.h" #include "common.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "lid_switch.h" @@ -30,9 +30,9 @@ #include "pwm.h" #include "pwm_chip.h" #include "queue.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "temp_sensor.h" @@ -51,6 +51,7 @@ static void usb0_evt(enum gpio_signal signal); static void ppc_interrupt(enum gpio_signal signal); static void board_connect_c0_sbu(enum gpio_signal s); +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* GPIO Interrupt Handlers */ diff --git a/board/quackingstick/led.c b/board/quackingstick/led.c index a18124f2be..ef3a858e2b 100644 --- a/board/quackingstick/led.c +++ b/board/quackingstick/led.c @@ -10,13 +10,13 @@ #include "charge_state.h" #include "chipset.h" #include "ec_commands.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" #include "led_common.h" #include "system.h" #include "util.h" -#include "extpower.h" #define LED_ONE_SEC (1000 / HOOK_TICK_INTERVAL_MS) /* Battery LED blinks every per 400ms */ diff --git a/board/quackingstick/usbc_config.c b/board/quackingstick/usbc_config.c index 8107e2c286..073c394de2 100644 --- a/board/quackingstick/usbc_config.c +++ b/board/quackingstick/usbc_config.c @@ -5,9 +5,9 @@ /* Trogdor family-specific USB-C configuration */ +#include "charge_state.h" #include "charger.h" #include "charger/isl923x_public.h" -#include "charge_state.h" #include "console.h" #include "temp_sensor.h" #include "usb_pd.h" diff --git a/board/quiche/board.c b/board/quiche/board.c index 454cd2ce6a..afe177efe8 100644 --- a/board/quiche/board.c +++ b/board/quiche/board.c @@ -22,11 +22,11 @@ #include "usb_descriptor.h" #include "usb_mux.h" #include "usb_pd.h" -#include "usbc_ppc.h" #include "usb_pd_dp_ufp.h" #include "usb_pe_sm.h" #include "usb_prl_sm.h" #include "usb_tc_sm.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) @@ -96,7 +96,8 @@ static void board_usbc_usb3_interrupt(enum gpio_signal signal) } #endif /* SECTION_IS_RW */ -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* * Table GPIO signals control both power rails and reset lines to various chips diff --git a/board/rainier/board.c b/board/rainier/board.c index 05142a3936..1844688947 100644 --- a/board/rainier/board.c +++ b/board/rainier/board.c @@ -6,16 +6,16 @@ #include "adc.h" #include "backlight.h" #include "button.h" -#include "chipset.h" #include "charge_manager.h" #include "charge_state.h" +#include "chipset.h" #include "common.h" #include "console.h" -#include "ec_commands.h" #include "driver/accelgyro_bmi_common.h" #include "driver/baro_bmp280.h" #include "driver/tcpm/fusb302.h" #include "driver/temp_sensor/tmp432.h" +#include "ec_commands.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -33,8 +33,8 @@ #include "tcpm/tcpm.h" #include "temp_sensor.h" #include "temp_sensor_chip.h" -#include "timer.h" #include "thermal.h" +#include "timer.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd_tcpm.h" @@ -60,6 +60,7 @@ static void warm_reset_request_interrupt(enum gpio_signal signal) chipset_reset(CHIPSET_RESET_AP_REQ); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/rainier/usb_pd_policy.c b/board/rainier/usb_pd_policy.c index 45a51015a6..b6c78d5e95 100644 --- a/board/rainier/usb_pd_policy.c +++ b/board/rainier/usb_pd_policy.c @@ -13,10 +13,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/rammus/board.c b/board/rammus/board.c index e4abed4afb..86bd039102 100644 --- a/board/rammus/board.c +++ b/board/rammus/board.c @@ -12,23 +12,24 @@ #include "button.h" #include "cbi_ssfc.h" #include "charge_manager.h" -#include "charge_state.h" #include "charge_ramp.h" +#include "charge_state.h" #include "charger.h" #include "chipset.h" #include "console.h" #include "cros_board_info.h" -#include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" -#include "driver/accelgyro_icm426xx.h" #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/accelgyro_bmi_common.h" +#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/charger/isl923x.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" #include "driver/tcpm/tcpm.h" #include "driver/temp_sensor/bd99992gw.h" +#include "espi.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -58,7 +59,6 @@ #include "usb_pd.h" #include "usb_pd_tcpm.h" #include "util.h" -#include "espi.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) #define CPRINTF(format, args...) cprintf(CC_SYSTEM, format, ##args) @@ -118,6 +118,7 @@ void usb1_evt(enum gpio_signal signal) usb_charger_task_set_event(1, USB_CHG_EVENT_BC12); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Hibernate wake configuration */ diff --git a/board/rammus/usb_pd_policy.c b/board/rammus/usb_pd_policy.c index 6242625d26..f048fc5738 100644 --- a/board/rammus/usb_pd_policy.c +++ b/board/rammus/usb_pd_policy.c @@ -4,11 +4,11 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "common.h" #include "console.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -16,10 +16,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/redrix/board.c b/board/redrix/board.c index 2e70f50be3..7f4a7f61b3 100644 --- a/board/redrix/board.c +++ b/board/redrix/board.c @@ -11,24 +11,24 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "gpio.h" -#include "gpio_signal.h" -#include "hooks.h" #include "driver/accelgyro_lsm6dsm.h" #include "driver/als_tcs3400.h" #include "fw_config.h" +#include "gpio.h" +#include "gpio_signal.h" #include "hooks.h" #include "lid_switch.h" #include "peripheral_charger.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/redrix/charger.c b/board/redrix/charger.c index 7fabd2082e..4976abdea6 100644 --- a/board/redrix/charger.c +++ b/board/redrix/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/bq25710.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/redrix/fans.c b/board/redrix/fans.c index 9adf3cabce..905e5b8ad7 100644 --- a/board/redrix/fans.c +++ b/board/redrix/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/redrix/i2c.c b/board/redrix/i2c.c index fc2f5d9454..c1a0c31b40 100644 --- a/board/redrix/i2c.c +++ b/board/redrix/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/redrix/led.c b/board/redrix/led.c index c8654b3589..0eae346948 100644 --- a/board/redrix/led.c +++ b/board/redrix/led.c @@ -5,8 +5,6 @@ * Power and battery LED control for Redrix */ -#include <stdint.h> - #include "battery.h" #include "charge_manager.h" #include "charge_state.h" @@ -17,6 +15,8 @@ #include "led_common.h" #include "task.h" +#include <stdint.h> + #define BAT_LED_ON 0 #define BAT_LED_OFF 1 diff --git a/board/redrix/pwm.c b/board/redrix/pwm.c index dac3991526..12f8d7ed9f 100644 --- a/board/redrix/pwm.c +++ b/board/redrix/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/redrix/sensors.c b/board/redrix/sensors.c index db645e5942..fa7a9ea670 100644 --- a/board/redrix/sensors.c +++ b/board/redrix/sensors.c @@ -3,10 +3,10 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc_chip.h" #include "cbi_ssfc.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accel_bma422.h" #include "driver/accelgyro_lsm6dsm.h" @@ -15,8 +15,8 @@ #include "hooks.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/redrix/usbc_config.c b/board/redrix/usbc_config.c index 9c051a4d53..70e9a7dfd4 100644 --- a/board/redrix/usbc_config.c +++ b/board/redrix/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -24,12 +21,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/reef/board.c b/board/reef/board.c index ad92334c2b..71dadb6507 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -13,10 +13,10 @@ #include "charger.h" #include "chipset.h" #include "console.h" -#include "driver/als_opt3001.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" #include "driver/accelgyro_bmi_common.h" +#include "driver/als_opt3001.h" #include "driver/baro_bmp280.h" #include "driver/charger/bd9995x.h" #include "driver/tcpm/anx74xx.h" @@ -32,8 +32,8 @@ #include "lid_angle.h" #include "lid_switch.h" #include "math_util.h" -#include "motion_sense.h" #include "motion_lid.h" +#include "motion_sense.h" #include "panic.h" #include "power.h" #include "power_button.h" @@ -122,6 +122,7 @@ void tablet_mode_interrupt(enum gpio_signal signal) hook_call_deferred(&enable_input_devices_data, LID_DEBOUNCE_US); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/reef/usb_pd_policy.c b/board/reef/usb_pd_policy.c index e21d4984c1..5990dd9e75 100644 --- a/board/reef/usb_pd_policy.c +++ b/board/reef/usb_pd_policy.c @@ -4,13 +4,13 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "common.h" #include "console.h" #include "driver/charger/bd9995x.h" #include "driver/tcpm/anx74xx.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -18,10 +18,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/reef_it8320/board.c b/board/reef_it8320/board.c index 1e222a4ed4..5901c1a821 100644 --- a/board/reef_it8320/board.c +++ b/board/reef_it8320/board.c @@ -27,8 +27,8 @@ #include "lid_angle.h" #include "lid_switch.h" #include "math_util.h" -#include "motion_sense.h" #include "motion_lid.h" +#include "motion_sense.h" #include "panic.h" #include "power.h" #include "power_button.h" @@ -56,6 +56,7 @@ #define IN_PGOOD_PP3300 POWER_SIGNAL_MASK(X86_PGOOD_PP3300) #define IN_PGOOD_PP5000 POWER_SIGNAL_MASK(X86_PGOOD_PP5000) +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" const struct adc_t adc_channels[] = { diff --git a/board/reef_it8320/usb_pd_policy.c b/board/reef_it8320/usb_pd_policy.c index ce909520a2..bf29197906 100644 --- a/board/reef_it8320/usb_pd_policy.c +++ b/board/reef_it8320/usb_pd_policy.c @@ -4,13 +4,13 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "common.h" #include "console.h" #include "driver/charger/bd9995x.h" #include "driver/tcpm/anx74xx.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -18,10 +18,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/reef_mchp/battery.c b/board/reef_mchp/battery.c index d18caec5d0..d4a8aa7546 100644 --- a/board/reef_mchp/battery.c +++ b/board/reef_mchp/battery.c @@ -18,8 +18,8 @@ #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "util.h" #include "tfdp_chip.h" +#include "util.h" #define CPUTS(outstr) cputs(CC_CHARGER, outstr) #define CPRINTS(format, args...) cprints(CC_CHARGER, format, ##args) diff --git a/board/reef_mchp/board.c b/board/reef_mchp/board.c index c50a4feb8a..70b75d4b72 100644 --- a/board/reef_mchp/board.c +++ b/board/reef_mchp/board.c @@ -14,10 +14,10 @@ #include "charger.h" #include "chipset.h" #include "console.h" -#include "driver/als_opt3001.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" #include "driver/accelgyro_bmi_common.h" +#include "driver/als_opt3001.h" #include "driver/baro_bmp280.h" #include "driver/charger/bd9995x.h" #include "driver/tcpm/anx74xx.h" @@ -32,15 +32,15 @@ #include "keyboard_scan.h" #include "lid_angle.h" #include "lid_switch.h" +#include "lpc_chip.h" #include "math_util.h" -#include "motion_sense.h" #include "motion_lid.h" +#include "motion_sense.h" #include "panic.h" #include "power.h" #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" -#include "lpc_chip.h" #include "spi.h" #include "spi_chip.h" #include "switch.h" @@ -48,8 +48,8 @@ #include "tablet_mode.h" #include "task.h" #include "temp_sensor.h" -#include "tfdp_chip.h" #include "temp_sensor/thermistor.h" +#include "tfdp_chip.h" #include "timer.h" #include "uart.h" #include "usb_charge.h" @@ -157,6 +157,7 @@ void tablet_mode_interrupt(enum gpio_signal signal) hook_call_deferred(&enable_input_devices_data, LID_DEBOUNCE_US); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* SPI devices */ diff --git a/board/reef_mchp/usb_pd_policy.c b/board/reef_mchp/usb_pd_policy.c index 478f760989..060d53a58a 100644 --- a/board/reef_mchp/usb_pd_policy.c +++ b/board/reef_mchp/usb_pd_policy.c @@ -4,26 +4,25 @@ */ #include "atomic.h" -#include "extpower.h" #include "charge_manager.h" #include "common.h" #include "console.h" #include "driver/charger/bd9995x.h" #include "driver/tcpm/anx74xx.h" #include "driver/tcpm/ps8xxx.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" #include "registers.h" #include "system.h" #include "task.h" +#include "tfdp_chip.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" - -#include "tfdp_chip.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/sasuke/board.c b/board/sasuke/board.c index e6767d8126..bc96165f4d 100644 --- a/board/sasuke/board.c +++ b/board/sasuke/board.c @@ -125,6 +125,7 @@ static void sub_hdmi_hpd_interrupt(enum gpio_signal s) gpio_set_level(GPIO_EC_AP_USB_C1_HDMI_HPD, !hdmi_hpd_odl); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/sasukette/board.c b/board/sasukette/board.c index f6786c1441..f5076382e6 100644 --- a/board/sasukette/board.c +++ b/board/sasukette/board.c @@ -8,16 +8,15 @@ #include "adc_chip.h" #include "button.h" #include "cbi_fw_config.h" -#include "cros_board_info.h" #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" -#include "math_util.h" +#include "cros_board_info.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" #include "driver/retimer/tusb544.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/raa489000.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" @@ -25,6 +24,7 @@ #include "keyboard_raw.h" #include "keyboard_scan.h" #include "lid_switch.h" +#include "math_util.h" #include "power.h" #include "power_button.h" #include "pwm.h" diff --git a/board/scarlet/board.c b/board/scarlet/board.c index 66017e172d..9c26757ba0 100644 --- a/board/scarlet/board.c +++ b/board/scarlet/board.c @@ -13,12 +13,12 @@ #include "chipset.h" #include "common.h" #include "console.h" -#include "ec_commands.h" #include "driver/accelgyro_bmi_common.h" #include "driver/charger/rt946x.h" #include "driver/sync.h" #include "driver/tcpm/fusb302.h" #include "driver/temp_sensor/tmp432.h" +#include "ec_commands.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -37,8 +37,8 @@ #include "tcpm/tcpm.h" #include "temp_sensor.h" #include "temp_sensor_chip.h" -#include "timer.h" #include "thermal.h" +#include "timer.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd_tcpm.h" @@ -64,6 +64,7 @@ static void warm_reset_request_interrupt(enum gpio_signal signal) chipset_reset(CHIPSET_RESET_AP_REQ); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/scarlet/usb_pd_policy.c b/board/scarlet/usb_pd_policy.c index 919e7a8864..90c7dfb157 100644 --- a/board/scarlet/usb_pd_policy.c +++ b/board/scarlet/usb_pd_policy.c @@ -4,8 +4,8 @@ */ #include "atomic.h" -#include "charger.h" #include "charge_manager.h" +#include "charger.h" #include "common.h" #include "console.h" #include "driver/charger/rt946x.h" @@ -16,10 +16,10 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/scout/board.c b/board/scout/board.c index 2c391ecd32..5a4c84cba5 100644 --- a/board/scout/board.c +++ b/board/scout/board.c @@ -31,8 +31,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_common.h" #include "util.h" @@ -208,7 +208,8 @@ static void port_ocp_interrupt(enum gpio_signal signal) /******************************************************************************/ -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/servo_micro/board.c b/board/servo_micro/board.c index b51c522277..5f0786cf45 100644 --- a/board/servo_micro/board.c +++ b/board/servo_micro/board.c @@ -19,14 +19,15 @@ #include "timer.h" #include "update_fw.h" #include "usart-stm32f0.h" -#include "usart_tx_dma.h" #include "usart_rx_dma.h" +#include "usart_tx_dma.h" +#include "usb-stream.h" #include "usb_hw.h" #include "usb_i2c.h" #include "usb_spi.h" -#include "usb-stream.h" #include "util.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" void board_config_pre_init(void) diff --git a/board/servo_v4/board.c b/board/servo_v4/board.c index 5320d7fd1c..6cb6cf5df9 100644 --- a/board/servo_v4/board.c +++ b/board/servo_v4/board.c @@ -23,14 +23,14 @@ #include "timer.h" #include "update_fw.h" #include "usart-stm32f0.h" -#include "usart_tx_dma.h" #include "usart_rx_dma.h" +#include "usart_tx_dma.h" +#include "usb-stream.h" #include "usb_gpio.h" #include "usb_i2c.h" #include "usb_pd.h" #include "usb_pd_config.h" #include "usb_spi.h" -#include "usb-stream.h" #include "util.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) @@ -131,6 +131,7 @@ void hpd_evt(enum gpio_signal signal) hpd_prev_level = level; } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /****************************************************************************** diff --git a/board/servo_v4/usb_pd_config.h b/board/servo_v4/usb_pd_config.h index 8437af3118..d47e8e8868 100644 --- a/board/servo_v4/usb_pd_config.h +++ b/board/servo_v4/usb_pd_config.h @@ -6,8 +6,8 @@ #include "adc.h" #include "chip/stm32/registers.h" #include "console.h" -#include "gpio.h" #include "ec_commands.h" +#include "gpio.h" #include "usb_pd_tcpm.h" /* USB Power delivery board configuration */ diff --git a/board/servo_v4/usb_pd_policy.c b/board/servo_v4/usb_pd_policy.c index e3eba6104a..68eb59ff97 100644 --- a/board/servo_v4/usb_pd_policy.c +++ b/board/servo_v4/usb_pd_policy.c @@ -20,13 +20,13 @@ #include "task.h" #include "tcpm/tcpm.h" #include "timer.h" -#include "util.h" #include "usb_common.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_config.h" #include "usb_pd_pdo.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/servo_v4p1/board.c b/board/servo_v4p1/board.c index c3caa1eff1..a167db306d 100644 --- a/board/servo_v4p1/board.c +++ b/board/servo_v4p1/board.c @@ -10,7 +10,6 @@ #include "common.h" #include "console.h" #include "dacs.h" -#include <driver/gl3590.h> #include "driver/ioexpander/tca64xxa.h" #include "ec_version.h" #include "fusb302b.h" @@ -30,16 +29,18 @@ #include "tusb1064.h" #include "update_fw.h" #include "usart-stm32f0.h" -#include "usart_tx_dma.h" #include "usart_rx_dma.h" +#include "usart_tx_dma.h" +#include "usb-stream.h" #include "usb_gpio.h" #include "usb_i2c.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_spi.h" -#include "usb-stream.h" #include "util.h" +#include <driver/gl3590.h> + #ifdef SECTION_IS_RO #define CROS_EC_SECTION "RO" #else @@ -235,6 +236,7 @@ void ext_hpd_detection_enable(int enable) } #endif /* SECTION_IS_RO */ +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) diff --git a/board/servo_v4p1/fusb302b.c b/board/servo_v4p1/fusb302b.c index e8fdbde68b..49959f1d65 100644 --- a/board/servo_v4p1/fusb302b.c +++ b/board/servo_v4p1/fusb302b.c @@ -3,15 +3,15 @@ * found in the LICENSE file. */ -#include "i2c.h" #include "fusb302b.h" #include "gpio.h" #include "hooks.h" +#include "i2c.h" #include "ioexpanders.h" -#include "util.h" #include "task.h" #include "time.h" #include "usb_pd.h" +#include "util.h" static int port; static int status0; diff --git a/board/servo_v4p1/usb_pd_config.h b/board/servo_v4p1/usb_pd_config.h index e65ed3cd62..32ec29341a 100644 --- a/board/servo_v4p1/usb_pd_config.h +++ b/board/servo_v4p1/usb_pd_config.h @@ -6,8 +6,8 @@ #include "adc.h" #include "chip/stm32/registers.h" #include "console.h" -#include "gpio.h" #include "ec_commands.h" +#include "gpio.h" #include "usb_pd_tcpm.h" /* USB Power delivery board configuration */ diff --git a/board/servo_v4p1/usb_pd_policy.c b/board/servo_v4p1/usb_pd_policy.c index fc79bf84da..b672f07782 100644 --- a/board/servo_v4p1/usb_pd_policy.c +++ b/board/servo_v4p1/usb_pd_policy.c @@ -4,8 +4,8 @@ */ #include "atomic.h" -#include "chg_control.h" #include "charge_manager.h" +#include "chg_control.h" #include "common.h" #include "console.h" #include "gpio.h" @@ -19,12 +19,12 @@ #include "task.h" #include "tcpm/tcpm.h" #include "timer.h" -#include "util.h" #include "usb_common.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_config.h" #include "usb_pd_tcpm.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/shotzo/board.c b/board/shotzo/board.c index 5d96e164cf..ca90a54301 100644 --- a/board/shotzo/board.c +++ b/board/shotzo/board.c @@ -14,9 +14,9 @@ #include "cros_board_info.h" #include "driver/charger/sm5803.h" #include "driver/led/oz554.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/it83xx_pd.h" #include "driver/tcpm/ps8xxx.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/shuboz/board.c b/board/shuboz/board.c index 41d985df7c..81c0ebe01b 100644 --- a/board/shuboz/board.c +++ b/board/shuboz/board.c @@ -7,11 +7,11 @@ #include "button.h" #include "cbi_ssfc.h" #include "cros_board_info.h" -#include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" -#include "driver/accelgyro_icm426xx.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/accelgyro_bmi_common.h" +#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/bc12/pi3usb9201.h" #include "driver/ppc/aoz1380_public.h" #include "driver/ppc/nx20p348x.h" @@ -45,6 +45,7 @@ /* This I2C moved. Temporarily detect and support the V0 HW. */ int I2C_PORT_BATTERY = I2C_PORT_BATTERY_V1; +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Motion sensors */ diff --git a/board/shuboz/board.h b/board/shuboz/board.h index ada5b1499d..64e54fc7a2 100644 --- a/board/shuboz/board.h +++ b/board/shuboz/board.h @@ -10,9 +10,10 @@ #define VARIANT_ZORK_DALBOZ -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #define CONFIG_USBC_PPC_NX20P3483 #define CONFIG_USB_MUX_PS8740 #define CONFIG_USB_MUX_PS8743 diff --git a/board/spherion/battery.c b/board/spherion/battery.c index 83361bd9fc..b103a58d56 100644 --- a/board/spherion/battery.c +++ b/board/spherion/battery.c @@ -4,8 +4,8 @@ */ #include "battery.h" -#include "battery_smart.h" #include "battery_fuel_gauge.h" +#include "battery_smart.h" #include "charge_state.h" #include "chipset.h" #include "gpio.h" diff --git a/board/spherion/led.c b/board/spherion/led.c index 54f073b8cb..19ade3499e 100644 --- a/board/spherion/led.c +++ b/board/spherion/led.c @@ -5,12 +5,12 @@ * Battery LED control for Spherion */ +#include "chipset.h" +#include "driver/bc12/mt6360.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" -#include "driver/bc12/mt6360.h" __override const int led_charge_lvl_1 = 5; __override const int led_charge_lvl_2 = 95; diff --git a/board/stern/board.c b/board/stern/board.c index a6d488aaf6..15bc9e684a 100644 --- a/board/stern/board.c +++ b/board/stern/board.c @@ -55,6 +55,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/stern/led.c b/board/stern/led.c index 8a5f9d26d8..7f4ecb6ace 100644 --- a/board/stern/led.c +++ b/board/stern/led.c @@ -5,9 +5,9 @@ * Power and battery LED control for Damu */ #include "common.h" -#include "ioexpander.h" #include "driver/ioexpander/it8801.h" #include "ec_commands.h" +#include "ioexpander.h" #include "led_common.h" #include "led_onoff_states.h" diff --git a/board/stm32f446e-eval/board.c b/board/stm32f446e-eval/board.c index 7039064cbf..d8f345f9aa 100644 --- a/board/stm32f446e-eval/board.c +++ b/board/stm32f446e-eval/board.c @@ -7,7 +7,6 @@ #include "dma.h" #include "ec_version.h" #include "gpio.h" -#include "gpio_list.h" #include "hooks.h" #include "i2c.h" #include "registers.h" @@ -16,6 +15,9 @@ #include "usb_dwc_console.h" #include "usb_hw.h" +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" + /****************************************************************************** * Define the strings used in our USB descriptors. */ diff --git a/board/stm32l476g-eval/board.c b/board/stm32l476g-eval/board.c index e3f467ac50..1f22fa9373 100644 --- a/board/stm32l476g-eval/board.c +++ b/board/stm32l476g-eval/board.c @@ -6,8 +6,8 @@ #include "common.h" #include "gpio.h" #include "hooks.h" -#include "registers.h" #include "i2c.h" +#include "registers.h" #ifdef CTS_MODULE /* @@ -19,6 +19,7 @@ __attribute__((weak)) void cts_irq(enum gpio_signal signal) } #endif +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" void tick_event(void) diff --git a/board/storo/board.c b/board/storo/board.c index 83d9ef4c72..854838d844 100644 --- a/board/storo/board.c +++ b/board/storo/board.c @@ -8,23 +8,23 @@ #include "adc_chip.h" #include "button.h" #include "cbi_fw_config.h" -#include "cros_board_info.h" #include "cbi_ssfc.h" #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" -#include "driver/accel_lis2dw12.h" +#include "cros_board_info.h" #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" -#include "driver/accelgyro_bmi_common.h" +#include "driver/accel_lis2dw12.h" #include "driver/accelgyro_bmi260.h" -#include "driver/accelgyro_icm_common.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" #include "driver/retimer/tusb544.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/raa489000.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/stryke/board.c b/board/stryke/board.c index 1d1bbbe949..c1701e18d7 100644 --- a/board/stryke/board.c +++ b/board/stryke/board.c @@ -33,8 +33,8 @@ #include "system.h" #include "task.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" #include "uart.h" #include "usb_charge.h" #include "usb_pd.h" @@ -104,7 +104,8 @@ static void bc12_interrupt(enum gpio_signal signal) } } -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /******************************************************************************/ /* SPI devices */ diff --git a/board/stryke/led.c b/board/stryke/led.c index d49e29782c..c5667edf2a 100644 --- a/board/stryke/led.c +++ b/board/stryke/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Stryke */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/sweetberry/board.c b/board/sweetberry/board.c index 0fdfcda7be..b6b4460e51 100644 --- a/board/sweetberry/board.c +++ b/board/sweetberry/board.c @@ -8,7 +8,6 @@ #include "dma.h" #include "ec_version.h" #include "gpio.h" -#include "gpio_list.h" #include "hooks.h" #include "i2c.h" #include "registers.h" @@ -24,6 +23,9 @@ #include "usb_power.h" #include "util.h" +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" + /****************************************************************************** * Define the strings used in our USB descriptors. */ diff --git a/board/taeko/board.c b/board/taeko/board.c index 9f0d21b8b8..a654d4c76a 100644 --- a/board/taeko/board.c +++ b/board/taeko/board.c @@ -12,27 +12,27 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "gpio.h" -#include "gpio_signal.h" -#include "hooks.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_lsm6dsm.h" #include "driver/accelgyro_lsm6dso.h" #include "driver/als_tcs3400.h" #include "fw_config.h" +#include "gpio.h" +#include "gpio_signal.h" #include "hooks.h" +#include "keyboard_raw.h" +#include "keyboard_scan.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "keyboard_raw.h" -#include "keyboard_scan.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/taeko/charger.c b/board/taeko/charger.c index 7fabd2082e..4976abdea6 100644 --- a/board/taeko/charger.c +++ b/board/taeko/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/bq25710.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/taeko/fans.c b/board/taeko/fans.c index de3a49d45d..ccfec5bc0d 100644 --- a/board/taeko/fans.c +++ b/board/taeko/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/taeko/i2c.c b/board/taeko/i2c.c index 79eddd663d..498df4dd81 100644 --- a/board/taeko/i2c.c +++ b/board/taeko/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/taeko/keyboard.c b/board/taeko/keyboard.c index 943f9f2635..29823f2d93 100644 --- a/board/taeko/keyboard.c +++ b/board/taeko/keyboard.c @@ -5,9 +5,9 @@ #include "common.h" #include "ec_commands.h" +#include "fw_config.h" #include "keyboard_scan.h" #include "timer.h" -#include "fw_config.h" /* Keyboard scan setting */ __override struct keyboard_scan_config keyscan_config = { diff --git a/board/taeko/led.c b/board/taeko/led.c index 7a58e486b0..1f8637cfe2 100644 --- a/board/taeko/led.c +++ b/board/taeko/led.c @@ -10,9 +10,9 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" #include "gpio.h" +#include "led_common.h" +#include "led_onoff_states.h" #define CPRINTS(format, args...) cprints(CC_CHARGER, format, ##args) #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/taeko/pwm.c b/board/taeko/pwm.c index 899cf1db15..521043b859 100644 --- a/board/taeko/pwm.c +++ b/board/taeko/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/taeko/sensors.c b/board/taeko/sensors.c index f695862fa8..1f0eb86925 100644 --- a/board/taeko/sensors.c +++ b/board/taeko/sensors.c @@ -3,9 +3,9 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc_chip.h" +#include "common.h" #include "driver/accel_bma422.h" #include "driver/accel_bma4xx.h" #include "driver/accel_lis2dw12.h" @@ -16,10 +16,10 @@ #include "hooks.h" #include "i2c.h" #include "motion_sense.h" +#include "tablet_mode.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" -#include "tablet_mode.h" +#include "thermal.h" #if 0 #define CPRINTS(format, args...) ccprints(format, ##args) diff --git a/board/taeko/usbc_config.c b/board/taeko/usbc_config.c index 71a495c402..0c58ca5ff4 100644 --- a/board/taeko/usbc_config.c +++ b/board/taeko/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "battery.h" #include "common.h" #include "compile_time_macros.h" @@ -27,12 +24,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/taniks/board.c b/board/taniks/board.c index f8501d761b..5657de1fe7 100644 --- a/board/taniks/board.c +++ b/board/taniks/board.c @@ -12,26 +12,26 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "gpio.h" -#include "gpio_signal.h" -#include "hooks.h" #include "driver/accel_lis2dw12.h" #include "driver/accelgyro_lsm6dso.h" #include "driver/als_tcs3400.h" #include "fw_config.h" +#include "gpio.h" +#include "gpio_signal.h" #include "hooks.h" #include "keyboard_raw.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" +#include "rgb_keyboard.h" #include "switch.h" #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "rgb_keyboard.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/taniks/charger.c b/board/taniks/charger.c index 7fabd2082e..4976abdea6 100644 --- a/board/taniks/charger.c +++ b/board/taniks/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/bq25710.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/taniks/fans.c b/board/taniks/fans.c index aeb2ff2caa..ddb79803d1 100644 --- a/board/taniks/fans.c +++ b/board/taniks/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/taniks/i2c.c b/board/taniks/i2c.c index 5be2ad4b85..28a49b0fae 100644 --- a/board/taniks/i2c.c +++ b/board/taniks/i2c.c @@ -5,7 +5,6 @@ #include "common.h" #include "compile_time_macros.h" - #include "i2c.h" /* I2C port map configuration */ diff --git a/board/taniks/led.c b/board/taniks/led.c index 6b7e0bb6cd..b231d55909 100644 --- a/board/taniks/led.c +++ b/board/taniks/led.c @@ -10,9 +10,9 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" #include "gpio.h" +#include "led_common.h" +#include "led_onoff_states.h" #define CPRINTS(format, args...) cprints(CC_CHARGER, format, ##args) #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/taniks/pwm.c b/board/taniks/pwm.c index d23358db5f..62d6c5d8ea 100644 --- a/board/taniks/pwm.c +++ b/board/taniks/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/taniks/sensors.c b/board/taniks/sensors.c index 5371f94081..54de4ffc56 100644 --- a/board/taniks/sensors.c +++ b/board/taniks/sensors.c @@ -3,9 +3,9 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc_chip.h" +#include "common.h" #include "driver/accel_bma422.h" #include "driver/accel_bma4xx.h" #include "driver/accel_lis2dw12.h" @@ -16,10 +16,10 @@ #include "hooks.h" #include "i2c.h" #include "motion_sense.h" +#include "tablet_mode.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" -#include "tablet_mode.h" +#include "thermal.h" #if 1 #define CPRINTS(format, args...) ccprints(format, ##args) diff --git a/board/taniks/usbc_config.c b/board/taniks/usbc_config.c index 71a495c402..0c58ca5ff4 100644 --- a/board/taniks/usbc_config.c +++ b/board/taniks/usbc_config.c @@ -3,9 +3,6 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "battery.h" #include "common.h" #include "compile_time_macros.h" @@ -27,12 +24,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/terrador/board.c b/board/terrador/board.c index 3724c9d2d0..a7356f53f5 100644 --- a/board/terrador/board.c +++ b/board/terrador/board.c @@ -4,19 +4,19 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi260.h" -#include "driver/bc12/pi3usb9201.h" #include "driver/als_tcs3400.h" +#include "driver/bc12/pi3usb9201.h" #include "driver/ppc/syv682x.h" -#include "driver/tcpm/tcpci.h" -#include "driver/tcpm/tusb422.h" #include "driver/retimer/bb_retimer_public.h" #include "driver/sync.h" +#include "driver/tcpm/tcpci.h" +#include "driver/tcpm/tusb422.h" #include "extpower.h" #include "fan.h" #include "fan_chip.h" @@ -30,8 +30,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "uart.h" #include "usb_mux.h" @@ -41,7 +41,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/terrador/sensors.c b/board/terrador/sensors.c index 8f187f904c..086f323b2e 100644 --- a/board/terrador/sensors.c +++ b/board/terrador/sensors.c @@ -4,19 +4,19 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" +#include "common.h" #include "driver/accel_bma2x2.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi260.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/als_tcs3400.h" #include "driver/sync.h" -#include "keyboard_scan.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "task.h" +#include "keyboard_scan.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" /******************************************************************************/ diff --git a/board/tglrvp_ish/board.c b/board/tglrvp_ish/board.c index ff0e93ebfb..5a8cbb45a9 100644 --- a/board/tglrvp_ish/board.c +++ b/board/tglrvp_ish/board.c @@ -15,7 +15,8 @@ #include "power.h" #include "task.h" -#include "gpio_list.h" /* has to be included last */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* I2C port map */ #ifdef BOARD_ADL_ISH_LITE diff --git a/board/tigertail/board.c b/board/tigertail/board.c index abdd3df10b..73ba1ecc73 100644 --- a/board/tigertail/board.c +++ b/board/tigertail/board.c @@ -19,12 +19,13 @@ #include "timer.h" #include "update_fw.h" #include "usart-stm32f0.h" -#include "usart_tx_dma.h" #include "usart_rx_dma.h" -#include "usb_i2c.h" +#include "usart_tx_dma.h" #include "usb-stream.h" +#include "usb_i2c.h" #include "util.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args) diff --git a/board/treeya/board.c b/board/treeya/board.c index 9a887a9f2d..35fbd3dde3 100644 --- a/board/treeya/board.c +++ b/board/treeya/board.c @@ -16,12 +16,13 @@ #include "power.h" #include "power_button.h" #include "pwm.h" -#include "system.h" #include "switch.h" +#include "system.h" +#include "system_chip.h" #include "tablet_mode.h" #include "task.h" -#include "system_chip.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" static uint8_t is_psl_hibernate; diff --git a/board/treeya/led.c b/board/treeya/led.c index 74d3bdef7e..60bcc33b16 100644 --- a/board/treeya/led.c +++ b/board/treeya/led.c @@ -4,9 +4,9 @@ */ #include "common.h" -#include "led_onoff_states.h" -#include "led_common.h" #include "gpio.h" +#include "led_common.h" +#include "led_onoff_states.h" #define LED_OFF_LVL 1 #define LED_ON_LVL 0 diff --git a/board/trembyle/board.c b/board/trembyle/board.c index d9d71a0895..c75f3fc732 100644 --- a/board/trembyle/board.c +++ b/board/trembyle/board.c @@ -7,11 +7,11 @@ #include "adc.h" #include "button.h" -#include "charger.h" #include "cbi_ec_fw_config.h" -#include "driver/accelgyro_bmi_common.h" +#include "charger.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/retimer/pi3dpx1207.h" #include "driver/retimer/pi3hdx1204.h" #include "driver/retimer/ps8811.h" @@ -30,11 +30,12 @@ #include "switch.h" #include "system.h" #include "task.h" -#include "temp_sensor/thermistor.h" #include "temp_sensor.h" +#include "temp_sensor/thermistor.h" #include "usb_charge.h" #include "usb_mux.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/trembyle/board.h b/board/trembyle/board.h index 2e3d40ac8f..c04e963d1e 100644 --- a/board/trembyle/board.h +++ b/board/trembyle/board.h @@ -10,9 +10,10 @@ #define VARIANT_ZORK_TREMBYLE -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #define CONFIG_USBC_RETIMER_PI3DPX1207 /* Motion sensing drivers */ diff --git a/board/trogdor/board.c b/board/trogdor/board.c index 863f2884b8..ed3d32b757 100644 --- a/board/trogdor/board.c +++ b/board/trogdor/board.c @@ -7,9 +7,9 @@ #include "adc_chip.h" #include "button.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_scan.h" @@ -18,9 +18,9 @@ #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_config.h" @@ -29,6 +29,7 @@ #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ##args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ##args) +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Keyboard scan setting */ diff --git a/board/trogdor/usbc_config.c b/board/trogdor/usbc_config.c index b9c37a04fd..270c6c0d8f 100644 --- a/board/trogdor/usbc_config.c +++ b/board/trogdor/usbc_config.c @@ -6,10 +6,10 @@ /* Trogdor board-specific USB-C configuration */ #include "bc12/pi3usb9201_public.h" -#include "charger.h" -#include "charger/isl923x_public.h" #include "charge_manager.h" #include "charge_state.h" +#include "charger.h" +#include "charger/isl923x_public.h" #include "common.h" #include "config.h" #include "gpio.h" @@ -19,9 +19,9 @@ #include "tcpm/ps8xxx_public.h" #include "tcpm/tcpci.h" #include "timer.h" +#include "usb_mux.h" #include "usb_pd.h" #include "usbc_config.h" -#include "usb_mux.h" #include "usbc_ocp.h" #include "usbc_ppc.h" diff --git a/board/twinkie/board.c b/board/twinkie/board.c index 97c69fb126..ffc3746432 100644 --- a/board/twinkie/board.c +++ b/board/twinkie/board.c @@ -27,6 +27,7 @@ void vbus_event(enum gpio_signal signal) ccprintf("INA!\n"); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Initialize board. */ diff --git a/board/twinkie/sniffer.c b/board/twinkie/sniffer.c index ff7ad02f87..501608717d 100644 --- a/board/twinkie/sniffer.c +++ b/board/twinkie/sniffer.c @@ -9,8 +9,9 @@ #include "console.h" #include "dma.h" #include "gpio.h" -#include "hwtimer.h" #include "hooks.h" +#include "hwtimer.h" +#include "ina2xx.h" #include "injector.h" #include "link_defs.h" #include "registers.h" @@ -19,7 +20,6 @@ #include "usb_descriptor.h" #include "usb_hw.h" #include "util.h" -#include "ina2xx.h" /* Size of one USB packet buffer */ #define EP_BUF_SIZE 64 diff --git a/board/twinkie/usb_pd_policy.c b/board/twinkie/usb_pd_policy.c index c99dfb5750..c3434cd0d5 100644 --- a/board/twinkie/usb_pd_policy.c +++ b/board/twinkie/usb_pd_policy.c @@ -11,9 +11,9 @@ #include "registers.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_pd.h" #include "usb_pd_pdo.h" +#include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/vell/board.c b/board/vell/board.c index 57b74e1033..874fc8d033 100644 --- a/board/vell/board.c +++ b/board/vell/board.c @@ -10,23 +10,23 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "gpio.h" -#include "gpio_signal.h" -#include "hooks.h" #include "driver/als_tcs3400.h" #include "fw_config.h" +#include "gpio.h" +#include "gpio_signal.h" #include "hooks.h" #include "lid_switch.h" #include "panic.h" -#include "power_button.h" #include "power.h" #include "power/intel_x86.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/vell/charger.c b/board/vell/charger.c index 53b14381cd..3f57ca11ed 100644 --- a/board/vell/charger.c +++ b/board/vell/charger.c @@ -3,17 +3,16 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/isl9241.h" #include "hooks.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/vell/fans.c b/board/vell/fans.c index b3fc2f8585..050dc0cfa4 100644 --- a/board/vell/fans.c +++ b/board/vell/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/vell/led.c b/board/vell/led.c index cd9304b2cf..2f44788bd5 100644 --- a/board/vell/led.c +++ b/board/vell/led.c @@ -5,10 +5,8 @@ * Power and battery LED control for Vell */ -#include <stdint.h> - -#include "cbi.h" #include "battery.h" +#include "cbi.h" #include "charge_manager.h" #include "charge_state.h" #include "ec_commands.h" @@ -19,6 +17,8 @@ #include "task.h" #include "util.h" +#include <stdint.h> + #define BATT_LOW_BCT 10 #define LED_TICK_INTERVAL_MS (500 * MSEC) diff --git a/board/vell/pwm.c b/board/vell/pwm.c index 94fb4e8929..fc81baf455 100644 --- a/board/vell/pwm.c +++ b/board/vell/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/vell/sensors.c b/board/vell/sensors.c index 4957055a7d..e57598ccbf 100644 --- a/board/vell/sensors.c +++ b/board/vell/sensors.c @@ -3,16 +3,16 @@ * found in the LICENSE file. */ -#include "common.h" #include "accelgyro.h" #include "adc.h" +#include "common.h" #include "driver/als_tcs3400_public.h" #include "gpio.h" #include "hooks.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ struct adc_t adc_channels[] = { diff --git a/board/vell/usbc_config.c b/board/vell/usbc_config.c index 694ce202d1..4290c40936 100644 --- a/board/vell/usbc_config.c +++ b/board/vell/usbc_config.c @@ -3,12 +3,9 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "cbi.h" -#include "charger.h" #include "charge_ramp.h" +#include "charger.h" #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -28,12 +25,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/vilboz/board.c b/board/vilboz/board.c index 1ba266f145..c14a2152ec 100644 --- a/board/vilboz/board.c +++ b/board/vilboz/board.c @@ -29,8 +29,8 @@ #include "tablet_mode.h" #include "task.h" #include "usb_charge.h" -#include "usb_pd_tcpm.h" #include "usb_mux.h" +#include "usb_pd_tcpm.h" #include "usbc_ppc.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) @@ -44,6 +44,7 @@ void hdmi_hpd_interrupt(enum gpio_signal signal) gpio_set_level(GPIO_DP1_HPD, gpio_get_level(signal)); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* Motion sensors */ diff --git a/board/vilboz/board.h b/board/vilboz/board.h index 8a7c86824d..a481082f0f 100644 --- a/board/vilboz/board.h +++ b/board/vilboz/board.h @@ -10,9 +10,10 @@ #define VARIANT_ZORK_DALBOZ -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #define CONFIG_USB_PD_PORT_MAX_COUNT 1 /* USB-A config */ diff --git a/board/voema/board.c b/board/voema/board.c index 363cc603ad..beedb0d1b9 100644 --- a/board/voema/board.c +++ b/board/voema/board.c @@ -4,10 +4,10 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi260.h" #include "driver/als_tcs3400.h" @@ -29,8 +29,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "uart.h" #include "usb_mux.h" @@ -40,7 +40,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/voema/led.c b/board/voema/led.c index bb808e6d72..a41f549faf 100644 --- a/board/voema/led.c +++ b/board/voema/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for voema */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/voema/sensors.c b/board/voema/sensors.c index d532a64148..bcb8f9ee36 100644 --- a/board/voema/sensors.c +++ b/board/voema/sensors.c @@ -4,22 +4,22 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" #include "cbi_ssfc.h" +#include "common.h" #include "driver/accel_bma2x2.h" +#include "driver/accel_kionix.h" #include "driver/accelgyro_icm426xx.h" #include "driver/accelgyro_icm_common.h" -#include "driver/accel_kionix.h" #include "driver/als_tcs3400.h" #include "driver/sync.h" -#include "keyboard_scan.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" +#include "keyboard_scan.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" /******************************************************************************/ diff --git a/board/volet/board.c b/board/volet/board.c index 47140464b6..222fdde37e 100644 --- a/board/volet/board.c +++ b/board/volet/board.c @@ -4,10 +4,10 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi160.h" #include "driver/als_tcs3400.h" @@ -31,8 +31,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "uart.h" #include "usb_mux.h" @@ -42,7 +42,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/volet/led.c b/board/volet/led.c index dceadd416f..2458e882e3 100644 --- a/board/volet/led.c +++ b/board/volet/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Volteer */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/volet/sensors.c b/board/volet/sensors.c index 0ea3f4b74a..932b39f43e 100644 --- a/board/volet/sensors.c +++ b/board/volet/sensors.c @@ -4,24 +4,24 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" #include "cbi_ec_fw_config.h" #include "cbi_ssfc.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi160.h" -#include "driver/accelgyro_icm_common.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/als_tcs3400.h" #include "driver/sync.h" -#include "keyboard_scan.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "task.h" +#include "keyboard_scan.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" #define CPRINTS(format, args...) cprints(CC_MOTION_SENSE, format, ##args) diff --git a/board/volmar/board.c b/board/volmar/board.c index 865e1ce5bb..e87a43a030 100644 --- a/board/volmar/board.c +++ b/board/volmar/board.c @@ -10,20 +10,20 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" +#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" #include "hooks.h" -#include "fw_config.h" -#include "hooks.h" #include "lid_switch.h" -#include "power_button.h" #include "power.h" +#include "power_button.h" #include "registers.h" #include "switch.h" #include "throttle_ap.h" #include "usbc_config.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Console output macros */ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) diff --git a/board/volmar/charger.c b/board/volmar/charger.c index 7a16fcd5cb..c6ee062ab5 100644 --- a/board/volmar/charger.c +++ b/board/volmar/charger.c @@ -3,16 +3,15 @@ * found in the LICENSE file. */ -#include "common.h" - #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" +#include "common.h" #include "compile_time_macros.h" #include "console.h" #include "driver/charger/isl9241.h" -#include "usbc_ppc.h" #include "usb_pd.h" +#include "usbc_ppc.h" #include "util.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/volmar/fans.c b/board/volmar/fans.c index 404e6f60df..6b87f9cba3 100644 --- a/board/volmar/fans.c +++ b/board/volmar/fans.c @@ -8,8 +8,8 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "fan_chip.h" #include "fan.h" +#include "fan_chip.h" #include "hooks.h" #include "pwm.h" diff --git a/board/volmar/led.c b/board/volmar/led.c index 6c8c20299b..11b1cced9e 100644 --- a/board/volmar/led.c +++ b/board/volmar/led.c @@ -4,11 +4,11 @@ * Power and battery LED control for volmar */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/volmar/pwm.c b/board/volmar/pwm.c index ad4093ed0e..33622559a1 100644 --- a/board/volmar/pwm.c +++ b/board/volmar/pwm.c @@ -4,7 +4,6 @@ */ #include "common.h" - #include "compile_time_macros.h" #include "hooks.h" #include "pwm.h" diff --git a/board/volmar/sensors.c b/board/volmar/sensors.c index f03469cef4..1a0a5f8398 100644 --- a/board/volmar/sensors.c +++ b/board/volmar/sensors.c @@ -3,13 +3,13 @@ * found in the LICENSE file. */ -#include "common.h" #include "adc.h" +#include "common.h" #include "hooks.h" #include "motion_sense.h" #include "temp_sensor.h" -#include "thermal.h" #include "temp_sensor/thermistor.h" +#include "thermal.h" /* ADC configuration */ const struct adc_t adc_channels[] = { diff --git a/board/volmar/usbc_config.c b/board/volmar/usbc_config.c index 6a6c5c709f..7f4b582807 100644 --- a/board/volmar/usbc_config.c +++ b/board/volmar/usbc_config.c @@ -3,12 +3,9 @@ * found in the LICENSE file. */ -#include <stdint.h> -#include <stdbool.h> - #include "cbi.h" -#include "charger.h" #include "charge_ramp.h" +#include "charger.h" #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -27,12 +24,15 @@ #include "task.h" #include "task_id.h" #include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" #include "usb_charge.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" +#include "usbc_config.h" +#include "usbc_ppc.h" + +#include <stdbool.h> +#include <stdint.h> #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/board/volteer/board.c b/board/volteer/board.c index ecf3e12e5e..f8363ea4d7 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -4,10 +4,10 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi260.h" #include "driver/als_tcs3400.h" @@ -27,8 +27,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "timer.h" #include "uart.h" @@ -37,7 +37,8 @@ #include "usb_pd_tcpm.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* Disable debug messages to save flash space */ #define CPRINTS(format, args...) diff --git a/board/volteer/board.h b/board/volteer/board.h index bf46543e90..fad8361dfb 100644 --- a/board/volteer/board.h +++ b/board/volteer/board.h @@ -188,7 +188,6 @@ #include "gpio_signal.h" #include "registers.h" - #include "usbc_config.h" enum battery_type { diff --git a/board/volteer/cbi.c b/board/volteer/cbi.c index 46c7dae7bf..c2bc656bb5 100644 --- a/board/volteer/cbi.c +++ b/board/volteer/cbi.c @@ -4,9 +4,9 @@ */ /* Features common to ECOS and Zephyr */ -#include "common.h" #include "cbi.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "keyboard_raw.h" #include "usbc_config.h" diff --git a/board/volteer/sensors.c b/board/volteer/sensors.c index b6ed795777..61068c28f1 100644 --- a/board/volteer/sensors.c +++ b/board/volteer/sensors.c @@ -4,18 +4,18 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" +#include "common.h" #include "driver/accel_bma2x2_public.h" -#include "driver/accelgyro_bmi_common_public.h" #include "driver/accelgyro_bmi260_public.h" +#include "driver/accelgyro_bmi_common_public.h" #include "driver/als_tcs3400_public.h" -#include "keyboard_scan.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "task.h" +#include "keyboard_scan.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" /******************************************************************************/ diff --git a/board/volteer/usbc_config.c b/board/volteer/usbc_config.c index e3cd322d29..e95143cd39 100644 --- a/board/volteer/usbc_config.c +++ b/board/volteer/usbc_config.c @@ -4,23 +4,23 @@ */ /* Volteer family-specific USB-C configuration */ -#include "common.h" #include "cbi_ec_fw_config.h" -#include "gpio.h" -#include "hooks.h" -#include "system.h" -#include "timer.h" -#include "usbc_config.h" -#include "usbc_ppc.h" -#include "usb_mux.h" +#include "common.h" #include "driver/bc12/pi3usb9201_public.h" #include "driver/ppc/sn5s330_public.h" #include "driver/ppc/syv682x_public.h" #include "driver/retimer/bb_retimer_public.h" #include "driver/tcpm/ps8xxx_public.h" #include "driver/tcpm/rt1715_public.h" -#include "driver/tcpm/tusb422_public.h" #include "driver/tcpm/tcpci.h" +#include "driver/tcpm/tusb422_public.h" +#include "gpio.h" +#include "hooks.h" +#include "system.h" +#include "timer.h" +#include "usb_mux.h" +#include "usbc_config.h" +#include "usbc_ppc.h" /* Disable debug messages to save flash space */ #define CPRINTS(format, args...) diff --git a/board/volteer_ish/board.c b/board/volteer_ish/board.c index 1f209dfb4d..59b63c2a28 100644 --- a/board/volteer_ish/board.c +++ b/board/volteer_ish/board.c @@ -6,8 +6,8 @@ /* Volteer ISH board-specific configuration */ #include "console.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accel_bma2x2.h" +#include "driver/accelgyro_bmi_common.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" @@ -16,7 +16,8 @@ #include "power.h" #include "task.h" -#include "gpio_list.h" /* has to be included last */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" /* I2C port map */ const struct i2c_port_t i2c_ports[] = { diff --git a/board/voxel/board.c b/board/voxel/board.c index 4c8badeb1c..9faef2db6b 100644 --- a/board/voxel/board.c +++ b/board/voxel/board.c @@ -4,20 +4,20 @@ */ /* Volteer board-specific configuration */ -#include "button.h" -#include "common.h" #include "accelgyro.h" +#include "button.h" #include "cbi_ec_fw_config.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi160.h" #include "driver/als_tcs3400.h" #include "driver/bc12/pi3usb9201.h" #include "driver/ppc/syv682x.h" -#include "driver/tcpm/tcpci.h" -#include "driver/tcpm/tusb422.h" -#include "driver/tcpm/rt1715.h" #include "driver/retimer/bb_retimer_public.h" #include "driver/sync.h" +#include "driver/tcpm/rt1715.h" +#include "driver/tcpm/tcpci.h" +#include "driver/tcpm/tusb422.h" #include "extpower.h" #include "fan.h" #include "fan_chip.h" @@ -31,8 +31,8 @@ #include "pwm_chip.h" #include "switch.h" #include "system.h" -#include "task.h" #include "tablet_mode.h" +#include "task.h" #include "throttle_ap.h" #include "uart.h" #include "usb_mux.h" @@ -42,7 +42,8 @@ #include "usbc_ppc.h" #include "util.h" -#include "gpio_list.h" /* Must come after other header files. */ +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/board/voxel/led.c b/board/voxel/led.c index 5b15c9620f..acd00f8941 100644 --- a/board/voxel/led.c +++ b/board/voxel/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for Volteer */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/voxel/sensors.c b/board/voxel/sensors.c index c3c074da9d..81e6b13b57 100644 --- a/board/voxel/sensors.c +++ b/board/voxel/sensors.c @@ -4,25 +4,25 @@ */ /* Volteer family-specific sensor configuration */ -#include "common.h" #include "accelgyro.h" #include "cbi_ec_fw_config.h" #include "cbi_ssfc.h" +#include "common.h" #include "driver/accel_bma2x2.h" #include "driver/accel_kionix.h" -#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi160.h" -#include "driver/accelgyro_icm_common.h" -#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/als_tcs3400.h" #include "driver/sync.h" -#include "keyboard_scan.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" -#include "task.h" +#include "keyboard_scan.h" #include "tablet_mode.h" +#include "task.h" #include "util.h" #define CPRINTS(format, args...) cprints(CC_MOTION_SENSE, format, ##args) diff --git a/board/waddledee/board.c b/board/waddledee/board.c index 4dfb3048ca..814e2e8921 100644 --- a/board/waddledee/board.c +++ b/board/waddledee/board.c @@ -15,9 +15,9 @@ #include "driver/bc12/pi3usb9201.h" #include "driver/charger/sm5803.h" #include "driver/retimer/tusb544.h" -#include "driver/temp_sensor/thermistor.h" #include "driver/tcpm/anx7447.h" #include "driver/tcpm/it83xx_pd.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c index 3cdb71cc5e..7dc87f38da 100644 --- a/board/waddledoo/board.c +++ b/board/waddledoo/board.c @@ -126,6 +126,7 @@ static void sub_hdmi_hpd_interrupt(enum gpio_signal s) gpio_set_level(GPIO_EC_AP_USB_C1_HDMI_HPD, !hdmi_hpd_odl); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/waddledoo2/board.c b/board/waddledoo2/board.c index 98c061d9af..7adb032f98 100644 --- a/board/waddledoo2/board.c +++ b/board/waddledoo2/board.c @@ -9,7 +9,6 @@ #include "button.h" #include "cbi_fw_config.h" #include "cbi_ssfc.h" -#include "cbi_fw_config.h" #include "charge_manager.h" #include "charge_state_v2.h" #include "charger.h" @@ -17,18 +16,17 @@ #include "common.h" #include "compile_time_macros.h" #include "driver/accel_bma2x2.h" +#include "driver/accel_kionix.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm426xx.h" -#include "driver/accel_kionix.h" -#include "driver/temp_sensor/thermistor.h" -#include "temp_sensor.h" +#include "driver/accelgyro_icm_common.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" +#include "driver/retimer/ps8802.h" #include "driver/tcpm/raa489000.h" #include "driver/tcpm/tcpci.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/pi3usb3x532.h" -#include "driver/retimer/ps8802.h" #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -47,6 +45,7 @@ #include "system.h" #include "tablet_mode.h" #include "task.h" +#include "temp_sensor.h" #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpm.h" @@ -188,6 +187,7 @@ static void sub_usb_c1_interrupt(enum gpio_signal s) hook_call_deferred(&check_c1_line_data, INT_RECHECK_US); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /* ADC channels */ diff --git a/board/waddledoo2/led.c b/board/waddledoo2/led.c index 33e900f2ca..9ef613e483 100644 --- a/board/waddledoo2/led.c +++ b/board/waddledoo2/led.c @@ -5,11 +5,11 @@ * Power and battery LED control for waddledoo2 */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/wheelie/board.c b/board/wheelie/board.c index e8852a0b5a..a8c5859e9d 100644 --- a/board/wheelie/board.c +++ b/board/wheelie/board.c @@ -14,11 +14,11 @@ #include "driver/accelgyro_lsm6dsm.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/sm5803.h" -#include "driver/sync.h" #include "driver/retimer/tusb544.h" -#include "driver/temp_sensor/thermistor.h" +#include "driver/sync.h" #include "driver/tcpm/anx7447.h" #include "driver/tcpm/it83xx_pd.h" +#include "driver/temp_sensor/thermistor.h" #include "driver/usb_mux/it5205.h" #include "gpio.h" #include "hooks.h" diff --git a/board/willow/board.c b/board/willow/board.c index 1fdcc37492..c563af75f2 100644 --- a/board/willow/board.c +++ b/board/willow/board.c @@ -52,6 +52,7 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" /******************************************************************************/ diff --git a/board/willow/led.c b/board/willow/led.c index fc74d4ba8b..6e177f15d6 100644 --- a/board/willow/led.c +++ b/board/willow/led.c @@ -5,9 +5,9 @@ * Power and battery LED control for Willow */ #include "common.h" -#include "ioexpander.h" #include "driver/ioexpander/it8801.h" #include "ec_commands.h" +#include "ioexpander.h" #include "led_common.h" #include "led_onoff_states.h" #define LED_ON_LVL 0 diff --git a/board/woomax/board.c b/board/woomax/board.c index 7e9fbd224f..cf47c10c70 100644 --- a/board/woomax/board.c +++ b/board/woomax/board.c @@ -10,11 +10,11 @@ #include "cbi_ec_fw_config.h" #include "cbi_ssfc.h" #include "cros_board_info.h" -#include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" -#include "driver/accelgyro_icm426xx.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/accelgyro_bmi_common.h" +#include "driver/accelgyro_icm426xx.h" +#include "driver/accelgyro_icm_common.h" #include "driver/retimer/pi3dpx1207.h" #include "driver/retimer/pi3hdx1204.h" #include "driver/retimer/ps8802.h" @@ -42,6 +42,7 @@ #include "usb_charge.h" #include "usb_mux.h" +/* Must come after other header files and interrupt handler declarations */ #include "gpio_list.h" #define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) diff --git a/board/woomax/board.h b/board/woomax/board.h index 20bbb8417a..3723d9d485 100644 --- a/board/woomax/board.h +++ b/board/woomax/board.h @@ -10,9 +10,10 @@ #define VARIANT_ZORK_TREMBYLE -#include <stdbool.h> #include "baseboard.h" +#include <stdbool.h> + #undef CONFIG_USB_PORT_POWER_SMART_PORT_COUNT #define CONFIG_USB_PORT_POWER_SMART_PORT_COUNT 1 #define CONFIG_USBC_RETIMER_PI3DPX1207 diff --git a/board/woomax/led.c b/board/woomax/led.c index 9a761bde38..9ecd0e8110 100644 --- a/board/woomax/led.c +++ b/board/woomax/led.c @@ -3,11 +3,11 @@ * found in the LICENSE file. */ +#include "chipset.h" #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" -#include "chipset.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 diff --git a/board/wormdingler/board.c b/board/wormdingler/board.c index e9e929de53..4c02398e6c 100644 --- a/board/wormdingler/board.c +++ b/board/wormdingler/board.c @@ -10,15 +10,15 @@ #include "charge_manager.h" #include "charge_state.h" #include "common.h" -#include "extpower.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" -#include "driver/accelgyro_icm_common.h" #include "driver/accelgyro_icm42607.h" +#include "driver/accelgyro_icm_common.h" #include "driver/ln9310.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "keyboard_mkbp.h" @@ -32,9 +32,9 @@ #include "pwm.h" #include "pwm_chip.h" #include "queue.h" -#include "system.h" #include "shi_chip.h" #include "switch.h" +#include "system.h" #include "tablet_mode.h" #include "task.h" #include "usbc_ppc.h" diff --git a/board/wormdingler/led.c b/board/wormdingler/led.c index c314d584c3..f6b3cddf48 100644 --- a/board/wormdingler/led.c +++ b/board/wormdingler/led.c @@ -10,13 +10,13 @@ #include "charge_state.h" #include "chipset.h" #include "ec_commands.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" #include "led_common.h" #include "system.h" #include "util.h" -#include "extpower.h" #define LED_ONE_SEC (1000 / HOOK_TICK_INTERVAL_MS) /* Battery LED blinks every per 400ms */ diff --git a/board/wormdingler/usbc_config.c b/board/wormdingler/usbc_config.c index 5d30adb6e2..28f6b7a1c9 100644 --- a/board/wormdingler/usbc_config.c +++ b/board/wormdingler/usbc_config.c @@ -5,9 +5,9 @@ /* Trogdor family-specific USB-C configuration */ +#include "charge_state.h" #include "charger.h" #include "charger/isl923x_public.h" -#include "charge_state.h" #include "console.h" #include "usb_pd.h" diff --git a/board/zinger/usb_pd_policy.c b/board/zinger/usb_pd_policy.c index 7f60ce8772..157fda5ab4 100644 --- a/board/zinger/usb_pd_policy.c +++ b/board/zinger/usb_pd_policy.c @@ -14,9 +14,9 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "util.h" #include "usb_pd.h" #include "usb_pd_pdo.h" +#include "util.h" /* ------------------------- Power supply control ------------------------ */ diff --git a/chip/mchp/lfw/ec_lfw.c b/chip/mchp/lfw/ec_lfw.c index eb8b3370cb..94b851cf1f 100644 --- a/chip/mchp/lfw/ec_lfw.c +++ b/chip/mchp/lfw/ec_lfw.c @@ -12,7 +12,6 @@ #include "cros_version.h" #include "dma.h" #include "gpio.h" -#include "gpio_list.h" #include "hwtimer.h" #include "registers.h" #include "spi.h" @@ -30,6 +29,9 @@ #include "ec_lfw.h" +/* Must come after other header files and interrupt handler declarations */ +#include "gpio_list.h" + /* * Check if LFW build is pulling in GPSPI which is not * used for EC firmware SPI flash access. diff --git a/include/accelgyro.h b/include/accelgyro.h index b51a0ea148..a0bdfa504a 100644 --- a/include/accelgyro.h +++ b/include/accelgyro.h @@ -6,6 +6,7 @@ #ifndef __CROS_EC_ACCELGYRO_H #define __CROS_EC_ACCELGYRO_H +#include "common.h" #include "math_util.h" #include "motion_sense.h" |