diff options
author | Bill Richardson <wfrichar@chromium.org> | 2015-06-16 21:51:55 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-18 19:07:00 +0000 |
commit | 104f811e6730e129a98fac6fc3941bbe0d0e857f (patch) | |
tree | 17a0d78af92eceb0cde468f56afc41f0ec726dd9 | |
parent | 19cd951027b7bd7b726e085c46b8cc9c136b0980 (diff) | |
download | chrome-ec-104f811e6730e129a98fac6fc3941bbe0d0e857f.tar.gz |
cleanup: fix all the header guards
This unifies all the EC header files to use __CROS_EC_FILENAME_H
as the include guard. Well, except for test/ util/ and extra/
which use __TEST_ __UTIL_ and __EXTRA_ prefixes respectively.
BUG=chromium:496895
BRANCH=none
TEST=make buildall -j
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: Iea71b3a08bdec94a11239de810a2b2e152b15029
Reviewed-on: https://chromium-review.googlesource.com/278121
Reviewed-by: Randall Spangler <rspangler@chromium.org>
157 files changed, 462 insertions, 462 deletions
diff --git a/board/auron/board.h b/board/auron/board.h index af1837dac0..99607cd827 100644 --- a/board/auron/board.h +++ b/board/auron/board.h @@ -5,8 +5,8 @@ /* Configuration for Auron mainboard */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_BACKLIGHT_LID @@ -113,4 +113,4 @@ int board_discharge_on_ac(int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/bds/board.h b/board/bds/board.h index 96171e0f57..c4af34d253 100644 --- a/board/bds/board.h +++ b/board/bds/board.h @@ -5,8 +5,8 @@ /* Stellaris EKB-LM4F-EAC board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands */ @@ -52,4 +52,4 @@ enum pwm_channel { #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/big/board.h b/board/big/board.h index 2b72dffb48..4beb88baba 100644 --- a/board/big/board.h +++ b/board/big/board.h @@ -5,8 +5,8 @@ /* Big board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_AP_HANG_DETECT @@ -75,4 +75,4 @@ int board_discharge_on_ac(int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/cr50/board.h b/board/cr50/board.h index 2263f7fa9c..de598b5e7f 100644 --- a/board/cr50/board.h +++ b/board/cr50/board.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Features that we don't want just yet */ #undef CONFIG_CMD_LID_ANGLE @@ -79,4 +79,4 @@ enum usb_strings { #undef CONFIG_UART_TX_BUF_SIZE #define CONFIG_UART_TX_BUF_SIZE 4096 -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/cyan/board.h b/board/cyan/board.h index 9589a1158d..833c393209 100644 --- a/board/cyan/board.h +++ b/board/cyan/board.h @@ -5,8 +5,8 @@ /* Cyan board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands */ @@ -110,4 +110,4 @@ enum temp_sensor_id { int board_discharge_on_ac(int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/dingdong/board.h b/board/dingdong/board.h index 85f4374e68..ab55e0aa2e 100644 --- a/board/dingdong/board.h +++ b/board/dingdong/board.h @@ -5,8 +5,8 @@ /* Dingdong dongle configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -103,4 +103,4 @@ enum usb_strings { #define USB_EP_CONTROL 0 #define USB_EP_COUNT 1 -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/dingdong/usb_pd_config.h b/board/dingdong/usb_pd_config.h index 894a63867b..33e7225131 100644 --- a/board/dingdong/usb_pd_config.h +++ b/board/dingdong/usb_pd_config.h @@ -5,8 +5,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H /* Timer selection for baseband PD communication */ #define TIM_CLOCK_PD_TX_C0 17 @@ -125,4 +125,4 @@ static inline int pd_adc_read(int port, int cc) return (cc == 0) ? adc_read_channel(ADC_CH_CC1_PD) : 0; } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/discovery-stm32f072/board.h b/board/discovery-stm32f072/board.h index e8a83a47e7..e1eb11130e 100644 --- a/board/discovery-stm32f072/board.h +++ b/board/discovery-stm32f072/board.h @@ -5,8 +5,8 @@ /* STM32F072-discovery board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -84,4 +84,4 @@ enum usb_strings { }; #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/discovery/board.h b/board/discovery/board.h index a4716ebe6e..2fb8a84edf 100644 --- a/board/discovery/board.h +++ b/board/discovery/board.h @@ -5,8 +5,8 @@ /* STM32L-discovery board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #undef CONFIG_WATCHDOG_HELP @@ -28,4 +28,4 @@ #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/glados/board.h b/board/glados/board.h index c16e9f8295..ad1de2b883 100644 --- a/board/glados/board.h +++ b/board/glados/board.h @@ -5,8 +5,8 @@ /* Glados board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_ADC @@ -131,4 +131,4 @@ void board_reset_pd_mcu(void); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/glados_pd/board.h b/board/glados_pd/board.h index 999cf5802d..ce265028c4 100644 --- a/board/glados_pd/board.h +++ b/board/glados_pd/board.h @@ -5,8 +5,8 @@ /* gladoes_pd board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* * The flash size is only 32kB. @@ -93,4 +93,4 @@ enum adc_channel { #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/glados_pd/usb_pd_config.h b/board/glados_pd/usb_pd_config.h index 28f5cff6f9..8df3f84dc1 100644 --- a/board/glados_pd/usb_pd_config.h +++ b/board/glados_pd/usb_pd_config.h @@ -10,8 +10,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H /* Timer selection for baseband PD communication */ #define TIM_CLOCK_PD_TX_C0 16 @@ -323,5 +323,5 @@ static inline void pd_set_vconn(int port, int polarity, int enable) } } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/glower/board.h b/board/glower/board.h index edd0c56ec9..a26edf0d40 100644 --- a/board/glower/board.h +++ b/board/glower/board.h @@ -5,8 +5,8 @@ /* Glower board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ /* #define CONFIG_BACKLIGHT_LID */ @@ -112,4 +112,4 @@ int board_discharge_on_ac(int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/hadoken/board.h b/board/hadoken/board.h index eb496668a5..ac61bc67b8 100644 --- a/board/hadoken/board.h +++ b/board/hadoken/board.h @@ -5,8 +5,8 @@ /* Hadoken board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H #ifndef __ASSEMBLER__ @@ -56,5 +56,5 @@ #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/hoho/board.h b/board/hoho/board.h index 7b91a669eb..90256ea7a7 100644 --- a/board/hoho/board.h +++ b/board/hoho/board.h @@ -5,8 +5,8 @@ /* Hoho dongle configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -114,4 +114,4 @@ enum usb_strings { #define USB_EP_CONTROL 0 #define USB_EP_COUNT 1 -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/hoho/usb_pd_config.h b/board/hoho/usb_pd_config.h index 894a63867b..33e7225131 100644 --- a/board/hoho/usb_pd_config.h +++ b/board/hoho/usb_pd_config.h @@ -5,8 +5,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H /* Timer selection for baseband PD communication */ #define TIM_CLOCK_PD_TX_C0 17 @@ -125,4 +125,4 @@ static inline int pd_adc_read(int port, int cc) return (cc == 0) ? adc_read_channel(ADC_CH_CC1_PD) : 0; } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/honeybuns/board.h b/board/honeybuns/board.h index 324346662b..ec336bfd66 100644 --- a/board/honeybuns/board.h +++ b/board/honeybuns/board.h @@ -5,8 +5,8 @@ /* Honeybuns board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -109,4 +109,4 @@ enum usb_strings { #define USB_EP_CONTROL 0 #define USB_EP_COUNT 1 -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/honeybuns/usb_pd_config.h b/board/honeybuns/usb_pd_config.h index cbb5214546..be4e31cd70 100644 --- a/board/honeybuns/usb_pd_config.h +++ b/board/honeybuns/usb_pd_config.h @@ -5,8 +5,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H /* Timer selection for baseband PD communication */ #define TIM_CLOCK_PD_TX_C0 17 @@ -138,4 +138,4 @@ static inline void pd_set_vconn(int port, int polarity, int enable) } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/host/board.h b/board/host/board.h index 99a5798e02..592ecb620a 100644 --- a/board/host/board.h +++ b/board/host/board.h @@ -5,8 +5,8 @@ /* Emulator board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_EXTPOWER_GPIO @@ -72,4 +72,4 @@ extern const int supplier_priority[]; #define PD_MAX_CURRENT_MA 3000 #define PD_MAX_VOLTAGE_MV 20000 -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/host/usb_pd_config.h b/board/host/usb_pd_config.h index 8055591770..d72d4035b8 100644 --- a/board/host/usb_pd_config.h +++ b/board/host/usb_pd_config.h @@ -5,8 +5,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H /* Use software CRC */ #define CONFIG_SW_CRC @@ -21,4 +21,4 @@ void pd_config_init(int port, uint8_t power_role); int pd_adc_read(int port, int cc); -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/it8380dev/board.h b/board/it8380dev/board.h index 405966d70a..5d90d87d24 100644 --- a/board/it8380dev/board.h +++ b/board/it8380dev/board.h @@ -5,8 +5,8 @@ /* IT8380 development board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_POWER_BUTTON @@ -84,4 +84,4 @@ enum ec2i_setting { }; #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/kunimitsu/board.h b/board/kunimitsu/board.h index cc03613cff..25c1d891fb 100644 --- a/board/kunimitsu/board.h +++ b/board/kunimitsu/board.h @@ -5,8 +5,8 @@ /* Skylake Chrome Reference Design board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands */ @@ -122,4 +122,4 @@ int board_discharge_on_ac(int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/llama/board.h b/board/llama/board.h index a2091be9cc..be48c0cb7a 100644 --- a/board/llama/board.h +++ b/board/llama/board.h @@ -5,8 +5,8 @@ /* llama board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H #define CONFIG_CHIPSET_MEDIATEK /* Add for AC adaptor, charger, battery */ @@ -98,4 +98,4 @@ int board_discharge_on_ac(int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/mec1322_evb/board.h b/board/mec1322_evb/board.h index e75f53e62e..8fbc0dcf50 100644 --- a/board/mec1322_evb/board.h +++ b/board/mec1322_evb/board.h @@ -5,8 +5,8 @@ /* MEC1322 eval board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands */ @@ -42,4 +42,4 @@ enum adc_channel { #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/npcx_evb/board.h b/board/npcx_evb/board.h index 247333b5e2..6395947133 100644 --- a/board/npcx_evb/board.h +++ b/board/npcx_evb/board.h @@ -5,8 +5,8 @@ /* Configuration for Nuvoton M4 EB */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Support Code RAM architecture (Run code in RAM) */ #define CONFIG_CODERAM_ARCH @@ -85,4 +85,4 @@ enum mft_channel { #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/oak/board.h b/board/oak/board.h index aece828247..5cac3c7501 100644 --- a/board/oak/board.h +++ b/board/oak/board.h @@ -5,8 +5,8 @@ /* oak board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Board revision */ #undef CONFIG_BOARD_OAK_REV_1 @@ -175,4 +175,4 @@ void board_typec_dp_set(int port, int level); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/oak_pd/board.h b/board/oak_pd/board.h index 013d555834..aebdec9ac3 100644 --- a/board/oak_pd/board.h +++ b/board/oak_pd/board.h @@ -5,8 +5,8 @@ /* oak_pd board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H #undef CONFIG_BOARD_OAK_REV_1 #define CONFIG_BOARD_OAK_REV_2 @@ -105,4 +105,4 @@ enum adc_channel { #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/oak_pd/usb_pd_config.h b/board/oak_pd/usb_pd_config.h index 28f5cff6f9..8df3f84dc1 100644 --- a/board/oak_pd/usb_pd_config.h +++ b/board/oak_pd/usb_pd_config.h @@ -10,8 +10,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H /* Timer selection for baseband PD communication */ #define TIM_CLOCK_PD_TX_C0 16 @@ -323,5 +323,5 @@ static inline void pd_set_vconn(int port, int polarity, int enable) } } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/pinky/board.h b/board/pinky/board.h index 5f66469d51..51ec71bebb 100644 --- a/board/pinky/board.h +++ b/board/pinky/board.h @@ -5,8 +5,8 @@ /* Veyron board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_AP_HANG_DETECT @@ -83,4 +83,4 @@ int board_discharge_on_ac(int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/pit/board.h b/board/pit/board.h index ac818cf883..b0846b5d03 100644 --- a/board/pit/board.h +++ b/board/pit/board.h @@ -5,8 +5,8 @@ /* Pit board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_BATTERY_BQ20Z453 @@ -50,4 +50,4 @@ #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/plankton/board.h b/board/plankton/board.h index f367879a70..43ca20fc1e 100644 --- a/board/plankton/board.h +++ b/board/plankton/board.h @@ -5,8 +5,8 @@ /* Plankton board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -116,4 +116,4 @@ int board_in_hub_mode(void); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/plankton/usb_pd_config.h b/board/plankton/usb_pd_config.h index 4946695c09..07eda3a035 100644 --- a/board/plankton/usb_pd_config.h +++ b/board/plankton/usb_pd_config.h @@ -5,8 +5,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H #include "board.h" @@ -161,4 +161,4 @@ static inline int pd_adc_read(int port, int cc) return adc_read_channel(ADC_CH_CC2_PD); } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/rambi/board.h b/board/rambi/board.h index bd295615bf..84d378d4df 100644 --- a/board/rambi/board.h +++ b/board/rambi/board.h @@ -5,8 +5,8 @@ /* Configuration for Rambi mainboard */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_AP_HANG_DETECT @@ -130,4 +130,4 @@ int board_discharge_on_ac(int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/ryu/board.h b/board/ryu/board.h index 655e97a8b3..84fa024fea 100644 --- a/board/ryu/board.h +++ b/board/ryu/board.h @@ -5,8 +5,8 @@ /* ryu board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -223,4 +223,4 @@ void pp1800_on_off_evt(enum gpio_signal signal); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/ryu/usb_pd_config.h b/board/ryu/usb_pd_config.h index eff6a6b95b..c28a5469f5 100644 --- a/board/ryu/usb_pd_config.h +++ b/board/ryu/usb_pd_config.h @@ -5,8 +5,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H #include "adc.h" #include "charge_state.h" @@ -193,4 +193,4 @@ static inline void pd_set_vconn(int port, int polarity, int enable) GPIO_USBC_VCONN2_EN_L, !enable); } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/ryu_p4p5/board.h b/board/ryu_p4p5/board.h index f57a248eba..c7c5a9193d 100644 --- a/board/ryu_p4p5/board.h +++ b/board/ryu_p4p5/board.h @@ -5,8 +5,8 @@ /* ryu board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -219,4 +219,4 @@ void pp1800_on_off_evt(enum gpio_signal signal); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/ryu_p4p5/usb_pd_config.h b/board/ryu_p4p5/usb_pd_config.h index 6cfa5511ba..31e675eb55 100644 --- a/board/ryu_p4p5/usb_pd_config.h +++ b/board/ryu_p4p5/usb_pd_config.h @@ -5,8 +5,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H #include "adc.h" #include "charge_state.h" @@ -192,4 +192,4 @@ static inline void pd_set_vconn(int port, int polarity, int enable) GPIO_USBC_VCONN2_EN_L, !enable); } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/ryu_sh/board.h b/board/ryu_sh/board.h index 7f17723174..67bafb3693 100644 --- a/board/ryu_sh/board.h +++ b/board/ryu_sh/board.h @@ -5,8 +5,8 @@ /* ryu sensor board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -77,4 +77,4 @@ enum power_signal { #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/ryu_sh_loader/board.h b/board/ryu_sh_loader/board.h index c90d399eb5..0453332da7 100644 --- a/board/ryu_sh_loader/board.h +++ b/board/ryu_sh_loader/board.h @@ -5,8 +5,8 @@ /* ryu sensor board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -62,4 +62,4 @@ #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/samus/board.h b/board/samus/board.h index 3c81e403d8..c68ac4dcb4 100644 --- a/board/samus/board.h +++ b/board/samus/board.h @@ -5,8 +5,8 @@ /* Configuration for Samus mainboard */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Debug features */ #define CONFIG_CONSOLE_CMDHELP @@ -209,4 +209,4 @@ void set_pp5000_in_g3(int mask, int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h index 8e72a259ac..84401ad9fa 100644 --- a/board/samus_pd/board.h +++ b/board/samus_pd/board.h @@ -5,8 +5,8 @@ /* samus_pd board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -149,4 +149,4 @@ int board_get_battery_soc(void); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/samus_pd/usb_pd_config.h b/board/samus_pd/usb_pd_config.h index 5ec5af9416..43272bfbaf 100644 --- a/board/samus_pd/usb_pd_config.h +++ b/board/samus_pd/usb_pd_config.h @@ -9,8 +9,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H /* Timer selection for baseband PD communication */ #define TIM_CLOCK_PD_TX_C0 17 @@ -274,4 +274,4 @@ static inline void pd_set_vconn(int port, int polarity, int enable) GPIO_USB_C1_CC2_VCONN1_EN_L, !enable); } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/strago/board.h b/board/strago/board.h index 36ef364d91..bbd63c8605 100644 --- a/board/strago/board.h +++ b/board/strago/board.h @@ -5,8 +5,8 @@ /* Strago board configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands */ @@ -131,4 +131,4 @@ int board_discharge_on_ac(int enable); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/twinkie/board.h b/board/twinkie/board.h index 3181be1a2d..71aceecb1f 100644 --- a/board/twinkie/board.h +++ b/board/twinkie/board.h @@ -5,8 +5,8 @@ /* Twinkie dongle configuration */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -139,4 +139,4 @@ enum usb_strings { #define USB_EP_COUNT 2 #endif -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/twinkie/injector.h b/board/twinkie/injector.h index 11c3c095f2..026a2c2859 100644 --- a/board/twinkie/injector.h +++ b/board/twinkie/injector.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef __INJECTOR_H -#define __INJECTOR_H +#ifndef __CROS_EC_INJECTOR_H +#define __CROS_EC_INJECTOR_H /* * Finite state machine definition for sending complex sequences @@ -85,4 +85,4 @@ enum trace_mode { /* Number of words in the FSM command/data buffer */ #define INJ_CMD_COUNT 128 -#endif /* __INJECTOR_H */ +#endif /* __CROS_EC_INJECTOR_H */ diff --git a/board/twinkie/usb_pd_config.h b/board/twinkie/usb_pd_config.h index 73cb7b578f..b125a2dfa9 100644 --- a/board/twinkie/usb_pd_config.h +++ b/board/twinkie/usb_pd_config.h @@ -5,8 +5,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H #include "ina2xx.h" @@ -177,4 +177,4 @@ static inline int pd_adc_read(int port, int cc) return adc_read_channel(ADC_CH_CC2_PD); } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/board/zinger/board.h b/board/zinger/board.h index 1b94b30064..a00731f16c 100644 --- a/board/zinger/board.h +++ b/board/zinger/board.h @@ -8,8 +8,8 @@ * including zinger and minimuffin. */ -#ifndef __BOARD_H -#define __BOARD_H +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 @@ -133,4 +133,4 @@ void __enter_hibernate(uint32_t seconds, uint32_t microseconds); #endif /* !__ASSEMBLER__ */ -#endif /* __BOARD_H */ +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/zinger/debug.h b/board/zinger/debug.h index fcc000a20d..38cea6fb28 100644 --- a/board/zinger/debug.h +++ b/board/zinger/debug.h @@ -4,8 +4,8 @@ */ /* Synchronous UART debug printf */ -#ifndef __BOARD_ZINGER_DEBUG_H -#define __BOARD_ZINGER_DEBUG_H +#ifndef __CROS_EC_DEBUG_H +#define __CROS_EC_DEBUG_H #ifdef CONFIG_DEBUG_PRINTF void debug_printf(const char *format, ...); @@ -13,4 +13,4 @@ void debug_printf(const char *format, ...); #define debug_printf(...) #endif -#endif /* __BOARD_ZINGER_DEBUG_H */ +#endif /* __CROS_EC_DEBUG_H */ diff --git a/board/zinger/usb_pd_config.h b/board/zinger/usb_pd_config.h index 7541285429..fbe24e0003 100644 --- a/board/zinger/usb_pd_config.h +++ b/board/zinger/usb_pd_config.h @@ -5,8 +5,8 @@ /* USB Power delivery board configuration */ -#ifndef __USB_PD_CONFIG_H -#define __USB_PD_CONFIG_H +#ifndef __CROS_EC_USB_PD_CONFIG_H +#define __CROS_EC_USB_PD_CONFIG_H /* Timer selection for baseband PD communication */ #define TIM_CLOCK_PD_TX_C0 14 @@ -106,4 +106,4 @@ static inline int pd_adc_read(int port, int cc) return (cc == 0) ? adc_read_channel(ADC_CH_CC1_PD) : 4096; } -#endif /* __USB_PD_CONFIG_H */ +#endif /* __CROS_EC_USB_PD_CONFIG_H */ diff --git a/chip/g/cr50_a1_regdefs.h b/chip/g/cr50_a1_regdefs.h index da28c39076..62abc4135b 100644 --- a/chip/g/cr50_a1_regdefs.h +++ b/chip/g/cr50_a1_regdefs.h @@ -6,8 +6,8 @@ /* This file is autogenerated. Do not edit. */ -#ifndef GC_REGDEFS_H -#define GC_REGDEFS_H +#ifndef __CROS_EC_CR50_A1_REGDEFS_H +#define __CROS_EC_CR50_A1_REGDEFS_H #define GC___REVA__ 1 #define GC___REVB__ 2 #define GC___REVC__ 3 @@ -18354,7 +18354,7 @@ -1 #endif /* GC__ENABLE_FLASH_DFT_DEFINITIONS__ */ -#endif /* GC_REGDEFS_H */ +#endif /* __CROS_EC_CR50_A1_REGDEFS_H */ #define GC_CONST_FSH_PE_CONTROL_READ 0x16021765 #define GC_CONST_FSH_PE_CONTROL_PROGRAM 0x27182818 #define GC_CONST_FSH_PE_CONTROL_ERASE 0x31415927 diff --git a/chip/g/cr50_fpga_regdefs.h b/chip/g/cr50_fpga_regdefs.h index cfe8dd8f59..e6b3d4775c 100644 --- a/chip/g/cr50_fpga_regdefs.h +++ b/chip/g/cr50_fpga_regdefs.h @@ -6,8 +6,8 @@ /* This file is autogenerated. Do not edit. */ -#ifndef GC_REGDEFS_H -#define GC_REGDEFS_H +#ifndef __CROS_EC_CR50_FPGA_REGDEFS_H +#define __CROS_EC_CR50_FPGA_REGDEFS_H #define GC___REVA__ 1 #define GC___REVB__ 2 #define GC___REVC__ 3 @@ -18211,7 +18211,7 @@ -1 #endif /* GC__ENABLE_FLASH_DFT_DEFINITIONS__ */ -#endif /* GC_REGDEFS_H */ +#endif /* __CROS_EC_CR50_FPGA_REGDEFS_H */ #define GC_CONST_FSH_PE_CONTROL_READ 0x16021765 #define GC_CONST_FSH_PE_CONTROL_PROGRAM 0x27182818 #define GC_CONST_FSH_PE_CONTROL_ERASE 0x31415927 diff --git a/chip/g/pmu.h b/chip/g/pmu.h index 7411735850..db832184df 100644 --- a/chip/g/pmu.h +++ b/chip/g/pmu.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef INC_PMU_H_ -#define INC_PMU_H_ +#ifndef __CROS_EC_PMU_H +#define __CROS_EC_PMU_H #include "common.h" #include "registers.h" @@ -110,4 +110,4 @@ extern void pmu_powerdown_exit(void); * enable clock doubler for USB purposes */ void pmu_enable_clock_doubler(void); -#endif /* INC_PMU_H_ */ +#endif /* __CROS_EC_PMU_H */ diff --git a/chip/host/persistence.h b/chip/host/persistence.h index 0a80c2e618..1fab1c8235 100644 --- a/chip/host/persistence.h +++ b/chip/host/persistence.h @@ -5,8 +5,8 @@ /* Persistence module for emulator */ -#ifndef _PERSISTENCE_H -#define _PERSISTENCE_H +#ifndef __CROS_EC_PERSISTENCE_H +#define __CROS_EC_PERSISTENCE_H #include <stdio.h> @@ -16,4 +16,4 @@ void release_persistent_storage(FILE *ps); void remove_persistent_storage(const char *tag); -#endif /* _PERSISTENCE_H */ +#endif /* __CROS_EC_PERSISTENCE_H */ diff --git a/chip/host/reboot.h b/chip/host/reboot.h index b6a7d817e6..e391866497 100644 --- a/chip/host/reboot.h +++ b/chip/host/reboot.h @@ -5,8 +5,8 @@ /* Emulator self-reboot procedure */ -#ifndef __REBOOT_H -#define __REBOOT_H +#ifndef __CROS_EC_REBOOT_H +#define __CROS_EC_REBOOT_H void emulator_reboot(void); diff --git a/chip/it83xx/ec2i_chip.h b/chip/it83xx/ec2i_chip.h index d584973ef7..953903226b 100644 --- a/chip/it83xx/ec2i_chip.h +++ b/chip/it83xx/ec2i_chip.h @@ -5,8 +5,8 @@ /* EC2I control module for IT83xx. */ -#ifndef __CROS_EC_IT83XX_EC2I_H -#define __CROS_EC_IT83XX_EC2I_H +#ifndef __CROS_EC_EC2I_CHIP_H +#define __CROS_EC_EC2I_CHIP_H /* Index list of the host interface registers of PNPCFG */ enum host_pnpcfg_index { @@ -123,4 +123,4 @@ enum ec2i_message ec2i_write(enum host_pnpcfg_index index, uint8_t data); /* EC2I read */ enum ec2i_message ec2i_read(enum host_pnpcfg_index index); -#endif /* __CROS_EC_IT83XX_EC2I_H */ +#endif /* __CROS_EC_EC2I_CHIP_H */ diff --git a/chip/it83xx/intc.h b/chip/it83xx/intc.h index 8d125eb943..274c1a129a 100644 --- a/chip/it83xx/intc.h +++ b/chip/it83xx/intc.h @@ -5,8 +5,8 @@ /* INTC control module for IT83xx. */ -#ifndef __CROS_EC_IT83XX_INTC_H -#define __CROS_EC_IT83XX_INTC_H +#ifndef __CROS_EC_INTC_H +#define __CROS_EC_INTC_H void lpc_kbc_ibf_interrupt(void); void lpc_kbc_obe_interrupt(void); @@ -17,4 +17,4 @@ void pm4_ibf_interrupt(void); void pm5_ibf_interrupt(void); void lpcrst_interrupt(enum gpio_signal signal); -#endif /* __CROS_EC_IT83XX_INTC_H */ +#endif /* __CROS_EC_INTC_H */ diff --git a/chip/it83xx/kmsc_chip.h b/chip/it83xx/kmsc_chip.h index 348cf34204..cf4169a1c4 100644 --- a/chip/it83xx/kmsc_chip.h +++ b/chip/it83xx/kmsc_chip.h @@ -5,9 +5,9 @@ /* Keyboard matrix scan control module for IT83xx. */ -#ifndef __CROS_EC_IT83XX_KMSC_H -#define __CROS_EC_IT83XX_KMSC_H +#ifndef __CROS_EC_KMSC_CHIP_H +#define __CROS_EC_KMSC_CHIP_H void keyboard_raw_interrupt(void); -#endif /* __CROS_EC_IT83XX_KMSC_H */ +#endif /* __CROS_EC_KMSC_CHIP_H */ diff --git a/chip/it83xx/pwm_chip.h b/chip/it83xx/pwm_chip.h index d3c31a53fb..3c17b00125 100644 --- a/chip/it83xx/pwm_chip.h +++ b/chip/it83xx/pwm_chip.h @@ -5,8 +5,8 @@ /* PWM control module for IT83xx. */ -#ifndef __CROS_EC_IT83XX_PWM_H -#define __CROS_EC_IT83XX_PWM_H +#ifndef __CROS_EC_PWM_CHIP_H +#define __CROS_EC_PWM_CHIP_H /* Data structure to define PWM channel control registers. */ struct pwm_ctrl_t { @@ -42,4 +42,4 @@ struct pwm_t { extern const struct pwm_t pwm_channels[]; -#endif /* __CROS_EC_IT83XX_PWM_H */ +#endif /* __CROS_EC_PWM_CHIP_H */ diff --git a/chip/lm4/pwm_chip.h b/chip/lm4/pwm_chip.h index ac83fcf7da..a30457b629 100644 --- a/chip/lm4/pwm_chip.h +++ b/chip/lm4/pwm_chip.h @@ -5,8 +5,8 @@ /* LM4-specific PWM module for Chrome EC */ -#ifndef __CROS_EC_LM4_PWM_H -#define __CROS_EC_LM4_PWM_H +#ifndef __CROS_EC_PWM_CHIP_H +#define __CROS_EC_PWM_CHIP_H /* Data structure to define PWM channels. */ struct pwm_t { @@ -18,4 +18,4 @@ struct pwm_t { extern const struct pwm_t pwm_channels[]; -#endif /* __CROS_EC_LM4_PWM_H */ +#endif /* __CROS_EC_PWM_CHIP_H */ diff --git a/chip/mec1322/pwm_chip.h b/chip/mec1322/pwm_chip.h index 7c59b1004f..8ffdbef5b6 100644 --- a/chip/mec1322/pwm_chip.h +++ b/chip/mec1322/pwm_chip.h @@ -4,8 +4,8 @@ */ /* MEC1322-specific PWM module for Chrome EC */ -#ifndef __CROS_EC_MEC1322_PWM_H -#define __CROS_EC_MEC1322_PWM_H +#ifndef __CROS_EC_PWM_CHIP_H +#define __CROS_EC_PWM_CHIP_H /* Data structure to define PWM channels. */ struct pwm_t { @@ -18,4 +18,4 @@ struct pwm_t { extern const struct pwm_t pwm_channels[]; -#endif /* __CROS_EC_MEC1322_PWM_H */ +#endif /* __CROS_EC_PWM_CHIP_H */ diff --git a/chip/npcx/clock_chip.h b/chip/npcx/clock_chip.h index ffc5958869..3b2b847dc0 100644 --- a/chip/npcx/clock_chip.h +++ b/chip/npcx/clock_chip.h @@ -5,8 +5,8 @@ /* NPCX-specific clock module for Chrome EC */ -#ifndef CLOCK_CHIP_H_ -#define CLOCK_CHIP_H_ +#ifndef __CROS_EC_CLOCK_CHIP_H +#define __CROS_EC_CLOCK_CHIP_H /** * Return the current APB1 clock frequency in Hz. @@ -18,4 +18,4 @@ int clock_get_apb1_freq(void); */ int clock_get_apb2_freq(void); -#endif /* CLOCK_CHIP_H_ */ +#endif /* __CROS_EC_CLOCK_CHIP_H */ diff --git a/chip/npcx/fan_chip.h b/chip/npcx/fan_chip.h index b6af2a7c2e..02c86bc9d4 100644 --- a/chip/npcx/fan_chip.h +++ b/chip/npcx/fan_chip.h @@ -5,8 +5,8 @@ /* NPCX-specific MFT module for Chrome EC */ -#ifndef __CROS_EC_NPCX_FAN_H -#define __CROS_EC_NPCX_FAN_H +#ifndef __CROS_EC_FAN_CHIP_H +#define __CROS_EC_FAN_CHIP_H /* MFT module select */ enum npcx_mft_module { @@ -59,4 +59,4 @@ struct tacho_status_t { extern const struct mft_t mft_channels[]; -#endif /* __CROS_EC_NPCX_FAN_H */ +#endif /* __CROS_EC_FAN_CHIP_H */ diff --git a/chip/npcx/hwtimer_chip.h b/chip/npcx/hwtimer_chip.h index 490d67b80d..732ef8fac4 100644 --- a/chip/npcx/hwtimer_chip.h +++ b/chip/npcx/hwtimer_chip.h @@ -5,8 +5,8 @@ /* NPCX-specific hwtimer module for Chrome EC */ -#ifndef HWTIMER_CHIP_H_ -#define HWTIMER_CHIP_H_ +#ifndef __CROS_EC_HWTIMER_CHIP_H +#define __CROS_EC_HWTIMER_CHIP_H /* Channel definition for ITIM16 */ #define ITIM_TIME_NO ITIM16_1 @@ -25,4 +25,4 @@ void init_hw_timer(int itim_no, enum ITIM16_SOURCE_CLOCK_T source); /* Returns time delay cause of deep idle */ uint32_t __hw_clock_get_sleep_time(void); -#endif /* HWTIMER_CHIP_H_ */ +#endif /* __CROS_EC_HWTIMER_CHIP_H */ diff --git a/chip/npcx/lfw/ec_lfw.h b/chip/npcx/lfw/ec_lfw.h index 857135d6d0..a1a02b5f6f 100644 --- a/chip/npcx/lfw/ec_lfw.h +++ b/chip/npcx/lfw/ec_lfw.h @@ -5,8 +5,8 @@ * NPCX5M5G SoC little FW used by booter */ -#ifndef __CROS_EC_LFW_H_ -#define __CROS_EC_LFW_H_ +#ifndef __CROS_EC_EC_LFW_H +#define __CROS_EC_EC_LFW_H /* Begin address for the .iram section; defined in linker script */ extern unsigned int __iram_fw_start; @@ -15,4 +15,4 @@ extern unsigned int __iram_fw_end; /* Begin address for the iram codes; defined in linker script */ extern unsigned int __flash_fw_start; -#endif /* __CROS_EC_LFW_H_ */ +#endif /* __CROS_EC_EC_LFW_H */ diff --git a/chip/npcx/pwm_chip.h b/chip/npcx/pwm_chip.h index 77d6991c7b..201f628106 100644 --- a/chip/npcx/pwm_chip.h +++ b/chip/npcx/pwm_chip.h @@ -5,8 +5,8 @@ /* NPCX-specific PWM module for Chrome EC */ -#ifndef __CROS_EC_NPCX_PWM_H -#define __CROS_EC_NPCX_PWM_H +#ifndef __CROS_EC_PWM_CHIP_H +#define __CROS_EC_PWM_CHIP_H /* Data structure to define PWM channels. */ struct pwm_t { @@ -23,4 +23,4 @@ struct pwm_t { extern const struct pwm_t pwm_channels[]; void pwm_config(enum pwm_channel ch); -#endif /* __CROS_EC_NPCX_PWM_H */ +#endif /* __CROS_EC_PWM_CHIP_H */ diff --git a/chip/npcx/system_chip.h b/chip/npcx/system_chip.h index 135e2f1cd8..2cafb9649f 100644 --- a/chip/npcx/system_chip.h +++ b/chip/npcx/system_chip.h @@ -5,8 +5,8 @@ /* NPCX-specific SIB module for Chrome EC */ -#ifndef __CROS_EC_NPCX_LPC_H -#define __CROS_EC_NPCX_LPC_H +#ifndef __CROS_EC_SYSTEM_CHIP_H +#define __CROS_EC_SYSTEM_CHIP_H /* Indices for battery-backed ram (BBRAM) data position */ enum bbram_data_index { @@ -32,4 +32,4 @@ extern unsigned int __flash_lpfw_start; /* End flash address for the lpram codes; defined in linker script */ extern unsigned int __flash_lpfw_end; -#endif /* __CROS_EC_NPCX_LPC_H */ +#endif /* __CROS_EC_SYSTEM_CHIP_H */ diff --git a/chip/stm32/crc_hw.h b/chip/stm32/crc_hw.h index edaf3b5d32..d6959310d6 100644 --- a/chip/stm32/crc_hw.h +++ b/chip/stm32/crc_hw.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef _CRC_HW_H -#define _CRC_HW_H +#ifndef __CROS_EC_CRC_HW_H +#define __CROS_EC_CRC_HW_H /* CRC-32 hardware implementation with USB constants */ #include "clock.h" @@ -38,4 +38,4 @@ static inline uint32_t crc32_result(void) return STM32_CRC_DR ^ 0xFFFFFFFF; } -#endif /* _CRC_HW_H */ +#endif /* __CROS_EC_CRC_HW_H */ diff --git a/chip/stm32/pwm_chip.h b/chip/stm32/pwm_chip.h index 4e15e612c1..ac30f645ee 100644 --- a/chip/stm32/pwm_chip.h +++ b/chip/stm32/pwm_chip.h @@ -5,8 +5,8 @@ /* STM32-specific PWM module for Chrome EC */ -#ifndef __CROS_EC_STM32_PWM_H -#define __CROS_EC_STM32_PWM_H +#ifndef __CROS_EC_PWM_CHIP_H +#define __CROS_EC_PWM_CHIP_H /* Data structure to define PWM channels. */ struct pwm_t { @@ -36,4 +36,4 @@ extern const struct pwm_t pwm_channels[]; /* Plain ID mapping for readability */ #define STM32_TIM_CH(x) (x) -#endif /* __CROS_EC_STM32_PWM_H */ +#endif /* __CROS_EC_PWM_CHIP_H */ diff --git a/chip/stm32/usart-stm32f.h b/chip/stm32/usart-stm32f.h index e576c007b3..5b0abe0a01 100644 --- a/chip/stm32/usart-stm32f.h +++ b/chip/stm32/usart-stm32f.h @@ -2,8 +2,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef CHIP_STM32_USART_STM32F_H -#define CHIP_STM32_USART_STM32F_H +#ifndef __CROS_EC_USART_STM32F_H +#define __CROS_EC_USART_STM32F_H #include "usart.h" @@ -17,4 +17,4 @@ extern struct usart_hw_config const usart1_hw; extern struct usart_hw_config const usart2_hw; extern struct usart_hw_config const usart3_hw; -#endif /* CHIP_STM32_USART_STM32F_H */ +#endif /* __CROS_EC_USART_STM32F_H */ diff --git a/chip/stm32/usart-stm32f0.h b/chip/stm32/usart-stm32f0.h index f87d0dc590..4c4e9ad93e 100644 --- a/chip/stm32/usart-stm32f0.h +++ b/chip/stm32/usart-stm32f0.h @@ -2,8 +2,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef CHIP_STM32_USART_STM32F0_H -#define CHIP_STM32_USART_STM32F0_H +#ifndef __CROS_EC_USART_STM32F0_H +#define __CROS_EC_USART_STM32F0_H #include "usart.h" @@ -18,4 +18,4 @@ extern struct usart_hw_config const usart2_hw; extern struct usart_hw_config const usart3_hw; extern struct usart_hw_config const usart4_hw; -#endif /* CHIP_STM32_USART_STM32F0_H */ +#endif /* __CROS_EC_USART_STM32F0_H */ diff --git a/chip/stm32/usart-stm32f3.h b/chip/stm32/usart-stm32f3.h index ebf972aab9..9399b339a2 100644 --- a/chip/stm32/usart-stm32f3.h +++ b/chip/stm32/usart-stm32f3.h @@ -2,8 +2,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef CHIP_STM32_USART_STM32F3_H -#define CHIP_STM32_USART_STM32F3_H +#ifndef __CROS_EC_USART_STM32F3_H +#define __CROS_EC_USART_STM32F3_H #include "usart.h" @@ -17,4 +17,4 @@ extern struct usart_hw_config const usart1_hw; extern struct usart_hw_config const usart2_hw; extern struct usart_hw_config const usart3_hw; -#endif /* CHIP_STM32_USART_STM32F3_H */ +#endif /* __CROS_EC_USART_STM32F3_H */ diff --git a/chip/stm32/usart-stm32l.h b/chip/stm32/usart-stm32l.h index 2011a6517d..ca97bb0912 100644 --- a/chip/stm32/usart-stm32l.h +++ b/chip/stm32/usart-stm32l.h @@ -2,8 +2,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef CHIP_STM32_USART_STM32L_H -#define CHIP_STM32_USART_STM32L_H +#ifndef __CROS_EC_USART_STM32L_H +#define __CROS_EC_USART_STM32L_H #include "usart.h" @@ -17,4 +17,4 @@ extern struct usart_hw_config const usart1_hw; extern struct usart_hw_config const usart2_hw; extern struct usart_hw_config const usart3_hw; -#endif /* CHIP_STM32_USART_STM32L_H */ +#endif /* __CROS_EC_USART_STM32L_H */ diff --git a/chip/stm32/usart.h b/chip/stm32/usart.h index 79a87331bd..625f6e970f 100644 --- a/chip/stm32/usart.h +++ b/chip/stm32/usart.h @@ -2,8 +2,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef CHIP_STM32_USART_H -#define CHIP_STM32_USART_H +#ifndef __CROS_EC_USART_H +#define __CROS_EC_USART_H /* STM32 USART driver for Chrome EC */ @@ -158,4 +158,4 @@ void usart_interrupt(struct usart_config const *config); void usart_set_baud_f0_l(struct usart_config const *config, int frequency_hz); void usart_set_baud_f(struct usart_config const *config, int frequency_hz); -#endif /* CHIP_STM32_USART_H */ +#endif /* __CROS_EC_USART_H */ diff --git a/chip/stm32/usb-stream.h b/chip/stm32/usb-stream.h index 97816afa05..c99fd3e695 100644 --- a/chip/stm32/usb-stream.h +++ b/chip/stm32/usb-stream.h @@ -2,8 +2,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef CHIP_STM32_USB_STREAM_H -#define CHIP_STM32_USB_STREAM_H +#ifndef __CROS_EC_USB_STREAM_H +#define __CROS_EC_USB_STREAM_H /* STM32 USB STREAM driver for Chrome EC */ @@ -206,4 +206,4 @@ void usb_stream_tx(struct usb_stream_config const *config); void usb_stream_rx(struct usb_stream_config const *config); void usb_stream_reset(struct usb_stream_config const *config); -#endif /* CHIP_STM32_USB_STREAM_H */ +#endif /* __CROS_EC_USB_STREAM_H */ diff --git a/chip/stm32/usb_gpio.h b/chip/stm32/usb_gpio.h index 56f3d72c57..1bddf65734 100644 --- a/chip/stm32/usb_gpio.h +++ b/chip/stm32/usb_gpio.h @@ -2,8 +2,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef CHIP_STM32_USB_GPIO_H -#define CHIP_STM32_USB_GPIO_H +#ifndef __CROS_EC_USB_GPIO_H +#define __CROS_EC_USB_GPIO_H /* STM32 USB GPIO driver for Chrome EC */ @@ -125,4 +125,4 @@ void usb_gpio_tx(struct usb_gpio_config const *config); void usb_gpio_rx(struct usb_gpio_config const *config); void usb_gpio_reset(struct usb_gpio_config const *config); -#endif /* CHIP_STM32_USB_GPIO_H */ +#endif /* __CROS_EC_USB_GPIO_H */ diff --git a/chip/stm32/usb_spi.h b/chip/stm32/usb_spi.h index 76719c6d2c..615bbf663e 100644 --- a/chip/stm32/usb_spi.h +++ b/chip/stm32/usb_spi.h @@ -2,8 +2,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef CHIP_STM32_USB_SPI_H -#define CHIP_STM32_USB_SPI_H +#ifndef __CROS_EC_USB_SPI_H +#define __CROS_EC_USB_SPI_H /* STM32 USB SPI driver for Chrome EC */ @@ -233,4 +233,4 @@ int usb_spi_interface(struct usb_spi_config const *config, void usb_spi_board_enable(struct usb_spi_config const *config); void usb_spi_board_disable(struct usb_spi_config const *config); -#endif /* CHIP_STM32_USB_SPI_H */ +#endif /* __CROS_EC_USB_SPI_H */ diff --git a/core/cortex-m/config_core.h b/core/cortex-m/config_core.h index e72f4e58bb..b7a75db960 100644 --- a/core/cortex-m/config_core.h +++ b/core/cortex-m/config_core.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef __CONFIG_CORE_H -#define __CONFIG_CORE_H +#ifndef __CROS_EC_CONFIG_CORE_H +#define __CROS_EC_CONFIG_CORE_H /* Linker binary architecture and format */ #define BFD_ARCH arm @@ -12,4 +12,4 @@ #define CONFIG_SOFTWARE_PANIC -#endif /* __CONFIG_CORE_H */ +#endif /* __CROS_EC_CONFIG_CORE_H */ diff --git a/core/cortex-m/cpu.h b/core/cortex-m/cpu.h index 5b1046b42f..e170d42782 100644 --- a/core/cortex-m/cpu.h +++ b/core/cortex-m/cpu.h @@ -5,8 +5,8 @@ * Registers map and defintions for Cortex-MLM4x processor */ -#ifndef __CPU_H -#define __CPU_H +#ifndef __CROS_EC_CPU_H +#define __CROS_EC_CPU_H #include <stdint.h> @@ -50,4 +50,4 @@ enum { /* Set up the cpu to detect faults */ void cpu_init(void); -#endif /* __CPU_H */ +#endif /* __CROS_EC_CPU_H */ diff --git a/core/cortex-m/include/math.h b/core/cortex-m/include/math.h index 485f28ba23..fbcd06e233 100644 --- a/core/cortex-m/include/math.h +++ b/core/cortex-m/include/math.h @@ -5,8 +5,8 @@ /* Math utility functions for ARMv7 */ -#ifndef __EC_MATH_H -#define __EC_MATH_H +#ifndef __CROS_EC_MATH_H +#define __CROS_EC_MATH_H #ifdef CONFIG_FPU static inline float sqrtf(float v) @@ -21,4 +21,4 @@ static inline float sqrtf(float v) } #endif /* CONFIG_FPU */ -#endif /* __EC_MATH_H */ +#endif /* __CROS_EC_MATH_H */ diff --git a/core/cortex-m/irq_handler.h b/core/cortex-m/irq_handler.h index 602c3245e4..0d659b0610 100644 --- a/core/cortex-m/irq_handler.h +++ b/core/cortex-m/irq_handler.h @@ -5,8 +5,8 @@ /* Helper to declare IRQ handling routines */ -#ifndef __IRQ_HANDLER_H -#define __IRQ_HANDLER_H +#ifndef __CROS_EC_IRQ_HANDLER_H +#define __CROS_EC_IRQ_HANDLER_H #ifdef CONFIG_TASK_PROFILING #define bl_task_start_irq_handler "bl task_start_irq_handler\n" @@ -38,4 +38,4 @@ const struct irq_priority IRQ_PRIORITY(irq) \ __attribute__((section(".rodata.irqprio"))) \ = {irq, priority} -#endif /* __IRQ_HANDLER_H */ +#endif /* __CROS_EC_IRQ_HANDLER_H */ diff --git a/core/cortex-m0/config_core.h b/core/cortex-m0/config_core.h index 9c04d467e3..e58b481704 100644 --- a/core/cortex-m0/config_core.h +++ b/core/cortex-m0/config_core.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef __CONFIG_CORE_H -#define __CONFIG_CORE_H +#ifndef __CROS_EC_CONFIG_CORE_H +#define __CROS_EC_CONFIG_CORE_H /* Linker binary architecture and format */ #define BFD_ARCH arm @@ -14,4 +14,4 @@ #define CONFIG_SOFTWARE_CLZ #define CONFIG_SOFTWARE_PANIC -#endif /* __CONFIG_CORE_H */ +#endif /* __CROS_EC_CONFIG_CORE_H */ diff --git a/core/cortex-m0/cpu.h b/core/cortex-m0/cpu.h index 18686dee1c..8df6fa5d27 100644 --- a/core/cortex-m0/cpu.h +++ b/core/cortex-m0/cpu.h @@ -5,8 +5,8 @@ * Registers map and definitions for Cortex-M0 processor */ -#ifndef __CPU_H -#define __CPU_H +#ifndef __CROS_EC_CPU_H +#define __CROS_EC_CPU_H #include <stdint.h> @@ -36,4 +36,4 @@ /* Set up the cpu to detect faults */ void cpu_init(void); -#endif /* __CPU_H */ +#endif /* __CROS_EC_CPU_H */ diff --git a/core/cortex-m0/irq_handler.h b/core/cortex-m0/irq_handler.h index f6742f5c82..7acf640c02 100644 --- a/core/cortex-m0/irq_handler.h +++ b/core/cortex-m0/irq_handler.h @@ -5,8 +5,8 @@ /* Helper to declare IRQ handling routines */ -#ifndef __IRQ_HANDLER_H -#define __IRQ_HANDLER_H +#ifndef __CROS_EC_IRQ_HANDLER_H +#define __CROS_EC_IRQ_HANDLER_H #include "cpu.h" @@ -39,4 +39,4 @@ __attribute__((section(".rodata.irqprio"))) \ = {irq, priority} #endif /* CONFIG_TASK_PROFILING */ -#endif /* __IRQ_HANDLER_H */ +#endif /* __CROS_EC_IRQ_HANDLER_H */ diff --git a/core/host/cpu.h b/core/host/cpu.h index 4e43da623f..cb4ee7239a 100644 --- a/core/host/cpu.h +++ b/core/host/cpu.h @@ -5,9 +5,9 @@ /* CPU specific header file */ -#ifndef __CPU_H -#define __CPU_H +#ifndef __CROS_EC_CPU_H +#define __CROS_EC_CPU_H static inline void cpu_init(void) { } -#endif /* __CPU_H */ +#endif /* __CROS_EC_CPU_H */ diff --git a/core/host/irq_handler.h b/core/host/irq_handler.h index d778ccf253..738d28cbeb 100644 --- a/core/host/irq_handler.h +++ b/core/host/irq_handler.h @@ -5,8 +5,8 @@ /* Helper to declare IRQ handling routines */ -#ifndef __IRQ_HANDLER_H -#define __IRQ_HANDLER_H +#ifndef __CROS_EC_IRQ_HANDLER_H +#define __CROS_EC_IRQ_HANDLER_H /* Helper macros to build the IRQ handler and priority struct names */ #define IRQ_HANDLER(irqname) CONCAT3(irq_, irqname, _handler) @@ -26,4 +26,4 @@ const struct irq_priority IRQ_PRIORITY(irq) \ __attribute__((section(".rodata.irqprio"))) \ = {irq, priority} -#endif /* __IRQ_HANDLER_H */ +#endif /* __CROS_EC_IRQ_HANDLER_H */ diff --git a/core/nds32/config_core.h b/core/nds32/config_core.h index 750d47b016..f2e16eaf79 100644 --- a/core/nds32/config_core.h +++ b/core/nds32/config_core.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef __CONFIG_CORE_H -#define __CONFIG_CORE_H +#ifndef __CROS_EC_CONFIG_CORE_H +#define __CROS_EC_CONFIG_CORE_H /* Linker binary architecture and format */ #define BFD_ARCH nds32 @@ -29,4 +29,4 @@ ((typeof(var))(*__ptr_val)); \ }) -#endif /* __CONFIG_CORE_H */ +#endif /* __CROS_EC_CONFIG_CORE_H */ diff --git a/core/nds32/cpu.h b/core/nds32/cpu.h index b22ad62cbf..ada87cf716 100644 --- a/core/nds32/cpu.h +++ b/core/nds32/cpu.h @@ -5,8 +5,8 @@ * Registers map and defintions for Andes cores */ -#ifndef __CPU_H -#define __CPU_H +#ifndef __CROS_EC_CPU_H +#define __CROS_EC_CPU_H #include <stdint.h> @@ -54,4 +54,4 @@ static inline uint32_t get_itype(void) /* Generic CPU core initialization */ void cpu_init(void); -#endif /* __CPU_H */ +#endif /* __CROS_EC_CPU_H */ diff --git a/core/nds32/irq_chip.h b/core/nds32/irq_chip.h index fb3bf1b21b..e7b67317a8 100644 --- a/core/nds32/irq_chip.h +++ b/core/nds32/irq_chip.h @@ -5,8 +5,8 @@ * Chip-specific part of the IRQ handling. */ -#ifndef __IRQ_CHIP_H -#define __IRQ_CHIP_H +#ifndef __CROS_EC_IRQ_CHIP_H +#define __CROS_EC_IRQ_CHIP_H /** * Enable an IRQ in the chip interrupt controller. @@ -51,4 +51,4 @@ int chip_trigger_irq(int irq); */ void chip_init_irqs(void); -#endif /* __IRQ_CHIP_H */ +#endif /* __CROS_EC_IRQ_CHIP_H */ diff --git a/core/nds32/irq_handler.h b/core/nds32/irq_handler.h index c3d22cc177..2cf10256a0 100644 --- a/core/nds32/irq_handler.h +++ b/core/nds32/irq_handler.h @@ -5,8 +5,8 @@ /* Helper to declare IRQ handling routines */ -#ifndef __IRQ_HANDLER_H -#define __IRQ_HANDLER_H +#ifndef __CROS_EC_IRQ_HANDLER_H +#define __CROS_EC_IRQ_HANDLER_H /* Helper macros to build the IRQ handler and priority struct names */ #define IRQ_HANDLER(irqname) CONCAT3(irq_, irqname, _handler) @@ -22,4 +22,4 @@ __attribute__((section(".rodata.irqprio"))) \ = {CPU_INT(irq), priority} -#endif /* __IRQ_HANDLER_H */ +#endif /* __CROS_EC_IRQ_HANDLER_H */ diff --git a/driver/accelgyro_bmi160.h b/driver/accelgyro_bmi160.h index 51675d3248..9ef23864d8 100644 --- a/driver/accelgyro_bmi160.h +++ b/driver/accelgyro_bmi160.h @@ -5,8 +5,8 @@ /* BMI160 accelerometer and gyro and BMM150 compass module for Chrome EC */ -#ifndef __CROS_EC_ACCEL_BMI160_H -#define __CROS_EC_ACCEL_BMI160_H +#ifndef __CROS_EC_ACCELGYRO_BMI160_H +#define __CROS_EC_ACCELGYRO_BMI160_H #include "accelgyro.h" @@ -285,4 +285,4 @@ struct bmi160_drv_data_t { struct motion_data_t saved_data[3]; uint8_t flags; }; -#endif /* __CROS_EC_ACCEL_BMI160_H */ +#endif /* __CROS_EC_ACCELGYRO_BMI160_H */ diff --git a/driver/accelgyro_lsm6ds0.h b/driver/accelgyro_lsm6ds0.h index c71fc37767..93e21f55de 100644 --- a/driver/accelgyro_lsm6ds0.h +++ b/driver/accelgyro_lsm6ds0.h @@ -5,8 +5,8 @@ /* LSM6DS0 accelerometer and gyro module for Chrome EC */ -#ifndef __CROS_EC_ACCEL_LSM6DS0_H -#define __CROS_EC_ACCEL_LSM6DS0_H +#ifndef __CROS_EC_ACCELGYRO_LSM6DS0_H +#define __CROS_EC_ACCELGYRO_LSM6DS0_H #include "task.h" @@ -118,4 +118,4 @@ enum lsm6ds0_bdu { extern const struct accelgyro_drv lsm6ds0_drv; -#endif /* __CROS_EC_ACCEL_LSM6DS0_H */ +#endif /* __CROS_EC_ACCELGYRO_LSM6DS0_H */ diff --git a/driver/als_isl29035.h b/driver/als_isl29035.h index 212af7a50f..0546ceb2d2 100644 --- a/driver/als_isl29035.h +++ b/driver/als_isl29035.h @@ -5,9 +5,9 @@ * Intersil ILS29035 light sensor driver */ -#ifndef __CROS_EC_ALS_ILS29035_H -#define __CROS_EC_ALS_ILS29035_H +#ifndef __CROS_EC_ALS_ISL29035_H +#define __CROS_EC_ALS_ISL29035_H int isl29035_read_lux(int *lux, int af); -#endif /* __CROS_EC_ALS_ILS29035_H */ +#endif /* __CROS_EC_ALS_ISL29035_H */ diff --git a/driver/battery/sb_fw_update.h b/driver/battery/sb_fw_update.h index aaf2c88da0..c4c794e28c 100644 --- a/driver/battery/sb_fw_update.h +++ b/driver/battery/sb_fw_update.h @@ -40,8 +40,8 @@ * 9. cmd.0x35.read.status */ -#ifndef __EC_SB_FW_UPDATE__ -#define __EC_SB_FW_UPDATE__ +#ifndef __CROS_EC_SB_FW_UPDATE_H +#define __CROS_EC_SB_FW_UPDATE_H #define SB_FW_UPDATE_CMD_WRITE_WORD 0x35 #define SB_FW_UPDATE_CMD_WRITE_WORD_PREPARE 0x1000 diff --git a/driver/charger/bq24192.h b/driver/charger/bq24192.h index 4177dc5c2c..6cf5fdecdb 100644 --- a/driver/charger/bq24192.h +++ b/driver/charger/bq24192.h @@ -5,8 +5,8 @@ * TI bq24192 battery charger driver. */ -#ifndef __CROS_EC_CHARGER_BQ24192_H -#define __CROS_EC_CHARGER_BQ24192_H +#ifndef __CROS_EC_BQ24192_H +#define __CROS_EC_BQ24192_H #define BQ24192_ADDR 0xd6 @@ -25,4 +25,4 @@ #define BQ24192_DEVICE_ID 0x2b -#endif /* __CROS_EC_CHARGER_BQ24192_H */ +#endif /* __CROS_EC_BQ24192_H */ diff --git a/driver/charger/bq24707a.h b/driver/charger/bq24707a.h index 744e991283..14e89ed136 100644 --- a/driver/charger/bq24707a.h +++ b/driver/charger/bq24707a.h @@ -5,8 +5,8 @@ * TI bq24707A battery charger driver. */ -#ifndef __CROS_EC_CHARGER_BQ24707A_H -#define __CROS_EC_CHARGER_BQ24707A_H +#ifndef __CROS_EC_BQ24707A_H +#define __CROS_EC_BQ24707A_H /* Chip specific commands */ #define BQ24707_CHARGE_OPTION 0x12 @@ -40,5 +40,5 @@ #define CHARGE_WATCHDOG_88SEC (2 << 13) #define CHARGE_WATCHDOG_175SEC_DEFAULT (3 << 13) -#endif /* __CROS_EC_CHARGER_BQ24707A_H */ +#endif /* __CROS_EC_BQ24707A_H */ diff --git a/driver/charger/bq24715.h b/driver/charger/bq24715.h index 470c454f4d..bb5deec902 100644 --- a/driver/charger/bq24715.h +++ b/driver/charger/bq24715.h @@ -5,8 +5,8 @@ * TI bq24715 battery charger driver. */ -#ifndef __CROS_EC_CHARGER_BQ24715_H -#define __CROS_EC_CHARGER_BQ24715_H +#ifndef __CROS_EC_BQ24715_H +#define __CROS_EC_BQ24715_H /* NOTES: * If battery is not present keep charge current register (0x14) at 0. @@ -127,4 +127,4 @@ #define INPUT_I_MAX (8064) #define INPUT_I_STEP (64) -#endif /* __CROS_EC_CHARGER_BQ24715_H */ +#endif /* __CROS_EC_BQ24715_H */ diff --git a/driver/charger/bq24725.h b/driver/charger/bq24725.h index 3deb41d125..b935501a20 100644 --- a/driver/charger/bq24725.h +++ b/driver/charger/bq24725.h @@ -5,8 +5,8 @@ * TI bq24725 battery charger driver. */ -#ifndef __CROS_EC_CHARGER_BQ24725_H -#define __CROS_EC_CHARGER_BQ24725_H +#ifndef __CROS_EC_BQ24725_H +#define __CROS_EC_BQ24725_H /* Chip specific commands */ #define BQ24725_CHARGE_OPTION 0x12 @@ -46,5 +46,5 @@ #define CHARGE_WATCHDOG_88SEC (2 << 13) #define CHARGE_WATCHDOG_175SEC_DEFAULT (3 << 13) -#endif /* __CROS_EC_CHARGER_BQ24725_H */ +#endif /* __CROS_EC_BQ24725_H */ diff --git a/driver/charger/bq24735.h b/driver/charger/bq24735.h index 914ff2b903..05336cb41c 100644 --- a/driver/charger/bq24735.h +++ b/driver/charger/bq24735.h @@ -5,8 +5,8 @@ * TI bq24735 battery charger driver. */ -#ifndef __CROS_EC_CHARGER_BQ24735_H -#define __CROS_EC_CHARGER_BQ24735_H +#ifndef __CROS_EC_BQ24735_H +#define __CROS_EC_BQ24735_H /* Chip specific commands */ #define BQ24735_CHARGE_OPTION 0x12 @@ -54,4 +54,4 @@ #define ACPRES_DEGLITCH_150MS (0 << 15) #define ACPRES_DEGLITCH_1300MS_DEFAULT (1 << 15) -#endif /* __CROS_EC_CHARGER_BQ24735_H */ +#endif /* __CROS_EC_BQ24735_H */ diff --git a/driver/charger/bq24738.h b/driver/charger/bq24738.h index bb07f90480..a40a9e193f 100644 --- a/driver/charger/bq24738.h +++ b/driver/charger/bq24738.h @@ -5,8 +5,8 @@ * TI bq24738 battery charger driver. */ -#ifndef __CROS_EC_CHARGER_BQ24738_H -#define __CROS_EC_CHARGER_BQ24738_H +#ifndef __CROS_EC_BQ24738_H +#define __CROS_EC_BQ24738_H /* Chip specific commands */ #define BQ24738_CHARGE_OPTION 0x12 @@ -54,4 +54,4 @@ #define ACPRES_DEGLITCH_150MS (0 << 15) #define ACPRES_DEGLITCH_1300MS_DEFAULT (1 << 15) -#endif /* __CROS_EC_CHARGER_BQ24738_H */ +#endif /* __CROS_EC_BQ24738_H */ diff --git a/driver/charger/bq24773.h b/driver/charger/bq24773.h index 944ac2a814..50723d145f 100644 --- a/driver/charger/bq24773.h +++ b/driver/charger/bq24773.h @@ -5,8 +5,8 @@ * TI bq24773 battery charger driver. */ -#ifndef __CROS_EC_CHARGER_BQ24773_H -#define __CROS_EC_CHARGER_BQ24773_H +#ifndef __CROS_EC_BQ24773_H +#define __CROS_EC_BQ24773_H /* for i2c_read and i2c_write functions. */ #include "i2c.h" @@ -119,4 +119,4 @@ static inline int raw_write16(int offset, int value) return i2c_write16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER, offset, value); } -#endif /* __CROS_EC_CHARGER_BQ24773_H */ +#endif /* __CROS_EC_BQ24773_H */ diff --git a/driver/charger/bq2589x.h b/driver/charger/bq2589x.h index b7959238e0..fd5119536c 100644 --- a/driver/charger/bq2589x.h +++ b/driver/charger/bq2589x.h @@ -5,8 +5,8 @@ * TI bq25890/bq25892/bq25895 battery charger driver. */ -#ifndef __CROS_EC_CHARGER_BQ2589X_H -#define __CROS_EC_CHARGER_BQ2589X_H +#ifndef __CROS_EC_BQ2589X_H +#define __CROS_EC_BQ2589X_H /* Registers */ #define BQ2589X_REG_INPUT_CURR 0x00 @@ -77,4 +77,4 @@ #error BQ2589X unknown variant #endif -#endif /* __CROS_EC_CHARGER_BQ2589X_H */ +#endif /* __CROS_EC_BQ2589X_H */ diff --git a/driver/charger/isl9237.h b/driver/charger/isl9237.h index 30e5ed970d..f0b352e4b0 100644 --- a/driver/charger/isl9237.h +++ b/driver/charger/isl9237.h @@ -5,8 +5,8 @@ * Intersil ISL-9237 battery charger driver. */ -#ifndef __CROS_EC_CHARGER_ISL9237_H -#define __CROS_EC_CHARGER_ISL9237_H +#ifndef __CROS_EC_ISL9237_H +#define __CROS_EC_ISL9237_H #define ISL9237_ADDR 0x12 /* 7bit address 0001001 */ @@ -247,4 +247,4 @@ enum isl9237_fsm_state { #define INPUT_I_STEP 4 #define I2C_ADDR_CHARGER ISL9237_ADDR -#endif /* __CROS_EC_CHARGER_ISL9237_H */ +#endif /* __CROS_EC_ISL9237_H */ diff --git a/driver/ina2xx.h b/driver/ina2xx.h index 25b9f13296..b1ddbd1368 100644 --- a/driver/ina2xx.h +++ b/driver/ina2xx.h @@ -5,8 +5,8 @@ * TI INA219/231 Current/Power monitor driver. */ -#ifndef INA2XX_H -#define INA2XX_H +#ifndef __CROS_EC_INA2XX_H +#define __CROS_EC_INA2XX_H #define INA2XX_REG_CONFIG 0x00 #define INA2XX_REG_SHUNT_VOLT 0x01 @@ -108,4 +108,4 @@ int ina2xx_get_current(uint8_t idx); /* Return power in milliWatts */ int ina2xx_get_power(uint8_t idx); -#endif /* INA2XX_H */ +#endif /* __CROS_EC_INA2XX_H */ diff --git a/driver/ioexpander_pca9534.h b/driver/ioexpander_pca9534.h index 70b3e57662..d8cf896a49 100644 --- a/driver/ioexpander_pca9534.h +++ b/driver/ioexpander_pca9534.h @@ -5,8 +5,8 @@ * NXP PCA9534 I/O expander */ -#ifndef PCA9534_H -#define PCA9534_H +#ifndef __CROS_EC_IOEXPANDER_PCA9534_H +#define __CROS_EC_IOEXPANDER_PCA9534_H #define PCA9534_REG_INPUT 0x0 #define PCA9534_REG_OUTPUT 0x1 @@ -53,4 +53,4 @@ int pca9534_set_level(int port, int addr, int pin, int level); */ int pca9534_config_pin(int port, int addr, int pin, int is_input); -#endif /* PCA9534_H */ +#endif /* __CROS_EC_IOEXPANDER_PCA9534_H */ diff --git a/driver/led/lp5562.h b/driver/led/lp5562.h index aaa32e5fb0..fc0e7ec915 100644 --- a/driver/led/lp5562.h +++ b/driver/led/lp5562.h @@ -5,8 +5,8 @@ * TI LP5562 LED driver. */ -#ifndef LP5562_H -#define LP5562_H +#ifndef __CROS_EC_LP5562_H +#define __CROS_EC_LP5562_H #define LP5562_REG_ENABLE 0x00 #define LP5562_REG_OP_MODE 0x01 @@ -73,4 +73,4 @@ int lp5562_get_pc(int engine); /* Set program counter */ int lp5562_set_pc(int engine, int val); -#endif /* LP5562_H */ +#endif /* __CROS_EC_LP5562_H */ diff --git a/driver/mcdp28x0.h b/driver/mcdp28x0.h index 9c48cab32f..dabc510a64 100644 --- a/driver/mcdp28x0.h +++ b/driver/mcdp28x0.h @@ -5,8 +5,8 @@ * Megachips DisplayPort to HDMI protocol converter / level shifter driver. */ -#ifndef MCDP28X0_H -#define MCDP28X0_H +#ifndef __CROS_EC_MCDP28X0_H +#define __CROS_EC_MCDP28X0_H #define MCDP_OUTBUF_MAX 16 #define MCDP_INBUF_MAX 16 diff --git a/driver/pi3usb30532.h b/driver/pi3usb30532.h index f99c9561bb..c24edeb976 100644 --- a/driver/pi3usb30532.h +++ b/driver/pi3usb30532.h @@ -5,8 +5,8 @@ * Pericom PI3USB30532 USB port switch driver. */ -#ifndef PI3USB30532_H -#define PI3USB30532_H +#ifndef __CROS_EC_PI3USB30532_H +#define __CROS_EC_PI3USB30532_H #include <inttypes.h> @@ -75,4 +75,4 @@ int pi3usb30532_set_switch(uint8_t chip_idx, uint8_t mode); /* Resets PI3USB30532 to power on default value */ int pi3usb30532_reset(uint8_t chip_idx); -#endif /* PI3USB30532_H */ +#endif /* __CROS_EC_PI3USB30532_H */ diff --git a/driver/pi3usb9281.h b/driver/pi3usb9281.h index 7a23a869b3..929476c81b 100644 --- a/driver/pi3usb9281.h +++ b/driver/pi3usb9281.h @@ -5,8 +5,8 @@ * Pericom PI3USB9281 USB port switch. */ -#ifndef PI3USB9281_H -#define PI3USB9281_H +#ifndef __CROS_EC_PI3USB9281_H +#define __CROS_EC_PI3USB9281_H #define PI3USB9281_REG_DEV_ID 0x01 #define PI3USB9281_REG_CONTROL 0x02 @@ -107,4 +107,4 @@ int pi3usb9281_set_switches(int port, int open); /* Reset PI3USB9281. */ int pi3usb9281_reset(int port); -#endif /* PI3USB9281_H */ +#endif /* __CROS_EC_PI3USB9281_H */ diff --git a/driver/temp_sensor/g781.h b/driver/temp_sensor/g781.h index 6463155659..c9069749d2 100644 --- a/driver/temp_sensor/g781.h +++ b/driver/temp_sensor/g781.h @@ -5,8 +5,8 @@ /* G781 temperature sensor module for Chrome EC */ -#ifndef __CROS_EC_TEMP_SENSOR_G781_H -#define __CROS_EC_TEMP_SENSOR_G781_H +#ifndef __CROS_EC_G781_H +#define __CROS_EC_G781_H #define G781_I2C_ADDR 0x98 /* 7-bit address is 0x4C */ @@ -67,4 +67,4 @@ */ int g781_get_val(int idx, int *temp_ptr); -#endif /* __CROS_EC_TEMP_SENSOR_G781_H */ +#endif /* __CROS_EC_G781_H */ diff --git a/driver/temp_sensor/tmp432.h b/driver/temp_sensor/tmp432.h index acfaf39503..94930ee108 100644 --- a/driver/temp_sensor/tmp432.h +++ b/driver/temp_sensor/tmp432.h @@ -5,8 +5,8 @@ /* TMP432 temperature sensor module for Chrome EC */ -#ifndef __CROS_EC_TEMP_SENSOR_TMP432_H -#define __CROS_EC_TEMP_SENSOR_TMP432_H +#ifndef __CROS_EC_TMP432_H +#define __CROS_EC_TMP432_H #define TMP432_I2C_ADDR 0x98 /* 7-bit address is 0x4C */ @@ -93,4 +93,4 @@ */ int tmp432_get_val(int idx, int *temp_ptr); -#endif /* __CROS_EC_TEMP_SENSOR_TMP432_H */ +#endif /* __CROS_EC_TMP432_H */ diff --git a/driver/tsu6721.h b/driver/tsu6721.h index da9cbecbec..a077f9be8e 100644 --- a/driver/tsu6721.h +++ b/driver/tsu6721.h @@ -5,8 +5,8 @@ * TI TSU6721 USB port switch. */ -#ifndef TSU6721_H -#define TSU6721_H +#ifndef __CROS_EC_TSU6721_H +#define __CROS_EC_TSU6721_H #define TSU6721_REG_DEV_ID 0x01 #define TSU6721_REG_CONTROL 0x02 @@ -115,4 +115,4 @@ void tsu6721_set_pins(int mask); /* Reset TSU6721. */ void tsu6721_reset(void); -#endif /* TSU6721_H */ +#endif /* __CROS_EC_TSU6721_H */ diff --git a/extra/lightbar/simulation.h b/extra/lightbar/simulation.h index f7a30ea6a7..e851f718c5 100644 --- a/extra/lightbar/simulation.h +++ b/extra/lightbar/simulation.h @@ -3,8 +3,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef _SIMULATION_H -#define _SIMULATION_H +#ifndef __EXTRA_SIMULATION_H +#define __EXTRA_SIMULATION_H #include <stdint.h> #include <stdio.h> @@ -112,4 +112,4 @@ uint8_t *system_get_jump_tag(uint16_t tag, int *version, int *size); int fake_consolecmd_##X(int argc, char *argv[]) \ { return fn(argc, argv); } -#endif /* _SIMULATION_H */ +#endif /* __EXTRA_SIMULATION_H */ diff --git a/include/battery_smart.h b/include/battery_smart.h index 428608e5f4..c5fd1d6eec 100644 --- a/include/battery_smart.h +++ b/include/battery_smart.h @@ -5,8 +5,8 @@ * Smart battery v1.0 * Smart battery charger v1.1 */ -#ifndef __CROS_EC_SMART_BATTERY_H -#define __CROS_EC_SMART_BATTERY_H +#ifndef __CROS_EC_BATTERY_SMART_H +#define __CROS_EC_BATTERY_SMART_H #include "common.h" @@ -153,5 +153,5 @@ int sb_read_string(int port, int slave_addr, int offset, uint8_t *data, /* Write to battery */ int sb_write(int cmd, int param); -#endif /* __CROS_EC_SMART_BATTERY_H */ +#endif /* __CROS_EC_BATTERY_SMART_H */ diff --git a/include/case_closed_debug.h b/include/case_closed_debug.h index 5445022ec3..82c9c9548f 100644 --- a/include/case_closed_debug.h +++ b/include/case_closed_debug.h @@ -4,8 +4,8 @@ * * Case Closed Debug interface */ -#ifndef INCLUDE_CASE_CLOSED_DEBUG_H -#define INCLUDE_CASE_CLOSED_DEBUG_H +#ifndef __CROS_EC_CASE_CLOSED_DEBUG_H +#define __CROS_EC_CASE_CLOSED_DEBUG_H enum ccd_mode { /* @@ -33,4 +33,4 @@ enum ccd_mode { */ void ccd_set_mode(enum ccd_mode new_mode); -#endif /* INCLUDE_CASE_CLOSED_DEBUG_H */ +#endif /* __CROS_EC_CASE_CLOSED_DEBUG_H */ diff --git a/include/charge_manager.h b/include/charge_manager.h index d1bd840a9e..7661e0d7e5 100644 --- a/include/charge_manager.h +++ b/include/charge_manager.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef __CHARGE_MANAGER_H -#define __CHARGE_MANAGER_H +#ifndef __CROS_EC_CHARGE_MANAGER_H +#define __CROS_EC_CHARGE_MANAGER_H #include "common.h" @@ -82,4 +82,4 @@ void board_set_charge_limit(int charge_ma); /* Called on delayed override timeout */ void board_charge_manager_override_timeout(void); -#endif /* __CHARGE_MANAGER_H */ +#endif /* __CROS_EC_CHARGE_MANAGER_H */ diff --git a/include/charge_ramp.h b/include/charge_ramp.h index 72bcb27d1e..e7cb74b74b 100644 --- a/include/charge_ramp.h +++ b/include/charge_ramp.h @@ -5,8 +5,8 @@ /* Charge input current limit ramp header for Chrome EC */ -#ifndef __CROS_EC_CHG_RAMP_H -#define __CROS_EC_CHG_RAMP_H +#ifndef __CROS_EC_CHARGE_RAMP_H +#define __CROS_EC_CHARGE_RAMP_H #include "timer.h" @@ -100,4 +100,4 @@ static inline void chg_ramp_charge_supplier_change( #define chg_ramp_set_min_current board_set_charge_limit #endif -#endif /* __CROS_EC_CHG_RAMP_H */ +#endif /* __CROS_EC_CHARGE_RAMP_H */ diff --git a/include/compile_time_macros.h b/include/compile_time_macros.h index 9db583a7f2..074fb4b256 100644 --- a/include/compile_time_macros.h +++ b/include/compile_time_macros.h @@ -5,8 +5,8 @@ /* Handy clever tricks */ -#ifndef __CROS_EC_TRICKS_H -#define __CROS_EC_TRICKS_H +#ifndef __CROS_EC_COMPILE_TIME_MACROS_H +#define __CROS_EC_COMPILE_TIME_MACROS_H /* Test an important condition at compile time, not run time */ #define _BA1_(cond, line) \ @@ -23,4 +23,4 @@ #define offsetof(type, member) __builtin_offsetof(type, member) #endif -#endif /* __CROS_EC_TRICKS_H */ +#endif /* __CROS_EC_COMPILE_TIME_MACROS_H */ diff --git a/include/consumer.h b/include/consumer.h index d53d42a461..e66d2e769e 100644 --- a/include/consumer.h +++ b/include/consumer.h @@ -8,8 +8,8 @@ * a queue, and be notified of new additions to the queue, or of requests to * flush (empty) the queue. */ -#ifndef INCLUDE_CONSUMER_H -#define INCLUDE_CONSUMER_H +#ifndef __CROS_EC_CONSUMER_H +#define __CROS_EC_CONSUMER_H #include "queue.h" @@ -44,4 +44,4 @@ struct consumer { struct consumer_ops const *ops; }; -#endif /* INCLUDE_CONSUMER_H */ +#endif /* __CROS_EC_CONSUMER_H */ diff --git a/include/crc.h b/include/crc.h index 73289ae213..6615885f27 100644 --- a/include/crc.h +++ b/include/crc.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef _CRC_H -#define _CRC_H +#ifndef __CROS_EC_CRC_H +#define __CROS_EC_CRC_H /* CRC-32 implementation with USB constants */ /* Note: it's a stateful CRC-32 to match the hardware block interface */ @@ -24,4 +24,4 @@ uint32_t crc32_result(void); #endif /* CONFIG_HW_CRC */ -#endif /* _CRC_H */ +#endif /* __CROS_EC_CRC_H */ diff --git a/include/crc8.h b/include/crc8.h index 94980effc5..de0dc196f9 100644 --- a/include/crc8.h +++ b/include/crc8.h @@ -4,8 +4,8 @@ * * Very simple 8-bit CRC function. */ -#ifndef __EC_CRC8_H__ -#define __EC_CRC8_H__ +#ifndef __CROS_EC_CRC8_H +#define __CROS_EC_CRC8_H /** * crc8 @@ -18,4 +18,4 @@ */ uint8_t crc8(const uint8_t *data, int len); -#endif /* __EC_CRC8_H__ */ +#endif /* __CROS_EC_CRC8_H */ diff --git a/include/ec_commands.h b/include/ec_commands.h index a6441abb25..de603e6d1e 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -5,8 +5,8 @@ /* Host communication command constants for Chrome EC */ -#ifndef __CROS_EC_COMMANDS_H -#define __CROS_EC_COMMANDS_H +#ifndef __CROS_EC_EC_COMMANDS_H +#define __CROS_EC_EC_COMMANDS_H /* * Current version of this protocol @@ -3347,4 +3347,4 @@ struct ec_params_pd_write_log_entry { #define EC_LPC_ADDR_OLD_PARAM EC_HOST_CMD_REGION1 #define EC_OLD_PARAM_SIZE EC_HOST_CMD_REGION_SIZE -#endif /* __CROS_EC_COMMANDS_H */ +#endif /* __CROS_EC_EC_COMMANDS_H */ diff --git a/include/inductive_charging.h b/include/inductive_charging.h index 60872914df..5c44e410aa 100644 --- a/include/inductive_charging.h +++ b/include/inductive_charging.h @@ -7,8 +7,8 @@ #include "gpio.h" -#ifndef __INDUCTIVE_CHARGING_H -#define __INDUCTIVE_CHARGING_H +#ifndef __CROS_EC_INDUCTIVE_CHARGING_H +#define __CROS_EC_INDUCTIVE_CHARGING_H /* * Interrupt handler for inductive charging signal. diff --git a/include/math_util.h b/include/math_util.h index e7dcc6cbec..07283cf000 100644 --- a/include/math_util.h +++ b/include/math_util.h @@ -5,8 +5,8 @@ /* Header file for common math functions. */ -#ifndef __CROS_MATH_UTIL_H -#define __CROS_MATH_UTIL_H +#ifndef __CROS_EC_MATH_UTIL_H +#define __CROS_EC_MATH_UTIL_H /* Fixed-point type */ typedef int32_t fp_t; @@ -114,4 +114,4 @@ void rotate(const vector_3_t v, const matrix_3x3_t R, vector_3_t res); -#endif /* __CROS_MATH_UTIL_H */ +#endif /* __CROS_EC_MATH_UTIL_H */ diff --git a/include/pmu_tpschrome.h b/include/pmu_tpschrome.h index dc20aa8fd8..858c6ba145 100644 --- a/include/pmu_tpschrome.h +++ b/include/pmu_tpschrome.h @@ -5,8 +5,8 @@ * TPSChrome PMU APIs. */ -#ifndef __CROS_EC_TPSCHROME_H -#define __CROS_EC_TPSCHROME_H +#ifndef __CROS_EC_PMU_TPSCHROME_H +#define __CROS_EC_PMU_TPSCHROME_H #include "gpio.h" @@ -294,5 +294,5 @@ int charge_keep_power_off(void); */ int pmu_board_init(void); -#endif /* __CROS_EC_TPSCHROME_H */ +#endif /* __CROS_EC_PMU_TPSCHROME_H */ diff --git a/include/producer.h b/include/producer.h index d120fbc145..b6a04883d6 100644 --- a/include/producer.h +++ b/include/producer.h @@ -8,8 +8,8 @@ * be notified when the queue is read from so that it can take action, such as * adding new units to the queue. */ -#ifndef INCLUDE_PRODUCER_H -#define INCLUDE_PRODUCER_H +#ifndef __CROS_EC_PRODUCER_H +#define __CROS_EC_PRODUCER_H #include "queue.h" @@ -38,4 +38,4 @@ struct producer { struct producer_ops const *ops; }; -#endif /* INCLUDE_PRODUCER_H */ +#endif /* __CROS_EC_PRODUCER_H */ diff --git a/include/queue.h b/include/queue.h index d415b63a68..db3c8fe4c4 100644 --- a/include/queue.h +++ b/include/queue.h @@ -4,8 +4,8 @@ * * Queue data structure. */ -#ifndef INCLUDE_QUEUE_H -#define INCLUDE_QUEUE_H +#ifndef __CROS_EC_QUEUE_H +#define __CROS_EC_QUEUE_H #include "common.h" @@ -178,4 +178,4 @@ size_t queue_peek_memcpy(struct queue const *q, result; \ }) -#endif /* INCLUDE_QUEUE_H */ +#endif /* __CROS_EC_QUEUE_H */ diff --git a/include/queue_policies.h b/include/queue_policies.h index 61ab75c3a6..b9d698072f 100644 --- a/include/queue_policies.h +++ b/include/queue_policies.h @@ -4,8 +4,8 @@ * * Queue policies. */ -#ifndef INCLUDE_QUEUE_POLICIES_H -#define INCLUDE_QUEUE_POLICIES_H +#ifndef __CROS_EC_QUEUE_POLICIES_H +#define __CROS_EC_QUEUE_POLICIES_H #include "queue.h" #include "consumer.h" @@ -48,4 +48,4 @@ void queue_remove_direct(struct queue_policy const *policy, size_t count); extern struct producer const null_producer; extern struct consumer const null_consumer; -#endif /* INCLUDE_QUEUE_POLICIES_H */ +#endif /* __CROS_EC_QUEUE_POLICIES_H */ diff --git a/include/rsa.h b/include/rsa.h index 9013e308a9..ab45695910 100644 --- a/include/rsa.h +++ b/include/rsa.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef _INCLUDE_RSA_H -#define _INCLUDE_RSA_H +#ifndef __CROS_EC_RSA_H +#define __CROS_EC_RSA_H #include "config.h" @@ -53,4 +53,4 @@ void check_rw_signature(void); #endif /* !__ASSEMBLER__ */ -#endif /* _INCLUDE_RSA_H */ +#endif /* __CROS_EC_RSA_H */ diff --git a/include/sha1.h b/include/sha1.h index 79ede0206a..8dc0a76a95 100644 --- a/include/sha1.h +++ b/include/sha1.h @@ -5,8 +5,8 @@ /* SHA-1 functions */ -#ifndef _SHA1_H -#define _SHA1_H +#ifndef __CROS_EC_SHA1_H +#define __CROS_EC_SHA1_H #include "common.h" #ifdef HOST_TOOLS_BUILD @@ -33,4 +33,4 @@ void sha1_init(struct sha1_ctx *ctx); void sha1_update(struct sha1_ctx *ctx, const uint8_t *data, uint32_t len); uint8_t *sha1_final(struct sha1_ctx *ctx); -#endif /* _SHA1_H */ +#endif /* __CROS_EC_SHA1_H */ diff --git a/include/sha256.h b/include/sha256.h index 714d87351c..11260f9351 100644 --- a/include/sha256.h +++ b/include/sha256.h @@ -5,8 +5,8 @@ /* SHA-256 functions */ -#ifndef _CROS_EC_SHA256_H -#define _CROS_EC_SHA256_H +#ifndef __CROS_EC_SHA256_H +#define __CROS_EC_SHA256_H #include "common.h" @@ -26,4 +26,4 @@ void SHA256_init(struct sha256_ctx *ctx); void SHA256_update(struct sha256_ctx *ctx, const uint8_t *data, uint32_t len); uint8_t *SHA256_final(struct sha256_ctx *ctx); -#endif /* _CROS_EC_SHA256_H */ +#endif /* __CROS_EC_SHA256_H */ diff --git a/include/smbus.h b/include/smbus.h index 8f1bfeb9c9..367ceceb8d 100644 --- a/include/smbus.h +++ b/include/smbus.h @@ -6,8 +6,8 @@ * @brief smbus interface APIs * @see http://smbus.org/specs/smbus20.pdf */ -#ifndef __EC_SMBUS_H__ -#define __EC_SMBUS_H__ +#ifndef __CROS_EC_SMBUS_H +#define __CROS_EC_SMBUS_H /** Maximum transfer of a SMBUS block transfer */ #define SMBUS_MAX_BLOCK_SIZE 32 @@ -155,4 +155,4 @@ int smbus_read_block(uint8_t i2c_port, uint8_t slave_addr, int smbus_read_string(int i2c_port, uint8_t slave_addr, uint8_t smbus_cmd, uint8_t *data, uint8_t len); -#endif /* __EC_SMBUS_H__ */ +#endif /* __CROS_EC_SMBUS_H */ diff --git a/include/spi_flash_reg.h b/include/spi_flash_reg.h index de9737e4bc..e8d9144a6f 100644 --- a/include/spi_flash_reg.h +++ b/include/spi_flash_reg.h @@ -6,8 +6,8 @@ * SPI flash protection register translation functions for Chrome OS EC. */ -#ifndef __CROS_EC_SPI_FLASH_REGS_H -#define __CROS_EC_SPI_FLASH_REGS_H +#ifndef __CROS_EC_SPI_FLASH_REG_H +#define __CROS_EC_SPI_FLASH_REG_H #include "common.h" @@ -65,4 +65,4 @@ int spi_flash_reg_to_protect(uint8_t sr1, uint8_t sr2, unsigned int *start, int spi_flash_protect_to_reg(unsigned int start, unsigned int len, uint8_t *sr1, uint8_t *sr2); -#endif /* __CROS_EC_SPI_FLASH_REGS_H */ +#endif /* __CROS_EC_SPI_FLASH_REG_H */ diff --git a/include/sps.h b/include/sps.h index 93be326b15..e60f43d96f 100644 --- a/include/sps.h +++ b/include/sps.h @@ -4,8 +4,8 @@ * found in the LICENSE file. */ -#ifndef __CROS_EC_INCLUDE_SPS_H -#define __CROS_EC_INCLUDE_SPS_H +#ifndef __CROS_EC_SPS_H +#define __CROS_EC_SPS_H #include "spi.h" #include "util.h" diff --git a/include/stack_trace.h b/include/stack_trace.h index e8b37d1811..10a83814cc 100644 --- a/include/stack_trace.h +++ b/include/stack_trace.h @@ -5,8 +5,8 @@ /* Trace dump module */ -#ifndef __CROS_EC_TRACE_H -#define __CROS_EC_TRACE_H +#ifndef __CROS_EC_STACK_TRACE_H +#define __CROS_EC_STACK_TRACE_H #ifdef EMU_BUILD /* @@ -22,4 +22,4 @@ static inline void task_register_tracedump(void) { } static inline void task_dump_trace(void) { } #endif -#endif /* __CROS_EC_TRACE_H */ +#endif /* __CROS_EC_STACK_TRACE_H */ diff --git a/include/task_id.h b/include/task_id.h index 2f82e83a8b..db9ef7b3b1 100644 --- a/include/task_id.h +++ b/include/task_id.h @@ -5,8 +5,8 @@ /* define the task identifier of all compiled tasks */ -#ifndef __TASK_ID_H -#define __TASK_ID_H +#ifndef __CROS_EC_TASK_ID_H +#define __CROS_EC_TASK_ID_H /* excludes non-base tasks for test build */ #ifdef TEST_BUILD @@ -60,4 +60,4 @@ enum { }; #undef TASK -#endif /* __TASK_ID_H */ +#endif /* __CROS_EC_TASK_ID_H */ diff --git a/include/temp_sensor_chip.h b/include/temp_sensor_chip.h index 9b5f126d44..505fdec390 100644 --- a/include/temp_sensor_chip.h +++ b/include/temp_sensor_chip.h @@ -5,8 +5,8 @@ /* Temperature sensor module for LM4 chip */ -#ifndef __CROS_EC_CHIP_TEMP_SENSOR_H -#define __CROS_EC_CHIP_TEMP_SENSOR_H +#ifndef __CROS_EC_TEMP_SENSOR_CHIP_H +#define __CROS_EC_TEMP_SENSOR_CHIP_H /** * Get the last polled value of the sensor. @@ -18,4 +18,4 @@ */ int chip_temp_sensor_get_val(int idx, int *temp_ptr); -#endif /* __CROS_EC_CHIP_TEMP_SENSOR_H */ +#endif /* __CROS_EC_TEMP_SENSOR_CHIP_H */ diff --git a/include/usb.h b/include/usb.h index df089d7136..88b6d27676 100644 --- a/include/usb.h +++ b/include/usb.h @@ -5,8 +5,8 @@ * USB definitions. */ -#ifndef USB_H -#define USB_H +#ifndef __CROS_EC_USB_H +#define __CROS_EC_USB_H #include <stddef.h> /* for wchar_t */ @@ -244,4 +244,4 @@ extern const uint8_t usb_string_desc[]; extern const void * const usb_fw_version; extern const struct bos_context bos_ctx; -#endif /* USB_H */ +#endif /* __CROS_EC_USB_H */ diff --git a/include/usb_api.h b/include/usb_api.h index 193c948fb6..c73360fce0 100644 --- a/include/usb_api.h +++ b/include/usb_api.h @@ -9,8 +9,8 @@ * implementation. */ -#ifndef USB_API_H -#define USB_API_H +#ifndef __CROS_EC_USB_API_H +#define __CROS_EC_USB_API_H /* * Initialize the USB peripheral, enabling its clock and configuring the DP/DN @@ -42,4 +42,4 @@ void usb_disconnect(void); */ void usb_release(void); -#endif /* USB_API_H */ +#endif /* __CROS_EC_USB_API_H */ diff --git a/include/usb_bb.h b/include/usb_bb.h index 56864a6a1d..1d12e1305f 100644 --- a/include/usb_bb.h +++ b/include/usb_bb.h @@ -5,8 +5,8 @@ * USB billboard definitions. */ -#ifndef USB_BB_H -#define USB_BB_H +#ifndef __CROS_EC_USB_BB_H +#define __CROS_EC_USB_BB_H /* per Billboard Device Class Spec Revision 1.0 */ @@ -50,5 +50,5 @@ struct usb_bb_caps_base_descriptor { /* Note, 7W (111b) is reserved */ -#endif /* USB_BB_H */ +#endif /* __CROS_EC_USB_BB_H */ diff --git a/include/usb_console.h b/include/usb_console.h index 18526cfd87..d83fc480b0 100644 --- a/include/usb_console.h +++ b/include/usb_console.h @@ -5,8 +5,8 @@ /* USB serial console module */ -#ifndef __USB_CONSOLE_H -#define __USB_CONSOLE_H +#ifndef __CROS_EC_USB_CONSOLE_H +#define __CROS_EC_USB_CONSOLE_H #ifdef CONFIG_USB_CONSOLE @@ -63,4 +63,4 @@ void usb_console_enable(int enabled); #define usb_va_end(x) #endif -#endif /* __USB_CONSOLE_H */ +#endif /* __CROS_EC_USB_CONSOLE_H */ diff --git a/include/usb_hid.h b/include/usb_hid.h index 89ec887342..d21449d659 100644 --- a/include/usb_hid.h +++ b/include/usb_hid.h @@ -5,8 +5,8 @@ * USB HID definitions. */ -#ifndef USB_HID_H -#define USB_HID_H +#ifndef __CROS_EC_USB_HID_H +#define __CROS_EC_USB_HID_H #define USB_HID_SUBCLASS_BOOT 1 #define USB_HID_PROTOCOL_KEYBOARD 1 diff --git a/include/usb_pd.h b/include/usb_pd.h index 2ed26431d9..7e3a0a61e3 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -5,8 +5,8 @@ /* USB Power delivery module */ -#ifndef __USB_PD_H -#define __USB_PD_H +#ifndef __CROS_EC_USB_PD_H +#define __CROS_EC_USB_PD_H #include "common.h" @@ -1558,4 +1558,4 @@ static inline void pd_log_event(uint8_t type, uint8_t size_port, static inline int pd_vdm_get_log_entry(uint32_t *payload) { return 0; } #endif /* CONFIG_USB_PD_LOGGING */ -#endif /* __USB_PD_H */ +#endif /* __CROS_EC_USB_PD_H */ diff --git a/include/usb_pd_tcpc.h b/include/usb_pd_tcpc.h index 0ddeab23d2..64d68f1f3a 100644 --- a/include/usb_pd_tcpc.h +++ b/include/usb_pd_tcpc.h @@ -5,8 +5,8 @@ /* USB Power delivery port controller */ -#ifndef __USB_PD_TCPC_H -#define __USB_PD_TCPC_H +#ifndef __CROS_EC_USB_PD_TCPC_H +#define __CROS_EC_USB_PD_TCPC_H #ifndef CONFIG_TCPC_I2C_BASE_ADDR #define CONFIG_TCPC_I2C_BASE_ADDR 0x9c @@ -35,4 +35,4 @@ void tcpc_i2c_process(int read, int port, int len, uint8_t *payload, void (*send_response)(int)); -#endif /* __USB_PD_TCPC_H */ +#endif /* __CROS_EC_USB_PD_TCPC_H */ diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h index 97624fd34c..c73ca100e1 100644 --- a/include/usb_pd_tcpm.h +++ b/include/usb_pd_tcpm.h @@ -5,8 +5,8 @@ /* USB Power delivery port management */ -#ifndef __USB_PD_TCPM_H -#define __USB_PD_TCPM_H +#ifndef __CROS_EC_USB_PD_TCPM_H +#define __CROS_EC_USB_PD_TCPM_H /* Default retry count for transmitting */ #define PD_RETRY_COUNT 3 @@ -256,4 +256,4 @@ int tcpm_get_message(int port, uint32_t *payload, int *head); int tcpm_transmit(int port, enum tcpm_transmit_type type, uint16_t header, const uint32_t *data); -#endif /* __USB_PD_TCPM_H */ +#endif /* __CROS_EC_USB_PD_TCPM_H */ diff --git a/test/powerdemo.h b/test/powerdemo.h index 78acfc095b..2e0360f7c2 100644 --- a/test/powerdemo.h +++ b/test/powerdemo.h @@ -5,12 +5,12 @@ /* Power state machine demo module for Chrome EC */ -#ifndef __CROS_EC_POWERDEMO_H -#define __CROS_EC_POWERDEMO_H +#ifndef __TEST_POWERDEMO_H +#define __TEST_POWERDEMO_H #include "common.h" /* Initializes the module. */ int power_demo_init(void); -#endif /* __CROS_EC_POWERDEMO_H */ +#endif /* __TEST_POWERDEMO_H */ diff --git a/test/test_config.h b/test/test_config.h index 88382c89c8..a9f21b8006 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -5,8 +5,8 @@ /* Per-test config flags */ -#ifndef __CROS_EC_TEST_CONFIG_H -#define __CROS_EC_TEST_CONFIG_H +#ifndef __TEST_TEST_CONFIG_H +#define __TEST_TEST_CONFIG_H /* Test config flags only apply for test builds */ #ifdef TEST_BUILD @@ -119,4 +119,4 @@ int board_discharge_on_ac(int enabled); #endif #endif /* TEST_BUILD */ -#endif /* __CROS_EC_TEST_CONFIG_H */ +#endif /* __TEST_TEST_CONFIG_H */ diff --git a/test/usb_pd_test_util.h b/test/usb_pd_test_util.h index d54296ef17..561033d8fa 100644 --- a/test/usb_pd_test_util.h +++ b/test/usb_pd_test_util.h @@ -5,8 +5,8 @@ * Test utilities for USB PD unit test. */ -#ifndef __USB_PD_TEST_UTIL_H -#define __USB_PD_TEST_UTIL_H +#ifndef __TEST_USB_PD_TEST_UTIL_H +#define __TEST_USB_PD_TEST_UTIL_H /* Simulate Rx message */ void pd_test_rx_set_preamble(int port, int has_preamble); @@ -29,4 +29,4 @@ int pd_test_tx_msg_verify_short(int port, uint16_t val); int pd_test_tx_msg_verify_word(int port, uint32_t val); int pd_test_tx_msg_verify_crc(int port); -#endif /* __USB_PD_TEST_UTIL_H */ +#endif /* __TEST_USB_PD_TEST_UTIL_H */ diff --git a/util/comm-host.h b/util/comm-host.h index 3477661c19..1d3cb9e36d 100644 --- a/util/comm-host.h +++ b/util/comm-host.h @@ -6,8 +6,8 @@ * the EC. This abstracts them. */ -#ifndef COMM_HOST_H -#define COMM_HOST_H +#ifndef __UTIL_COMM_HOST_H +#define __UTIL_COMM_HOST_H #include "common.h" #include "ec_commands.h" @@ -74,4 +74,4 @@ extern int (*ec_command_proto)(int command, int version, */ extern int (*ec_readmem)(int offset, int bytes, void *dest); -#endif /* COMM_HOST_H */ +#endif /* __UTIL_COMM_HOST_H */ diff --git a/util/cros_ec_dev.h b/util/cros_ec_dev.h index f6f5a5542c..89a54b9e80 100644 --- a/util/cros_ec_dev.h +++ b/util/cros_ec_dev.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef _CROS_EC_DEV_H_ -#define _CROS_EC_DEV_H_ +#ifndef __UTIL_CROS_EC_DEV_H +#define __UTIL_CROS_EC_DEV_H #include <linux/ioctl.h> #include <linux/types.h> @@ -50,4 +50,4 @@ struct cros_ec_readmem { #define CROS_EC_DEV_IOCXCMD _IOWR(':', 0, struct cros_ec_command) #define CROS_EC_DEV_IOCRDMEM _IOWR(':', 1, struct cros_ec_readmem) -#endif /* _CROS_EC_DEV_H_ */ +#endif /* __UTIL_CROS_EC_DEV_H */ diff --git a/util/ec_flash.h b/util/ec_flash.h index 68a40fe466..e5b7baef79 100644 --- a/util/ec_flash.h +++ b/util/ec_flash.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef __CROS_EC_EC_FLASH_H -#define __CROS_EC_EC_FLASH_H +#ifndef __UTIL_EC_FLASH_H +#define __UTIL_EC_FLASH_H /** * Read EC flash memory diff --git a/util/ec_sb_firmware_update.h b/util/ec_sb_firmware_update.h index 6673ba99cf..5bddebaf4a 100644 --- a/util/ec_sb_firmware_update.h +++ b/util/ec_sb_firmware_update.h @@ -40,8 +40,8 @@ * 9. cmd.0x35.read.status */ -#ifndef __CROS_EC_SB_FIRMWARE_UPDATE_H__ -#define __CROS_EC_SB_FIRMWARE_UPDATE_H__ +#ifndef __UTIL_EC_SB_FIRMWARE_UPDATE_H +#define __UTIL_EC_SB_FIRMWARE_UPDATE_H struct sb_fw_header { uint8_t signature[4]; /* "BTFW" */ diff --git a/util/lock/csem.h b/util/lock/csem.h index 10a5c5ff94..469a824259 100644 --- a/util/lock/csem.h +++ b/util/lock/csem.h @@ -32,8 +32,8 @@ * via Cobalt Networks. It has been fairly extensively modified since then. */ -#ifndef CSEM_H__ -#define CSEM_H__ +#ifndef __UTIL_CSEM_H +#define __UTIL_CSEM_H #include <sys/ipc.h> #include <time.h> @@ -151,4 +151,4 @@ extern int csem_down_timeout_undo(int sem_id, struct timespec *timeout); */ extern time_t csem_get_otime(int sem_id); -#endif /* CSEM_H__ */ +#endif /* __UTIL_CSEM_H */ diff --git a/util/lock/gec_lock.h b/util/lock/gec_lock.h index 13b0f9d92c..8480700ddd 100644 --- a/util/lock/gec_lock.h +++ b/util/lock/gec_lock.h @@ -28,8 +28,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef GEC_LOCK_H__ -#define GEC_LOCK_H__ +#ifndef __UTIL_GEC_LOCK_H +#define __UTIL_GEC_LOCK_H /* * acquire_gec_lock - acquire global lock @@ -48,4 +48,4 @@ extern int acquire_gec_lock(int timeout_secs); */ extern int release_gec_lock(void); -#endif /* GEC_LOCK_H__ */ +#endif /* __UTIL_GEC_LOCK_H */ diff --git a/util/lock/ipc_lock.h b/util/lock/ipc_lock.h index b85de286b7..39ae277a7e 100644 --- a/util/lock/ipc_lock.h +++ b/util/lock/ipc_lock.h @@ -28,8 +28,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef IPC_LOCK_H__ -#define IPC_LOCK_H__ +#ifndef __UTIL_IPC_LOCK_H +#define __UTIL_IPC_LOCK_H #include <sys/ipc.h> @@ -68,4 +68,4 @@ extern int acquire_lock(struct ipc_lock *lock, int timeout_msecs); */ extern int release_lock(struct ipc_lock *lock); -#endif /* IPC_LOCK_H__ */ +#endif /* __UTIL_IPC_LOCK_H */ diff --git a/util/lock/locks.h b/util/lock/locks.h index 39dfc933f3..74360883fd 100644 --- a/util/lock/locks.h +++ b/util/lock/locks.h @@ -28,8 +28,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LOCKS_H__ -#define LOCKS_H__ +#ifndef __UTIL_LOCKS_H +#define __UTIL_LOCKS_H /* this is the base key, since we have to pick something global */ #define IPC_LOCK_KEY (0x67736c00 & 0xfffffc00) /* 22 bits "gsl" */ @@ -44,4 +44,4 @@ /* for Google EC */ #define GECLOCK (IPC_LOCK_KEY + 1) -#endif /* LOCKS_H__ */ +#endif /* __UTIL_LOCKS_H */ diff --git a/util/misc_util.h b/util/misc_util.h index c550a1baa1..401710f0e5 100644 --- a/util/misc_util.h +++ b/util/misc_util.h @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#ifndef __CROS_EC_MISC_UTIL_H -#define __CROS_EC_MISC_UTIL_H +#ifndef __UTIL_MISC_UTIL_H +#define __UTIL_MISC_UTIL_H /* Don't use a macro where an inline will do... */ static inline int MIN(int a, int b) { return a < b ? a : b; } diff --git a/util/powerd_lock.h b/util/powerd_lock.h index ddcd5f0553..86be184a19 100644 --- a/util/powerd_lock.h +++ b/util/powerd_lock.h @@ -21,8 +21,8 @@ * powerd_lock.h: header file for power management routines */ -#ifndef __POWER_H__ -#define __POWER_H__ 1 +#ifndef __UTIL_POWERD_LOCK_H +#define __UTIL_POWERD_LOCK_H 1 enum POWERD_ERROR_CODE { POWERD_OK = 0, @@ -38,4 +38,4 @@ int disable_power_management(void); /* Re-enable power management. */ int restore_power_management(void); -#endif /* __POWER_H__ */ +#endif /* __UTIL_POWERD_LOCK_H */ |