From edda0f94e58a510f6e13bf632c6dc7294840ac43 Mon Sep 17 00:00:00 2001 From: Jan Samek Date: Thu, 27 Apr 2023 10:39:27 +0200 Subject: treewide: Add missing include guards to chip.h Some of the chip.h files in the tree are missing the include guards. This patch adds them in order to avoid potential redefinions of symbols contained in these headers, when they are included multiple times in static.c generated by sconfig. Change-Id: I550a514e72a8dd4db602e7ceffccd81aa36446e3 Signed-off-by: Jan Samek Reviewed-on: https://review.coreboot.org/c/coreboot/+/74749 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/cpu/intel/haswell/chip.h | 5 +++++ src/cpu/intel/model_2065x/chip.h | 5 +++++ src/cpu/intel/model_206ax/chip.h | 5 +++++ src/drivers/generic/alc1015/chip.h | 5 +++++ src/drivers/generic/bayhub/chip.h | 5 +++++ src/drivers/generic/bayhub_lv2/chip.h | 5 +++++ src/drivers/generic/max98357a/chip.h | 5 +++++ src/drivers/generic/nau8315/chip.h | 5 +++++ src/drivers/i2c/cs35l53/chip.h | 5 +++++ src/drivers/i2c/cs42l42/chip.h | 5 +++++ src/drivers/i2c/da7219/chip.h | 5 +++++ src/drivers/i2c/max98373/chip.h | 5 +++++ src/drivers/i2c/max98390/chip.h | 5 +++++ src/drivers/i2c/max98396/chip.h | 5 +++++ src/drivers/i2c/max98927/chip.h | 5 +++++ src/drivers/i2c/nau8825/chip.h | 5 +++++ src/drivers/i2c/pca9538/chip.h | 5 +++++ src/drivers/i2c/pcf8523/chip.h | 5 +++++ src/drivers/i2c/ptn3460/chip.h | 5 +++++ src/drivers/i2c/rt1011/chip.h | 5 +++++ src/drivers/i2c/rt5663/chip.h | 5 +++++ src/drivers/i2c/rtd2132/chip.h | 5 +++++ src/drivers/i2c/rx6110sa/chip.h | 5 +++++ src/drivers/i2c/tas5825m/chip.h | 5 +++++ src/drivers/i2c/tpm/chip.h | 5 +++++ src/drivers/intel/ish/chip.h | 5 +++++ src/drivers/net/phy/m88e1512/chip.h | 5 +++++ 27 files changed, 135 insertions(+) diff --git a/src/cpu/intel/haswell/chip.h b/src/cpu/intel/haswell/chip.h index 5f2324ca37..02f2f1ce7f 100644 --- a/src/cpu/intel/haswell/chip.h +++ b/src/cpu/intel/haswell/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __CPU_INTEL_HASWELL_CHIP_H__ +#define __CPU_INTEL_HASWELL_CHIP_H__ + #include #include @@ -35,3 +38,5 @@ struct cpu_intel_haswell_config { /* Enable S0iX support */ bool s0ix_enable; }; + +#endif /* __CPU_INTEL_HASWELL_CHIP_H__ */ diff --git a/src/cpu/intel/model_2065x/chip.h b/src/cpu/intel/model_2065x/chip.h index 9e89793d80..90921f746b 100644 --- a/src/cpu/intel/model_2065x/chip.h +++ b/src/cpu/intel/model_2065x/chip.h @@ -1,5 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __CPU_INTEL_MODEL_2065X_CHIP_H__ +#define __CPU_INTEL_MODEL_2065X_CHIP_H__ + struct cpu_intel_model_2065x_config { int tcc_offset; /* TCC Activation Offset */ }; + +#endif /* __CPU_INTEL_MODEL_2065X_CHIP_H__ */ diff --git a/src/cpu/intel/model_206ax/chip.h b/src/cpu/intel/model_206ax/chip.h index 13cf3163e0..57e145eaf5 100644 --- a/src/cpu/intel/model_206ax/chip.h +++ b/src/cpu/intel/model_206ax/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __CPU_INTEL_MODEL_206AX_CHIP_H__ +#define __CPU_INTEL_MODEL_206AX_CHIP_H__ + /* Keep this in sync with acpi.c */ enum cpu_acpi_level { CPU_ACPI_DISABLED = 0, @@ -18,3 +21,5 @@ struct cpu_intel_model_206ax_config { int tcc_offset; /* TCC Activation Offset */ }; + +#endif /* __CPU_INTEL_MODEL_206AX_CHIP_H__ */ diff --git a/src/drivers/generic/alc1015/chip.h b/src/drivers/generic/alc1015/chip.h index fa841772ed..16b0d22cd8 100644 --- a/src/drivers/generic/alc1015/chip.h +++ b/src/drivers/generic/alc1015/chip.h @@ -1,8 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_GENERIC_ALC1015_CHIP_H__ +#define __DRIVERS_GENERIC_ALC1015_CHIP_H__ + #include struct drivers_generic_alc1015_config { const char *hid; /* ACPI _HID */ struct acpi_gpio sdb; /* SDMODE GPIO */ }; + +#endif /* __DRIVERS_GENERIC_ALC1015_CHIP_H__ */ diff --git a/src/drivers/generic/bayhub/chip.h b/src/drivers/generic/bayhub/chip.h index 77b7512143..82fe67085b 100644 --- a/src/drivers/generic/bayhub/chip.h +++ b/src/drivers/generic/bayhub/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_GENERIC_BAYHUB_CHIP_H__ +#define __DRIVERS_GENERIC_BAYHUB_CHIP_H__ + #include /* @@ -15,3 +18,5 @@ struct drivers_generic_bayhub_config { /* CLK and DAT tuning values */ uint8_t vih_tuning_value; }; + +#endif /* __DRIVERS_GENERIC_BAYHUB_CHIP_H__ */ diff --git a/src/drivers/generic/bayhub_lv2/chip.h b/src/drivers/generic/bayhub_lv2/chip.h index aa8f3fd879..ea5c55fc7f 100644 --- a/src/drivers/generic/bayhub_lv2/chip.h +++ b/src/drivers/generic/bayhub_lv2/chip.h @@ -1,8 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_GENERIC_BAYHUB_LV2_CHIP_H__ +#define __DRIVERS_GENERIC_BAYHUB_LV2_CHIP_H__ + #include /* Bayhub LV2 PCIe to SD bridge */ struct drivers_generic_bayhub_lv2_config { bool enable_power_saving; }; + +#endif /* __DRIVERS_GENERIC_BAYHUB_LV2_CHIP_H__ */ diff --git a/src/drivers/generic/max98357a/chip.h b/src/drivers/generic/max98357a/chip.h index 66ebecfc5f..3916b80f86 100644 --- a/src/drivers/generic/max98357a/chip.h +++ b/src/drivers/generic/max98357a/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_GENERIC_MAX98357A_CHIP_H__ +#define __DRIVERS_GENERIC_MAX98357A_CHIP_H__ + #include struct drivers_generic_max98357a_config { @@ -16,3 +19,5 @@ struct drivers_generic_max98357a_config { unsigned int device_present_gpio; unsigned int device_present_gpio_invert; }; + +#endif /* __DRIVERS_GENERIC_MAX98357A_CHIP_H__ */ diff --git a/src/drivers/generic/nau8315/chip.h b/src/drivers/generic/nau8315/chip.h index 45cb412d48..550f11ed1e 100644 --- a/src/drivers/generic/nau8315/chip.h +++ b/src/drivers/generic/nau8315/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_GENERIC_NAU8315_CHIP_H__ +#define __DRIVERS_GENERIC_NAU8315_CHIP_H__ + #include struct drivers_generic_nau8315_config { @@ -12,3 +15,5 @@ struct drivers_generic_nau8315_config { /* ENABLE GPIO */ struct acpi_gpio enable_gpio; }; + +#endif /* __DRIVERS_GENERIC_NAU8315_CHIP_H__ */ diff --git a/src/drivers/i2c/cs35l53/chip.h b/src/drivers/i2c/cs35l53/chip.h index 8631666e0c..93905c255f 100644 --- a/src/drivers/i2c/cs35l53/chip.h +++ b/src/drivers/i2c/cs35l53/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_CS35L53_CHIP_H__ +#define __DRIVERS_I2C_CS35L53_CHIP_H__ + #include #define CS35L53_MAX_GPIOS 2 @@ -153,3 +156,5 @@ struct drivers_i2c_cs35l53_config { */ enum cs35l53_gpio2_src gpio2_src_select; }; + +#endif /* __DRIVERS_I2C_CS35L53_CHIP_H__ */ diff --git a/src/drivers/i2c/cs42l42/chip.h b/src/drivers/i2c/cs42l42/chip.h index 1adffe7088..61e0213667 100644 --- a/src/drivers/i2c/cs42l42/chip.h +++ b/src/drivers/i2c/cs42l42/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_CS42L42_CHIP_H__ +#define __DRIVERS_I2C_CS42L42_CHIP_H__ + #include enum cs42l42_ts_dbnc_rise { @@ -117,3 +120,5 @@ struct drivers_i2c_cs42l42_config { */ bool hs_bias_sense_disable; }; + +#endif /* __DRIVERS_I2C_CS42L42_CHIP_H__ */ diff --git a/src/drivers/i2c/da7219/chip.h b/src/drivers/i2c/da7219/chip.h index 203bd8fa66..5ca787c391 100644 --- a/src/drivers/i2c/da7219/chip.h +++ b/src/drivers/i2c/da7219/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_DA7219_CHIP_H__ +#define __DRIVERS_I2C_DA7219_CHIP_H__ + #include /* @@ -115,3 +118,5 @@ struct drivers_i2c_da7219_config { */ const char *mclk_name; }; + +#endif /* __DRIVERS_I2C_DA7219_CHIP_H__ */ diff --git a/src/drivers/i2c/max98373/chip.h b/src/drivers/i2c/max98373/chip.h index c184531823..aea5226c06 100644 --- a/src/drivers/i2c/max98373/chip.h +++ b/src/drivers/i2c/max98373/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_MAX98373_CHIP_H__ +#define __DRIVERS_I2C_MAX98373_CHIP_H__ + /* * Maxim MAX98373 audio codec devicetree bindings */ @@ -22,3 +25,5 @@ struct drivers_i2c_max98373_config { /* slot number where current feedback will be received */ uint32_t imon_slot_no; }; + +#endif /* __DRIVERS_I2C_MAX98373_CHIP_H__ */ diff --git a/src/drivers/i2c/max98390/chip.h b/src/drivers/i2c/max98390/chip.h index c60b44cc0c..6744c737c3 100644 --- a/src/drivers/i2c/max98390/chip.h +++ b/src/drivers/i2c/max98390/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef __DRIVERS_I2C_MAX98390_CHIP_H__ +#define __DRIVERS_I2C_MAX98390_CHIP_H__ + /* * MAXIM MAX98390 audio codec devicetree bindings */ @@ -19,3 +22,5 @@ struct drivers_i2c_max98390_config { /* slot number where current feedback will be received */ uint32_t imon_slot_no; }; + +#endif /* __DRIVERS_I2C_MAX98390_CHIP_H__ */ diff --git a/src/drivers/i2c/max98396/chip.h b/src/drivers/i2c/max98396/chip.h index 63a2440acf..7a1c1188cf 100644 --- a/src/drivers/i2c/max98396/chip.h +++ b/src/drivers/i2c/max98396/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_MAX98396_CHIP_H__ +#define __DRIVERS_I2C_MAX98396_CHIP_H__ + /* * Maxim MAX98396 audio codec devicetree bindings */ @@ -24,3 +27,5 @@ struct drivers_i2c_max98396_config { /* Use GPIO based reset gpio */ struct acpi_gpio reset_gpio; }; + +#endif /* __DRIVERS_I2C_MAX98396_CHIP_H__ */ diff --git a/src/drivers/i2c/max98927/chip.h b/src/drivers/i2c/max98927/chip.h index fcdb9e05db..9311487473 100644 --- a/src/drivers/i2c/max98927/chip.h +++ b/src/drivers/i2c/max98927/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_MAX98927_CHIP_H__ +#define __DRIVERS_I2C_MAX98927_CHIP_H__ + /* * Maxim MAX98927 audio codec devicetree bindings */ @@ -19,3 +22,5 @@ struct drivers_i2c_max98927_config { /* slot number where current feedback will be received */ unsigned int imon_slot_no; }; + +#endif /* __DRIVERS_I2C_MAX98927_CHIP_H__ */ diff --git a/src/drivers/i2c/nau8825/chip.h b/src/drivers/i2c/nau8825/chip.h index ce17d3f71c..e47f466e1d 100644 --- a/src/drivers/i2c/nau8825/chip.h +++ b/src/drivers/i2c/nau8825/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_NAU8825_CHIP_H__ +#define __DRIVERS_I2C_NAU8825_CHIP_H__ + #include #define NAU8825_MAX_BUTTONS 8 @@ -102,3 +105,5 @@ struct drivers_i2c_nau8825_config { */ bool adcout_ds; }; + +#endif /* __DRIVERS_I2C_NAU8825_CHIP_H__ */ diff --git a/src/drivers/i2c/pca9538/chip.h b/src/drivers/i2c/pca9538/chip.h index 96fd02f905..c9254a45e9 100644 --- a/src/drivers/i2c/pca9538/chip.h +++ b/src/drivers/i2c/pca9538/chip.h @@ -1,7 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_PCA9538_CHIP_H__ +#define __DRIVERS_I2C_PCA9538_CHIP_H__ + struct drivers_i2c_pca9538_config { unsigned char in_out; /* Use bit as input(1) or output (0). */ unsigned char invert; /* If a bit is 1, the input will be inverted. */ unsigned char out_val; /* Initial output value to drive. */ }; + +#endif /* __DRIVERS_I2C_PCA9538_CHIP_H__ */ diff --git a/src/drivers/i2c/pcf8523/chip.h b/src/drivers/i2c/pcf8523/chip.h index b318da3aae..3c32599975 100644 --- a/src/drivers/i2c/pcf8523/chip.h +++ b/src/drivers/i2c/pcf8523/chip.h @@ -2,6 +2,9 @@ #include "pcf8523.h" +#ifndef __DRIVERS_I2C_PCF8523_CHIP_H__ +#define __DRIVERS_I2C_PCF8523_CHIP_H__ + struct drivers_i2c_pcf8523_config { unsigned char cap_sel; /* Internal capacitor selection */ unsigned char second_int_en; /* Enable IRQ for seconds */ @@ -29,3 +32,5 @@ struct drivers_i2c_pcf8523_config { unsigned char user_day; /* User day to set */ unsigned char user_weekday; /* User weekday to set */ }; + +#endif /* __DRIVERS_I2C_PCF8523_CHIP_H__ */ diff --git a/src/drivers/i2c/ptn3460/chip.h b/src/drivers/i2c/ptn3460/chip.h index 2bf7e5e783..0ec26ca8ac 100644 --- a/src/drivers/i2c/ptn3460/chip.h +++ b/src/drivers/i2c/ptn3460/chip.h @@ -1,5 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_PTN3460_CHIP_H__ +#define __DRIVERS_I2C_PTN3460_CHIP_H__ + struct drivers_i2c_ptn3460_config { }; + +#endif /* __DRIVERS_I2C_PTN3460_CHIP_H__ */ diff --git a/src/drivers/i2c/rt1011/chip.h b/src/drivers/i2c/rt1011/chip.h index 84a73dcc83..b4e9fc4ebb 100644 --- a/src/drivers/i2c/rt1011/chip.h +++ b/src/drivers/i2c/rt1011/chip.h @@ -4,6 +4,9 @@ * Realtek RT1011 audio codec devicetree bindings */ +#ifndef __DRIVERS_I2C_RT1011_CHIP_H__ +#define __DRIVERS_I2C_RT1011_CHIP_H__ + struct drivers_i2c_rt1011_config { const char *name; /* ACPI Device Name */ const char *desc; /* Device Description */ @@ -14,3 +17,5 @@ struct drivers_i2c_rt1011_config { /* The VPD key of temperature during speaker calibration. */ const char *temperature_calib_key; }; + +#endif /* __DRIVERS_I2C_RT1011_CHIP_H__ */ diff --git a/src/drivers/i2c/rt5663/chip.h b/src/drivers/i2c/rt5663/chip.h index 49b107cb1c..1c177b363b 100644 --- a/src/drivers/i2c/rt5663/chip.h +++ b/src/drivers/i2c/rt5663/chip.h @@ -4,6 +4,9 @@ * Realtek RT5663 audio codec devicetree bindings */ +#ifndef __DRIVERS_I2C_RT5663_CHIP_H__ +#define __DRIVERS_I2C_RT5663_CHIP_H__ + #include #include @@ -23,3 +26,5 @@ struct drivers_i2c_rt5663_config { uint32_t dc_offset_l_manual_mic; uint32_t dc_offset_r_manual_mic; }; + +#endif /* __DRIVERS_I2C_RT5663_CHIP_H__ */ diff --git a/src/drivers/i2c/rtd2132/chip.h b/src/drivers/i2c/rtd2132/chip.h index 7b02248f6e..b65182feeb 100644 --- a/src/drivers/i2c/rtd2132/chip.h +++ b/src/drivers/i2c/rtd2132/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_RTD2132_CHIP_H__ +#define __DRIVERS_I2C_RTD2132_CHIP_H__ + struct drivers_i2c_rtd2132_config { /* Panel Power Sequencing. All units in ms. */ u16 t1; /* Delay from panel Vcc enable to LVDS output enable. */ @@ -32,3 +35,5 @@ struct drivers_i2c_rtd2132_config { */ u8 sscg_percent; }; + +#endif /* __DRIVERS_I2C_RTD2132_CHIP_H__ */ diff --git a/src/drivers/i2c/rx6110sa/chip.h b/src/drivers/i2c/rx6110sa/chip.h index 1c0abe84d4..2b184266cd 100644 --- a/src/drivers/i2c/rx6110sa/chip.h +++ b/src/drivers/i2c/rx6110sa/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_RX6110SA_CHIP_H__ +#define __DRIVERS_I2C_RX6110SA_CHIP_H__ + #include "rx6110sa.h" struct drivers_i2c_rx6110sa_config { @@ -25,3 +28,5 @@ struct drivers_i2c_rx6110sa_config { unsigned char bks_off; unsigned char iocut_en; /* Disable backup of I/O circuit. */ }; + +#endif /* __DRIVERS_I2C_RX6110SA_CHIP_H__ */ diff --git a/src/drivers/i2c/tas5825m/chip.h b/src/drivers/i2c/tas5825m/chip.h index 23af491d3e..34f75cc12b 100644 --- a/src/drivers/i2c/tas5825m/chip.h +++ b/src/drivers/i2c/tas5825m/chip.h @@ -1,6 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_TAS5825M_CHIP_H__ +#define __DRIVERS_I2C_TAS5825M_CHIP_H__ + struct drivers_i2c_tas5825m_config { // Used to uniquely identify the AMP int id; }; + +#endif /* __DRIVERS_I2C_TAS5825M_CHIP_H__ */ diff --git a/src/drivers/i2c/tpm/chip.h b/src/drivers/i2c/tpm/chip.h index 4eac7e16f4..156f8dddc0 100644 --- a/src/drivers/i2c/tpm/chip.h +++ b/src/drivers/i2c/tpm/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_I2C_TPM_CHIP_H__ +#define __DRIVERS_I2C_TPM_CHIP_H__ + #include #include @@ -18,3 +21,5 @@ struct drivers_i2c_tpm_config { struct acpi_gpio irq_gpio; /* GPIO interrupt */ enum tpm_power_managed_mode power_managed_mode; /* TPM power managed mode */ }; + +#endif /* __DRIVERS_I2C_TPM_CHIP_H__ */ diff --git a/src/drivers/intel/ish/chip.h b/src/drivers/intel/ish/chip.h index e7bb8f87e5..69f3253b4e 100644 --- a/src/drivers/intel/ish/chip.h +++ b/src/drivers/intel/ish/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_INTEL_ISH_CHIP_H__ +#define __DRIVERS_INTEL_ISH_CHIP_H__ + /* * Intel Integrated Sensor Hub (ISH) */ @@ -10,3 +13,5 @@ struct drivers_intel_ish_config { /* Add `DmaProperty` in _DSD */ bool add_acpi_dma_property; }; + +#endif /* __DRIVERS_INTEL_ISH_CHIP_H__ */ diff --git a/src/drivers/net/phy/m88e1512/chip.h b/src/drivers/net/phy/m88e1512/chip.h index f1e313ba97..4af3b4d6f6 100644 --- a/src/drivers/net/phy/m88e1512/chip.h +++ b/src/drivers/net/phy/m88e1512/chip.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DRIVERS_NET_PHY_M88E1512_CHIP_H__ +#define __DRIVERS_NET_PHY_M88E1512_CHIP_H__ + #include "m88e1512.h" struct drivers_net_phy_m88e1512_config { @@ -15,3 +18,5 @@ struct drivers_net_phy_m88e1512_config { unsigned char pmos_val; /* Set PMOS calibration value */ unsigned char nmos_val; /* Set NMOS calibration value */ }; + +#endif /* __DRIVERS_NET_PHY_M88E1512_CHIP_H__ */ -- cgit v1.2.3