* [PATCH 0/2] i2c: use designated initializers for acpi_device_id
@ 2026-09-18 13:01 Pawel Zalewski
2026-09-18 13:01 ` [PATCH 1/2] i2c: i2c-core-acpi: use named " Pawel Zalewski
2026-09-18 13:01 ` [PATCH 2/2] i2c: busses: " Pawel Zalewski
0 siblings, 2 replies; 5+ messages in thread
From: Pawel Zalewski @ 2026-09-18 13:01 UTC (permalink / raw)
To: Andi Shyti, Mika Westerberg, Shyam Sundar S K, Elie Morisse,
Benson Leung, Guenter Roeck, Mika Westerberg, Andy Shevchenko,
Wolfram Sang, Devyn Liu, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Binbin Zhou,
Khalil Blaiech, Asmaa Mnebhi, Mukesh Kumar Savaliya,
Viken Dadhaniya, Ard Biesheuvel, Laxman Dewangan,
Dmitry Osipenko, Thierry Reding, Jonathan Hunter, Israel Cepeda,
Hans de Goede, Sakari Ailus, Hans Hu, George Cherian
Cc: linux-i2c, linux-acpi, linux-kernel, chrome-platform, imx,
linux-arm-kernel, linux-arm-msm, linux-tegra, Pawel Zalewski
This series is converting lists that contain the acpi_device_id struct,
which is defined in the include/linux/device-id/acpi.h to make use of named
initializers (which they do not use currently). This work is part of the on
going effort in the kernel associated with device-ids [1]
The plan is to convert acpi_device_id::driver_data to have an anonymous
union, similarly to what was introduced for PCI and I2C device ID tables.
The goal is to increase type-safety (most of the existing casts are gone),
to improve readability and to make use intent a bit more clear:
```
union {
kernel_ulong_t driver_data;
const void *driver_data_ptr;
}
```
But for that to work all lists containing the structs need to use named
initializers first to avoid triggering -Wmissing-braces. I already have
patches that implement this and touching a lot of kernel subsystmes that
use the acpi_device_id struct and that list keeps on growing. Therefore,
I have decided to split the series per every subsystem into:
- pre-clean-ups that convert the lists to use named initializers
(which is this series)
- actual implementations that make some of the modules use the new
driver_data_ptr member
That way the task can be fragmented into manageable and independent chunks
of work and makes this effort easier to review.
Tested builds on x86-64 and a64 in Yocto using 7.3-rc3.
[1] https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
Pawel Zalewski (2):
i2c: i2c-core-acpi: use named initializers for acpi_device_id
i2c: busses: use named initializers for acpi_device_id
drivers/i2c/busses/i2c-amd-asf-plat.c | 2 +-
drivers/i2c/busses/i2c-amd-mp2-plat.c | 2 +-
drivers/i2c/busses/i2c-cros-ec-tunnel.c | 2 +-
drivers/i2c/busses/i2c-designware-platdrv.c | 42 ++++++++++++++---------------
drivers/i2c/busses/i2c-gpio.c | 2 +-
drivers/i2c/busses/i2c-hisi.c | 2 +-
drivers/i2c/busses/i2c-imx.c | 2 +-
drivers/i2c/busses/i2c-ls2x.c | 2 +-
drivers/i2c/busses/i2c-mlxbf.c | 8 +++---
drivers/i2c/busses/i2c-qcom-geni.c | 4 +--
drivers/i2c/busses/i2c-qup.c | 2 +-
drivers/i2c/busses/i2c-scmi.c | 8 +++---
drivers/i2c/busses/i2c-synquacer.c | 4 +--
drivers/i2c/busses/i2c-tegra.c | 8 +++---
drivers/i2c/busses/i2c-usbio.c | 12 ++++-----
drivers/i2c/busses/i2c-viai2c-zhaoxin.c | 2 +-
drivers/i2c/busses/i2c-xgene-slimpro.c | 6 ++---
drivers/i2c/busses/i2c-xlp9xx.c | 6 ++---
drivers/i2c/i2c-core-acpi.c | 14 +++++-----
19 files changed, 65 insertions(+), 65 deletions(-)
---
base-commit: 238650ef6c7c7cca08e032527329424c9fbd70e5
change-id: 20260917-acpi-i2c-4198c83df77e
Best regards,
--
Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] i2c: i2c-core-acpi: use named initializers for acpi_device_id
2026-09-18 13:01 [PATCH 0/2] i2c: use designated initializers for acpi_device_id Pawel Zalewski
@ 2026-09-18 13:01 ` Pawel Zalewski
2026-09-21 4:49 ` Mika Westerberg
2026-09-18 13:01 ` [PATCH 2/2] i2c: busses: " Pawel Zalewski
1 sibling, 1 reply; 5+ messages in thread
From: Pawel Zalewski @ 2026-09-18 13:01 UTC (permalink / raw)
To: Andi Shyti, Mika Westerberg, Shyam Sundar S K, Elie Morisse,
Benson Leung, Guenter Roeck, Mika Westerberg, Andy Shevchenko,
Wolfram Sang, Devyn Liu, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Binbin Zhou,
Khalil Blaiech, Asmaa Mnebhi, Mukesh Kumar Savaliya,
Viken Dadhaniya, Ard Biesheuvel, Laxman Dewangan,
Dmitry Osipenko, Thierry Reding, Jonathan Hunter, Israel Cepeda,
Hans de Goede, Sakari Ailus, Hans Hu, George Cherian
Cc: linux-i2c, linux-acpi, linux-kernel, chrome-platform, imx,
linux-arm-kernel, linux-arm-msm, linux-tegra, Pawel Zalewski
Use a designated initializer for the acpi_device_id fields which makes the
code more readable and consistent with how lists are initialized in the
rest of the kernel code base. Also drop explicitly setting fields to 0
where it is redundant.
Unify the list terminator to have a single space between the brackets and
no trailing comma.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
drivers/i2c/i2c-core-acpi.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index 8f3bdd50186e..5161e8a7ca10 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -352,8 +352,8 @@ static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = {
* at 400KHz (as can be expected of any recent i2c hw) so we force
* the speed of the bus to 400 KHz if a Silead device is present.
*/
- { "MSSL1680", 0 },
- {}
+ { .id = "MSSL1680" },
+ { }
};
static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = {
@@ -371,11 +371,11 @@ static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = {
* the device works without issues on Windows at what is expected to be
* a 400KHz frequency. The root cause of the issue is not known.
*/
- { "DLL0945", 0 },
- { "ELAN0678", 0 },
- { "ELAN06FA", 0 },
- { "ELAN1300", 0 },
- {}
+ { .id = "DLL0945" },
+ { .id = "ELAN0678" },
+ { .id = "ELAN06FA" },
+ { .id = "ELAN1300" },
+ { }
};
static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] i2c: busses: use named initializers for acpi_device_id
2026-09-18 13:01 [PATCH 0/2] i2c: use designated initializers for acpi_device_id Pawel Zalewski
2026-09-18 13:01 ` [PATCH 1/2] i2c: i2c-core-acpi: use named " Pawel Zalewski
@ 2026-09-18 13:01 ` Pawel Zalewski
2026-09-21 4:51 ` Mika Westerberg
1 sibling, 1 reply; 5+ messages in thread
From: Pawel Zalewski @ 2026-09-18 13:01 UTC (permalink / raw)
To: Andi Shyti, Mika Westerberg, Shyam Sundar S K, Elie Morisse,
Benson Leung, Guenter Roeck, Mika Westerberg, Andy Shevchenko,
Wolfram Sang, Devyn Liu, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Binbin Zhou,
Khalil Blaiech, Asmaa Mnebhi, Mukesh Kumar Savaliya,
Viken Dadhaniya, Ard Biesheuvel, Laxman Dewangan,
Dmitry Osipenko, Thierry Reding, Jonathan Hunter, Israel Cepeda,
Hans de Goede, Sakari Ailus, Hans Hu, George Cherian
Cc: linux-i2c, linux-acpi, linux-kernel, chrome-platform, imx,
linux-arm-kernel, linux-arm-msm, linux-tegra, Pawel Zalewski
Use a designated initializer for the acpi_device_id fields which makes the
code more readable and consistent with how lists are initialized in the
rest of the kernel code base. Also drop explicitly setting fields to 0
where it is redundant.
Unify the list terminator to have a single space between the brackets and
no trailing comma.
Unify list item alignment to have a single space padding between the
brackets.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
drivers/i2c/busses/i2c-amd-asf-plat.c | 2 +-
drivers/i2c/busses/i2c-amd-mp2-plat.c | 2 +-
drivers/i2c/busses/i2c-cros-ec-tunnel.c | 2 +-
drivers/i2c/busses/i2c-designware-platdrv.c | 42 ++++++++++++++---------------
drivers/i2c/busses/i2c-gpio.c | 2 +-
drivers/i2c/busses/i2c-hisi.c | 2 +-
drivers/i2c/busses/i2c-imx.c | 2 +-
drivers/i2c/busses/i2c-ls2x.c | 2 +-
drivers/i2c/busses/i2c-mlxbf.c | 8 +++---
drivers/i2c/busses/i2c-qcom-geni.c | 4 +--
drivers/i2c/busses/i2c-qup.c | 2 +-
drivers/i2c/busses/i2c-scmi.c | 8 +++---
drivers/i2c/busses/i2c-synquacer.c | 4 +--
drivers/i2c/busses/i2c-tegra.c | 8 +++---
drivers/i2c/busses/i2c-usbio.c | 12 ++++-----
drivers/i2c/busses/i2c-viai2c-zhaoxin.c | 2 +-
drivers/i2c/busses/i2c-xgene-slimpro.c | 6 ++---
drivers/i2c/busses/i2c-xlp9xx.c | 6 ++---
18 files changed, 58 insertions(+), 58 deletions(-)
diff --git a/drivers/i2c/busses/i2c-amd-asf-plat.c b/drivers/i2c/busses/i2c-amd-asf-plat.c
index b0b40fe1d79bf..2a5711411ee5c 100644
--- a/drivers/i2c/busses/i2c-amd-asf-plat.c
+++ b/drivers/i2c/busses/i2c-amd-asf-plat.c
@@ -354,7 +354,7 @@ static int amd_asf_probe(struct platform_device *pdev)
}
static const struct acpi_device_id amd_asf_acpi_ids[] = {
- { "AMDI001A" },
+ { .id = "AMDI001A" },
{ }
};
MODULE_DEVICE_TABLE(acpi, amd_asf_acpi_ids);
diff --git a/drivers/i2c/busses/i2c-amd-mp2-plat.c b/drivers/i2c/busses/i2c-amd-mp2-plat.c
index 9fdd6a5fb8b65..cc5961364bcc0 100644
--- a/drivers/i2c/busses/i2c-amd-mp2-plat.c
+++ b/drivers/i2c/busses/i2c-amd-mp2-plat.c
@@ -341,7 +341,7 @@ static void i2c_amd_remove(struct platform_device *pdev)
}
static const struct acpi_device_id i2c_amd_acpi_match[] = {
- { "AMDI0011" },
+ { .id = "AMDI0011" },
{ }
};
MODULE_DEVICE_TABLE(acpi, i2c_amd_acpi_match);
diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
index 208ce4f9e782c..a83e735d2086c 100644
--- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c
+++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
@@ -300,7 +300,7 @@ static const struct of_device_id cros_ec_i2c_of_match[] __maybe_unused = {
MODULE_DEVICE_TABLE(of, cros_ec_i2c_of_match);
static const struct acpi_device_id cros_ec_i2c_tunnel_acpi_id[] __maybe_unused = {
- { "GOOG0012", 0 },
+ { .id = "GOOG0012" },
{ }
};
MODULE_DEVICE_TABLE(acpi, cros_ec_i2c_tunnel_acpi_id);
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 447af5523c2e4..1da6b0314b6a0 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -260,27 +260,27 @@ static const struct of_device_id dw_i2c_of_match[] = {
MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
static const struct acpi_device_id dw_i2c_acpi_match[] = {
- { "80860F41", ACCESS_NO_IRQ_SUSPEND },
- { "808622C1", ACCESS_NO_IRQ_SUSPEND },
- { "AMD0010", ACCESS_INTR_MASK },
- { "AMDI0010", ACCESS_INTR_MASK },
- { "AMDI0019", ACCESS_INTR_MASK | ARBITRATION_SEMAPHORE },
- { "AMDI0510", 0 },
- { "APMC0D0F", 0 },
- { "FUJI200B", 0 },
- { "GOOG5000", 0 },
- { "HISI02A1", 0 },
- { "HISI02A2", 0 },
- { "HISI02A3", 0 },
- { "HJMC3001", ACCESS_INTR_MASK },
- { "HYGO0010", ACCESS_INTR_MASK },
- { "INT33C2", 0 },
- { "INT33C3", 0 },
- { "INT3432", 0 },
- { "INT3433", 0 },
- { "INTC10EF", 0 },
- { "LECA0003", 0 },
- {}
+ { .id = "80860F41", .driver_data = ACCESS_NO_IRQ_SUSPEND },
+ { .id = "808622C1", .driver_data = ACCESS_NO_IRQ_SUSPEND },
+ { .id = "AMD0010", .driver_data = ACCESS_INTR_MASK },
+ { .id = "AMDI0010", .driver_data = ACCESS_INTR_MASK },
+ { .id = "AMDI0019", .driver_data = ACCESS_INTR_MASK | ARBITRATION_SEMAPHORE },
+ { .id = "AMDI0510" },
+ { .id = "APMC0D0F" },
+ { .id = "FUJI200B" },
+ { .id = "GOOG5000" },
+ { .id = "HISI02A1" },
+ { .id = "HISI02A2" },
+ { .id = "HISI02A3" },
+ { .id = "HJMC3001", .driver_data = ACCESS_INTR_MASK },
+ { .id = "HYGO0010", .driver_data = ACCESS_INTR_MASK },
+ { .id = "INT33C2" },
+ { .id = "INT33C3" },
+ { .id = "INT3432" },
+ { .id = "INT3433" },
+ { .id = "INTC10EF" },
+ { .id = "LECA0003" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 6294b0b0cc8f7..56d6847cbf6d7 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -664,7 +664,7 @@ static const struct of_device_id i2c_gpio_dt_ids[] = {
MODULE_DEVICE_TABLE(of, i2c_gpio_dt_ids);
static const struct acpi_device_id i2c_gpio_acpi_match[] = {
- { "LOON0005" }, /* LoongArch */
+ { .id = "LOON0005" }, /* LoongArch */
{ }
};
MODULE_DEVICE_TABLE(acpi, i2c_gpio_acpi_match);
diff --git a/drivers/i2c/busses/i2c-hisi.c b/drivers/i2c/busses/i2c-hisi.c
index ba5c9579ae190..fca1ca011312d 100644
--- a/drivers/i2c/busses/i2c-hisi.c
+++ b/drivers/i2c/busses/i2c-hisi.c
@@ -516,7 +516,7 @@ static int hisi_i2c_probe(struct platform_device *pdev)
}
static const struct acpi_device_id hisi_i2c_acpi_ids[] = {
- { "HISI03D1", 0 },
+ { .id = "HISI03D1" },
{ }
};
MODULE_DEVICE_TABLE(acpi, hisi_i2c_acpi_ids);
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 19ec056b00afe..e5fb493327b10 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -349,7 +349,7 @@ static const struct of_device_id i2c_imx_dt_ids[] = {
MODULE_DEVICE_TABLE(of, i2c_imx_dt_ids);
static const struct acpi_device_id i2c_imx_acpi_ids[] = {
- {"NXP0001", .driver_data = (kernel_ulong_t)&vf610_i2c_hwdata},
+ { .id = "NXP0001", .driver_data = (kernel_ulong_t)&vf610_i2c_hwdata },
{ }
};
MODULE_DEVICE_TABLE(acpi, i2c_imx_acpi_ids);
diff --git a/drivers/i2c/busses/i2c-ls2x.c b/drivers/i2c/busses/i2c-ls2x.c
index af7bf61b0f4d7..ef2e2a26981e5 100644
--- a/drivers/i2c/busses/i2c-ls2x.c
+++ b/drivers/i2c/busses/i2c-ls2x.c
@@ -356,7 +356,7 @@ static const struct of_device_id ls2x_i2c_id_table[] = {
MODULE_DEVICE_TABLE(of, ls2x_i2c_id_table);
static const struct acpi_device_id ls2x_i2c_acpi_match[] = {
- { "LOON0004" }, /* Loongson LS7A */
+ { .id = "LOON0004" }, /* Loongson LS7A */
{ }
};
MODULE_DEVICE_TABLE(acpi, ls2x_i2c_acpi_match);
diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index 24ccc4546ab88..0cc8b9e5f3336 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -2198,10 +2198,10 @@ static struct i2c_adapter_quirks mlxbf_i2c_quirks = {
};
static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
- { "MLNXBF03", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] },
- { "MLNXBF23", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2] },
- { "MLNXBF31", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_3] },
- {},
+ { .id = "MLNXBF03", .driver_data = (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] },
+ { .id = "MLNXBF23", .driver_data = (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2] },
+ { .id = "MLNXBF31", .driver_data = (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_3] },
+ { }
};
MODULE_DEVICE_TABLE(acpi, mlxbf_i2c_acpi_ids);
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index 00013b41a6f59..37a071b885f0b 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -1303,8 +1303,8 @@ static const struct geni_i2c_desc sa8255p_geni_i2c = {
#ifdef CONFIG_ACPI
static const struct acpi_device_id geni_i2c_acpi_match[] = {
- { "QCOM0220", (kernel_ulong_t)&geni_i2c},
- { "QCOM0411", (kernel_ulong_t)&geni_i2c},
+ { .id = "QCOM0220", .driver_data = (kernel_ulong_t)&geni_i2c },
+ { .id = "QCOM0411", .driver_data = (kernel_ulong_t)&geni_i2c },
{ }
};
MODULE_DEVICE_TABLE(acpi, geni_i2c_acpi_match);
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index ee7915ee2ba2f..ce30634e1f402 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1688,7 +1688,7 @@ static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup)
}
static const struct acpi_device_id qup_i2c_acpi_match[] = {
- { "QCOM8010"},
+ { .id = "QCOM8010" },
{ }
};
MODULE_DEVICE_TABLE(acpi, qup_i2c_acpi_match);
diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c
index 324a63efa1ab9..37442c9ee2229 100644
--- a/drivers/i2c/busses/i2c-scmi.c
+++ b/drivers/i2c/busses/i2c-scmi.c
@@ -42,10 +42,10 @@ static const struct smbus_methods_t ibm_smbus_methods = {
};
static const struct acpi_device_id acpi_smbus_cmi_ids[] = {
- {"SMBUS01", (kernel_ulong_t)&smbus_methods},
- {ACPI_SMBUS_IBM_HID, (kernel_ulong_t)&ibm_smbus_methods},
- {ACPI_SMBUS_MS_HID, (kernel_ulong_t)&smbus_methods},
- {"", 0}
+ { .id = "SMBUS01", .driver_data = (kernel_ulong_t)&smbus_methods },
+ { .id = ACPI_SMBUS_IBM_HID, .driver_data = (kernel_ulong_t)&ibm_smbus_methods },
+ { .id = ACPI_SMBUS_MS_HID, .driver_data = (kernel_ulong_t)&smbus_methods },
+ { }
};
MODULE_DEVICE_TABLE(acpi, acpi_smbus_cmi_ids);
diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c
index 0216e398f2740..968cbe32161ed 100644
--- a/drivers/i2c/busses/i2c-synquacer.c
+++ b/drivers/i2c/busses/i2c-synquacer.c
@@ -622,8 +622,8 @@ MODULE_DEVICE_TABLE(of, synquacer_i2c_dt_ids);
#ifdef CONFIG_ACPI
static const struct acpi_device_id synquacer_i2c_acpi_ids[] = {
- { "SCX0003" },
- { /* sentinel */ }
+ { .id = "SCX0003" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, synquacer_i2c_acpi_ids);
#endif
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 9c281b4905ebd..76d21bc51c618 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -2486,10 +2486,10 @@ static const struct dev_pm_ops tegra_i2c_pm = {
};
static const struct acpi_device_id tegra_i2c_acpi_match[] = {
- {.id = "NVDA0101", .driver_data = (kernel_ulong_t)&tegra210_i2c_hw},
- {.id = "NVDA0201", .driver_data = (kernel_ulong_t)&tegra186_i2c_hw},
- {.id = "NVDA0301", .driver_data = (kernel_ulong_t)&tegra194_i2c_hw},
- {.id = "NVDA2017", .driver_data = (kernel_ulong_t)&tegra410_i2c_hw},
+ { .id = "NVDA0101", .driver_data = (kernel_ulong_t)&tegra210_i2c_hw },
+ { .id = "NVDA0201", .driver_data = (kernel_ulong_t)&tegra186_i2c_hw },
+ { .id = "NVDA0301", .driver_data = (kernel_ulong_t)&tegra194_i2c_hw },
+ { .id = "NVDA2017", .driver_data = (kernel_ulong_t)&tegra410_i2c_hw },
{ }
};
MODULE_DEVICE_TABLE(acpi, tegra_i2c_acpi_match);
diff --git a/drivers/i2c/busses/i2c-usbio.c b/drivers/i2c/busses/i2c-usbio.c
index 259754e5fd05b..66da1e90848ae 100644
--- a/drivers/i2c/busses/i2c-usbio.c
+++ b/drivers/i2c/busses/i2c-usbio.c
@@ -24,12 +24,12 @@ struct usbio_i2c {
};
static const struct acpi_device_id usbio_i2c_acpi_hids[] = {
- { "INTC1008" }, /* MTL */
- { "INTC10B3" }, /* ARL */
- { "INTC10B6" }, /* LNL */
- { "INTC10D2" }, /* MTL-CVF */
- { "INTC10E3" }, /* PTL */
- { "INTC1118" }, /* NVL */
+ { .id = "INTC1008" }, /* MTL */
+ { .id = "INTC10B3" }, /* ARL */
+ { .id = "INTC10B6" }, /* LNL */
+ { .id = "INTC10D2" }, /* MTL-CVF */
+ { .id = "INTC10E3" }, /* PTL */
+ { .id = "INTC1118" }, /* NVL */
{ }
};
diff --git a/drivers/i2c/busses/i2c-viai2c-zhaoxin.c b/drivers/i2c/busses/i2c-viai2c-zhaoxin.c
index 764a2dbc957ab..81f0bfdf919f8 100644
--- a/drivers/i2c/busses/i2c-viai2c-zhaoxin.c
+++ b/drivers/i2c/busses/i2c-viai2c-zhaoxin.c
@@ -345,7 +345,7 @@ static const struct dev_pm_ops zxi2c_pm = {
};
static const struct acpi_device_id zxi2c_acpi_match[] = {
- {"IIC1D17", 0 },
+ { .id = "IIC1D17" },
{ }
};
MODULE_DEVICE_TABLE(acpi, zxi2c_acpi_match);
diff --git a/drivers/i2c/busses/i2c-xgene-slimpro.c b/drivers/i2c/busses/i2c-xgene-slimpro.c
index b29dec66b2c33..08a126aa83dfa 100644
--- a/drivers/i2c/busses/i2c-xgene-slimpro.c
+++ b/drivers/i2c/busses/i2c-xgene-slimpro.c
@@ -539,9 +539,9 @@ MODULE_DEVICE_TABLE(of, xgene_slimpro_i2c_dt_ids);
#ifdef CONFIG_ACPI
static const struct acpi_device_id xgene_slimpro_i2c_acpi_ids[] = {
- {"APMC0D40", XGENE_SLIMPRO_I2C_V1},
- {"APMC0D8B", XGENE_SLIMPRO_I2C_V2},
- {}
+ { .id = "APMC0D40", .driver_data = XGENE_SLIMPRO_I2C_V1 },
+ { .id = "APMC0D8B", .driver_data = XGENE_SLIMPRO_I2C_V2 },
+ { }
};
MODULE_DEVICE_TABLE(acpi, xgene_slimpro_i2c_acpi_ids);
#endif
diff --git a/drivers/i2c/busses/i2c-xlp9xx.c b/drivers/i2c/busses/i2c-xlp9xx.c
index ad0e5cd218f0f..44cad95ee8abc 100644
--- a/drivers/i2c/busses/i2c-xlp9xx.c
+++ b/drivers/i2c/busses/i2c-xlp9xx.c
@@ -570,9 +570,9 @@ static void xlp9xx_i2c_remove(struct platform_device *pdev)
#ifdef CONFIG_ACPI
static const struct acpi_device_id xlp9xx_i2c_acpi_ids[] = {
- {"BRCM9007", 0},
- {"CAV9007", 0},
- {}
+ { .id = "BRCM9007" },
+ { .id = "CAV9007" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, xlp9xx_i2c_acpi_ids);
#endif
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] i2c: i2c-core-acpi: use named initializers for acpi_device_id
2026-09-18 13:01 ` [PATCH 1/2] i2c: i2c-core-acpi: use named " Pawel Zalewski
@ 2026-09-21 4:49 ` Mika Westerberg
0 siblings, 0 replies; 5+ messages in thread
From: Mika Westerberg @ 2026-09-21 4:49 UTC (permalink / raw)
To: Pawel Zalewski
Cc: Andi Shyti, Mika Westerberg, Shyam Sundar S K, Elie Morisse,
Benson Leung, Guenter Roeck, Andy Shevchenko, Wolfram Sang,
Devyn Liu, Oleksij Rempel, Pengutronix Kernel Team, Frank Li,
Sascha Hauer, Fabio Estevam, Binbin Zhou, Khalil Blaiech,
Asmaa Mnebhi, Mukesh Kumar Savaliya, Viken Dadhaniya,
Ard Biesheuvel, Laxman Dewangan, Dmitry Osipenko, Thierry Reding,
Jonathan Hunter, Israel Cepeda, Hans de Goede, Sakari Ailus,
Hans Hu, George Cherian, linux-i2c, linux-acpi, linux-kernel,
chrome-platform, imx, linux-arm-kernel, linux-arm-msm,
linux-tegra
On Fri, Sep 18, 2026 at 02:01:50PM +0100, Pawel Zalewski wrote:
> Use a designated initializer for the acpi_device_id fields which makes the
> code more readable and consistent with how lists are initialized in the
> rest of the kernel code base. Also drop explicitly setting fields to 0
> where it is redundant.
>
> Unify the list terminator to have a single space between the brackets and
> no trailing comma.
>
> Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Acked-by: Mika Westerberg <westeri@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] i2c: busses: use named initializers for acpi_device_id
2026-09-18 13:01 ` [PATCH 2/2] i2c: busses: " Pawel Zalewski
@ 2026-09-21 4:51 ` Mika Westerberg
0 siblings, 0 replies; 5+ messages in thread
From: Mika Westerberg @ 2026-09-21 4:51 UTC (permalink / raw)
To: Pawel Zalewski
Cc: Andi Shyti, Mika Westerberg, Shyam Sundar S K, Elie Morisse,
Benson Leung, Guenter Roeck, Andy Shevchenko, Wolfram Sang,
Devyn Liu, Oleksij Rempel, Pengutronix Kernel Team, Frank Li,
Sascha Hauer, Fabio Estevam, Binbin Zhou, Khalil Blaiech,
Asmaa Mnebhi, Mukesh Kumar Savaliya, Viken Dadhaniya,
Ard Biesheuvel, Laxman Dewangan, Dmitry Osipenko, Thierry Reding,
Jonathan Hunter, Israel Cepeda, Hans de Goede, Sakari Ailus,
Hans Hu, George Cherian, linux-i2c, linux-acpi, linux-kernel,
chrome-platform, imx, linux-arm-kernel, linux-arm-msm,
linux-tegra
On Fri, Sep 18, 2026 at 02:01:51PM +0100, Pawel Zalewski wrote:
> Use a designated initializer for the acpi_device_id fields which makes the
> code more readable and consistent with how lists are initialized in the
> rest of the kernel code base. Also drop explicitly setting fields to 0
> where it is redundant.
>
> Unify the list terminator to have a single space between the brackets and
> no trailing comma.
>
> Unify list item alignment to have a single space padding between the
> brackets.
>
> Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
> ---
> drivers/i2c/busses/i2c-amd-asf-plat.c | 2 +-
> drivers/i2c/busses/i2c-amd-mp2-plat.c | 2 +-
> drivers/i2c/busses/i2c-cros-ec-tunnel.c | 2 +-
> drivers/i2c/busses/i2c-designware-platdrv.c | 42 ++++++++++++++---------------
For i2c-dw:
Acked-by: Mika Westerberg <westeri@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-21 4:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-18 13:01 [PATCH 0/2] i2c: use designated initializers for acpi_device_id Pawel Zalewski
2026-09-18 13:01 ` [PATCH 1/2] i2c: i2c-core-acpi: use named " Pawel Zalewski
2026-09-21 4:49 ` Mika Westerberg
2026-09-18 13:01 ` [PATCH 2/2] i2c: busses: " Pawel Zalewski
2026-09-21 4:51 ` Mika Westerberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®