linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [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

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;
as well as URLs for NNTP newsgroup(s).