diff options
author | Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com> | 2024-01-30 09:53:46 +0900 |
---|---|---|
committer | Felix Singer <service+coreboot-gerrit@felixsinger.de> | 2024-01-31 09:51:58 +0000 |
commit | bfb11bec3b3fec638adf864a9b9b2cff6671fed8 (patch) | |
tree | 0247c385cfbd79aa8496b1ddc3c3afcce1465616 /src/drivers/i2c | |
parent | f4c496d3e3e779b3d870d13e1e359a3b5f7087cb (diff) |
include/device/device.h: Remove CHIP_NAME() macro
Macros can be confusing on their own; hiding commas make things worse.
This can sometimes be downright misleading. A "good" example would be
the code in soc/intel/xeon_sp/spr/chip.c:
CHIP_NAME("Intel SapphireRapids-SP").enable_dev = chip_enable_dev,
This appears as CHIP_NAME() being some struct when in fact these are
defining 2 separate members of the same struct.
It was decided to remove this macro altogether, as it does not do
anything special and incurs a maintenance burden.
Change-Id: Iaed6dfb144bddcf5c43634b0c955c19afce388f0
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80239
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/drivers/i2c')
30 files changed, 30 insertions, 30 deletions
diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c index ce6aa8667b..99ea7a47f0 100644 --- a/src/drivers/i2c/at24rf08c/at24rf08c.c +++ b/src/drivers/i2c/at24rf08c/at24rf08c.c @@ -41,6 +41,6 @@ static void enable_dev(struct device *dev) } struct chip_operations drivers_i2c_at24rf08c_ops = { - CHIP_NAME("AT24RF08C") + .name = "AT24RF08C", .enable_dev = enable_dev, }; diff --git a/src/drivers/i2c/ck505/ck505.c b/src/drivers/i2c/ck505/ck505.c index 58eaec657a..db660fe67f 100644 --- a/src/drivers/i2c/ck505/ck505.c +++ b/src/drivers/i2c/ck505/ck505.c @@ -55,6 +55,6 @@ static void enable_dev(struct device *dev) } struct chip_operations drivers_i2c_ck505_ops = { - CHIP_NAME("CK505 Clock generator") + .name = "CK505 Clock generator", .enable_dev = enable_dev, }; diff --git a/src/drivers/i2c/cs35l53/cs35l53.c b/src/drivers/i2c/cs35l53/cs35l53.c index 9857203b8c..578e272b59 100644 --- a/src/drivers/i2c/cs35l53/cs35l53.c +++ b/src/drivers/i2c/cs35l53/cs35l53.c @@ -145,6 +145,6 @@ static void cs35l53_enable(struct device *dev) } struct chip_operations drivers_i2c_cs35l53_ops = { - CHIP_NAME("Cirrus Logic CS35L53 Audio Codec") + .name = "Cirrus Logic CS35L53 Audio Codec", .enable_dev = cs35l53_enable }; diff --git a/src/drivers/i2c/cs42l42/cs42l42.c b/src/drivers/i2c/cs42l42/cs42l42.c index dcf83e0048..8ccfd77f88 100644 --- a/src/drivers/i2c/cs42l42/cs42l42.c +++ b/src/drivers/i2c/cs42l42/cs42l42.c @@ -118,6 +118,6 @@ static void cs42l42_enable(struct device *dev) } struct chip_operations drivers_i2c_cs42l42_ops = { - CHIP_NAME("Cirrus Logic CS42l42 Audio Codec") + .name = "Cirrus Logic CS42l42 Audio Codec", .enable_dev = cs42l42_enable }; diff --git a/src/drivers/i2c/da7219/da7219.c b/src/drivers/i2c/da7219/da7219.c index 80c52721f1..1a149ca9b6 100644 --- a/src/drivers/i2c/da7219/da7219.c +++ b/src/drivers/i2c/da7219/da7219.c @@ -110,6 +110,6 @@ static void da7219_enable(struct device *dev) } struct chip_operations drivers_i2c_da7219_ops = { - CHIP_NAME("Dialog Semiconductor DA7219 Audio Codec") + .name = "Dialog Semiconductor DA7219 Audio Codec", .enable_dev = da7219_enable }; diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 1a3ec40c7a..2a4acb242f 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -229,6 +229,6 @@ static void i2c_generic_enable(struct device *dev) } struct chip_operations drivers_i2c_generic_ops = { - CHIP_NAME("I2C Device") + .name = "I2C Device", .enable_dev = i2c_generic_enable }; diff --git a/src/drivers/i2c/gpiomux/bus/bus.c b/src/drivers/i2c/gpiomux/bus/bus.c index 2bdb103016..a6c603a8f1 100644 --- a/src/drivers/i2c/gpiomux/bus/bus.c +++ b/src/drivers/i2c/gpiomux/bus/bus.c @@ -55,6 +55,6 @@ static void i2c_gpiomux_bus_enable(struct device *dev) } struct chip_operations drivers_i2c_gpiomux_bus_ops = { - CHIP_NAME("I2C GPIO MUX Bus Device") + .name = "I2C GPIO MUX Bus Device", .enable_dev = i2c_gpiomux_bus_enable }; diff --git a/src/drivers/i2c/gpiomux/mux/mux.c b/src/drivers/i2c/gpiomux/mux/mux.c index fa1b18cde2..5f79fe5758 100644 --- a/src/drivers/i2c/gpiomux/mux/mux.c +++ b/src/drivers/i2c/gpiomux/mux/mux.c @@ -77,6 +77,6 @@ static void i2c_gpiomux_mux_enable(struct device *dev) } struct chip_operations drivers_i2c_gpiomux_mux_ops = { - CHIP_NAME("I2C GPIO MUX Device") + .name = "I2C GPIO MUX Device", .enable_dev = i2c_gpiomux_mux_enable }; diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c index 8705c1e34a..fb3a439a53 100644 --- a/src/drivers/i2c/hid/hid.c +++ b/src/drivers/i2c/hid/hid.c @@ -90,6 +90,6 @@ static void i2c_hid_enable(struct device *dev) } struct chip_operations drivers_i2c_hid_ops = { - CHIP_NAME("I2C HID Device") + .name = "I2C HID Device", .enable_dev = i2c_hid_enable }; diff --git a/src/drivers/i2c/lm96000/lm96000.c b/src/drivers/i2c/lm96000/lm96000.c index a2b7a21a2e..f17d8c0955 100644 --- a/src/drivers/i2c/lm96000/lm96000.c +++ b/src/drivers/i2c/lm96000/lm96000.c @@ -215,6 +215,6 @@ static void lm96000_enable(struct device *const dev) } struct chip_operations drivers_i2c_lm96000_ops = { - CHIP_NAME("LM96000") + .name = "LM96000", .enable_dev = lm96000_enable }; diff --git a/src/drivers/i2c/max98373/max98373.c b/src/drivers/i2c/max98373/max98373.c index eb5590d3e2..37a8864325 100644 --- a/src/drivers/i2c/max98373/max98373.c +++ b/src/drivers/i2c/max98373/max98373.c @@ -90,6 +90,6 @@ static void max98373_enable(struct device *dev) } struct chip_operations drivers_i2c_max98373_ops = { - CHIP_NAME("Maxim MAX98373 Codec") + .name = "Maxim MAX98373 Codec", .enable_dev = max98373_enable }; diff --git a/src/drivers/i2c/max98390/max98390.c b/src/drivers/i2c/max98390/max98390.c index 11acd22829..f4c4a70b92 100644 --- a/src/drivers/i2c/max98390/max98390.c +++ b/src/drivers/i2c/max98390/max98390.c @@ -129,6 +129,6 @@ static void max98390_enable(struct device *dev) } struct chip_operations drivers_i2c_max98390_ops = { - CHIP_NAME("Maxim MAX98390 Codec") + .name = "Maxim MAX98390 Codec", .enable_dev = max98390_enable }; diff --git a/src/drivers/i2c/max98396/max98396.c b/src/drivers/i2c/max98396/max98396.c index 5288c4f4b1..6ad3931b50 100644 --- a/src/drivers/i2c/max98396/max98396.c +++ b/src/drivers/i2c/max98396/max98396.c @@ -96,6 +96,6 @@ static void max98396_enable(struct device *dev) } struct chip_operations drivers_i2c_max98396_ops = { - CHIP_NAME("Maxim MAX98396 Codec") + .name = "Maxim MAX98396 Codec", .enable_dev = max98396_enable }; diff --git a/src/drivers/i2c/max98927/max98927.c b/src/drivers/i2c/max98927/max98927.c index e80f569f1d..9935d10ff0 100644 --- a/src/drivers/i2c/max98927/max98927.c +++ b/src/drivers/i2c/max98927/max98927.c @@ -86,6 +86,6 @@ static void max98927_enable(struct device *dev) } struct chip_operations drivers_i2c_max98927_ops = { - CHIP_NAME("Maxim MAX98927 Codec") + .name = "Maxim MAX98927 Codec", .enable_dev = max98927_enable }; diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c index 060df7c775..9e82538ff4 100644 --- a/src/drivers/i2c/nau8825/nau8825.c +++ b/src/drivers/i2c/nau8825/nau8825.c @@ -103,6 +103,6 @@ static void nau8825_enable(struct device *dev) } struct chip_operations drivers_i2c_nau8825_ops = { - CHIP_NAME("Nuvoton NAU8825 Codec") + .name = "Nuvoton NAU8825 Codec", .enable_dev = nau8825_enable }; diff --git a/src/drivers/i2c/nct7802y/nct7802y.c b/src/drivers/i2c/nct7802y/nct7802y.c index bb52a3fd0b..f313ef7f10 100644 --- a/src/drivers/i2c/nct7802y/nct7802y.c +++ b/src/drivers/i2c/nct7802y/nct7802y.c @@ -45,6 +45,6 @@ static void nct7802y_enable(struct device *const dev) } struct chip_operations drivers_i2c_nct7802y_ops = { - CHIP_NAME("NCT7802Y") + .name = "NCT7802Y", .enable_dev = nct7802y_enable }; diff --git a/src/drivers/i2c/pca9538/pca9538.c b/src/drivers/i2c/pca9538/pca9538.c index 1658b9e378..f8933ec105 100644 --- a/src/drivers/i2c/pca9538/pca9538.c +++ b/src/drivers/i2c/pca9538/pca9538.c @@ -49,6 +49,6 @@ static void pca9538_enable(struct device *dev) } struct chip_operations drivers_i2c_pca9538_ops = { - CHIP_NAME("PCA9538") + .name = "PCA9538", .enable_dev = pca9538_enable }; diff --git a/src/drivers/i2c/pcf8523/pcf8523.c b/src/drivers/i2c/pcf8523/pcf8523.c index 8d368b29a1..717bc90bb2 100644 --- a/src/drivers/i2c/pcf8523/pcf8523.c +++ b/src/drivers/i2c/pcf8523/pcf8523.c @@ -129,6 +129,6 @@ static void pcf8523_enable(struct device *dev) } struct chip_operations drivers_i2c_pcf8523_ops = { - CHIP_NAME("PCF8523") + .name = "PCF8523", .enable_dev = pcf8523_enable }; diff --git a/src/drivers/i2c/pi608gp/pi608gp.c b/src/drivers/i2c/pi608gp/pi608gp.c index 2c61a80b00..62d462eec8 100644 --- a/src/drivers/i2c/pi608gp/pi608gp.c +++ b/src/drivers/i2c/pi608gp/pi608gp.c @@ -188,5 +188,5 @@ struct device_operations pi608gp_ops = { }; struct chip_operations drivers_i2c_pi608gp_ops = { - CHIP_NAME("PI7C9X2G608GP") + .name = "PI7C9X2G608GP", }; diff --git a/src/drivers/i2c/ptn3460/ptn3460.c b/src/drivers/i2c/ptn3460/ptn3460.c index 7dee2222a0..93acb1834e 100644 --- a/src/drivers/i2c/ptn3460/ptn3460.c +++ b/src/drivers/i2c/ptn3460/ptn3460.c @@ -148,7 +148,7 @@ static void ptn3460_enable(struct device *dev) } struct chip_operations drivers_i2c_ptn3460_ops = { - CHIP_NAME("PTN3460") + .name = "PTN3460", .enable_dev = ptn3460_enable }; diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c index 9a21748e53..bf62a6f06d 100644 --- a/src/drivers/i2c/rt1011/rt1011.c +++ b/src/drivers/i2c/rt1011/rt1011.c @@ -103,6 +103,6 @@ static void rt1011_enable(struct device *dev) } struct chip_operations drivers_i2c_rt1011_ops = { - CHIP_NAME("Realtek RT1011 Codec") + .name = "Realtek RT1011 Codec", .enable_dev = rt1011_enable }; diff --git a/src/drivers/i2c/rt5663/rt5663.c b/src/drivers/i2c/rt5663/rt5663.c index 9949566c04..e2341ddf13 100644 --- a/src/drivers/i2c/rt5663/rt5663.c +++ b/src/drivers/i2c/rt5663/rt5663.c @@ -84,6 +84,6 @@ static void rt5663_enable(struct device *dev) } struct chip_operations drivers_i2c_rt5663_ops = { - CHIP_NAME("Realtek RT5663 Codec") + .name = "Realtek RT5663 Codec", .enable_dev = rt5663_enable }; diff --git a/src/drivers/i2c/rtd2132/rtd2132.c b/src/drivers/i2c/rtd2132/rtd2132.c index 41dd887919..82b032e941 100644 --- a/src/drivers/i2c/rtd2132/rtd2132.c +++ b/src/drivers/i2c/rtd2132/rtd2132.c @@ -235,6 +235,6 @@ static void enable_dev(struct device *dev) } struct chip_operations drivers_i2c_rtd2132_ops = { - CHIP_NAME("Realtek RTD2132 LVDS Bridge") + .name = "Realtek RTD2132 LVDS Bridge", .enable_dev = enable_dev, }; diff --git a/src/drivers/i2c/rv3028c7/rv3028c7.c b/src/drivers/i2c/rv3028c7/rv3028c7.c index 87cbc24785..0a1e4b6872 100644 --- a/src/drivers/i2c/rv3028c7/rv3028c7.c +++ b/src/drivers/i2c/rv3028c7/rv3028c7.c @@ -251,6 +251,6 @@ static void rtc_enable(struct device *dev) } struct chip_operations drivers_i2c_rv3028c7_ops = { - CHIP_NAME("RV-3028-C7") + .name = "RV-3028-C7", .enable_dev = rtc_enable }; diff --git a/src/drivers/i2c/rx6110sa/rx6110sa.c b/src/drivers/i2c/rx6110sa/rx6110sa.c index 02b3d9f91b..ce5051d755 100644 --- a/src/drivers/i2c/rx6110sa/rx6110sa.c +++ b/src/drivers/i2c/rx6110sa/rx6110sa.c @@ -239,6 +239,6 @@ static void rx6110sa_enable(struct device *dev) } struct chip_operations drivers_i2c_rx6110sa_ops = { - CHIP_NAME("RX6110 SA") + .name = "RX6110 SA", .enable_dev = rx6110sa_enable }; diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c index 68aea6c80c..50946081bb 100644 --- a/src/drivers/i2c/sx9310/sx9310.c +++ b/src/drivers/i2c/sx9310/sx9310.c @@ -131,6 +131,6 @@ static void i2c_sx9310_enable(struct device *dev) } struct chip_operations drivers_i2c_sx9310_ops = { - CHIP_NAME(I2C_SX9310_ACPI_NAME) + .name = I2C_SX9310_ACPI_NAME, .enable_dev = i2c_sx9310_enable }; diff --git a/src/drivers/i2c/sx9324/sx9324.c b/src/drivers/i2c/sx9324/sx9324.c index 367849144f..05aca00b35 100644 --- a/src/drivers/i2c/sx9324/sx9324.c +++ b/src/drivers/i2c/sx9324/sx9324.c @@ -115,6 +115,6 @@ static void i2c_sx9324_enable(struct device *dev) } struct chip_operations drivers_i2c_sx9324_ops = { - CHIP_NAME(I2C_SX9324_CHIP_NAME) + .name = I2C_SX9324_CHIP_NAME, .enable_dev = i2c_sx9324_enable }; diff --git a/src/drivers/i2c/sx9360/sx9360.c b/src/drivers/i2c/sx9360/sx9360.c index 9ea4c8b90c..c9de0de860 100644 --- a/src/drivers/i2c/sx9360/sx9360.c +++ b/src/drivers/i2c/sx9360/sx9360.c @@ -102,6 +102,6 @@ static void i2c_sx9360_enable(struct device *dev) } struct chip_operations drivers_i2c_sx9360_ops = { - CHIP_NAME(I2C_SX9360_CHIP_NAME) + .name = I2C_SX9360_CHIP_NAME, .enable_dev = i2c_sx9360_enable }; diff --git a/src/drivers/i2c/tas5825m/tas5825m.c b/src/drivers/i2c/tas5825m/tas5825m.c index 39e5575f1e..9f14059a8e 100644 --- a/src/drivers/i2c/tas5825m/tas5825m.c +++ b/src/drivers/i2c/tas5825m/tas5825m.c @@ -75,6 +75,6 @@ static void tas5825m_enable_dev(struct device *dev) } struct chip_operations drivers_i2c_tas5825m_ops = { - CHIP_NAME("TI TAS5825M Amplifier") + .name = "TI TAS5825M Amplifier", .enable_dev = tas5825m_enable_dev, }; diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c index 07052f6f0d..a1d7389a0c 100644 --- a/src/drivers/i2c/tpm/chip.c +++ b/src/drivers/i2c/tpm/chip.c @@ -95,6 +95,6 @@ static void i2c_tpm_enable(struct device *dev) } struct chip_operations drivers_i2c_tpm_ops = { - CHIP_NAME("I2C TPM") + .name = "I2C TPM", .enable_dev = i2c_tpm_enable }; |