mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/12] iio: use designated initializers for acpi_device_id
@ 2026-10-05 14:01 Pawel Zalewski
  2026-10-05 14:01 ` [PATCH 01/12] iio: accel: use named " Pawel Zalewski
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Pawel Zalewski @ 2026-10-05 14:01 UTC (permalink / raw)
  To: Nuno Sá,
	Michael Hennerich, Jonathan Cameron, David Lechner,
	Andy Shevchenko, Petre Rodan, Matteo Martelli, Marius Cristea,
	Matti Vaittinen, Lorenzo Bianconi, Alex Lanzano, Jagath Jog J,
	Jean-Baptiste Maneyrol, Kevin Tsai, Eddie James, Marcelo Schmitt
  Cc: linux, linux-iio, linux-kernel, 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-rc6.

[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 (12):
      iio: accel: use named initializers for acpi_device_id
      iio: adc: use named initializers for acpi_device_id
      iio: dac: use named initializers for acpi_device_id
      iio: gyro: bmg160_i2c: use named initializers for acpi_device_id
      iio: humidity: use named initializers for acpi_device_id
      iio: imu: use named initializers for acpi_device_id
      iio: light: use named initializers for acpi_device_id
      iio: magnetometer: use named initializers for acpi_device_id
      iio: potentiometer: max5487: use named initializers for acpi_device_id
      iio: pressure: use named initializers for acpi_device_id
      iio: proximity: use named initializers for acpi_device_id
      iio: temperature: max30208: use named initializers for acpi_device_id

 drivers/iio/accel/adxl345_i2c.c             |  2 +-
 drivers/iio/accel/adxl345_spi.c             |  2 +-
 drivers/iio/accel/bma220_spi.c              |  2 +-
 drivers/iio/accel/bmc150-accel-i2c.c        | 24 ++++++++++++------------
 drivers/iio/accel/bmc150-accel-spi.c        | 16 ++++++++--------
 drivers/iio/accel/da280.c                   |  4 ++--
 drivers/iio/accel/kxcjk-1013.c              | 22 +++++++++++-----------
 drivers/iio/accel/mma7660.c                 |  2 +-
 drivers/iio/accel/mma9551.c                 |  2 +-
 drivers/iio/accel/mma9553.c                 |  2 +-
 drivers/iio/accel/mxc4005.c                 |  6 +++---
 drivers/iio/accel/mxc6255.c                 |  4 ++--
 drivers/iio/accel/st_accel_i2c.c            |  4 ++--
 drivers/iio/accel/stk8ba50.c                |  2 +-
 drivers/iio/adc/ad7298.c                    |  2 +-
 drivers/iio/adc/pac1921.c                   |  2 +-
 drivers/iio/adc/pac1934.c                   |  2 +-
 drivers/iio/adc/ti-adc081c.c                |  2 +-
 drivers/iio/adc/ti-adc108s102.c             |  2 +-
 drivers/iio/adc/ti-adc128s052.c             |  2 +-
 drivers/iio/dac/ad5592r.c                   |  2 +-
 drivers/iio/dac/ad5593r.c                   |  2 +-
 drivers/iio/gyro/bmg160_i2c.c               |  2 +-
 drivers/iio/humidity/hdc100x.c              |  2 +-
 drivers/iio/humidity/hts221_i2c.c           |  2 +-
 drivers/iio/imu/bmi160/bmi160_i2c.c         |  6 +++---
 drivers/iio/imu/bmi160/bmi160_spi.c         |  4 ++--
 drivers/iio/imu/bmi270/bmi270_i2c.c         |  4 ++--
 drivers/iio/imu/bmi323/bmi323_i2c.c         |  2 +-
 drivers/iio/imu/fxos8700_i2c.c              |  2 +-
 drivers/iio/imu/fxos8700_spi.c              |  2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c   |  2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c   |  2 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c |  4 ++--
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c |  2 +-
 drivers/iio/light/acpi-als.c                |  2 +-
 drivers/iio/light/al3320a.c                 |  2 +-
 drivers/iio/light/apds9960.c                |  2 +-
 drivers/iio/light/cm32181.c                 |  2 +-
 drivers/iio/light/isl29018.c                |  6 +++---
 drivers/iio/light/jsa1212.c                 |  2 +-
 drivers/iio/light/ltr501.c                  |  4 ++--
 drivers/iio/light/max44000.c                |  2 +-
 drivers/iio/light/pa12203001.c              |  2 +-
 drivers/iio/light/rpr0521.c                 |  2 +-
 drivers/iio/light/stk3310.c                 |  6 +++---
 drivers/iio/light/us5182d.c                 |  2 +-
 drivers/iio/magnetometer/ak8975.c           | 14 +++++++-------
 drivers/iio/magnetometer/mmc35240.c         |  2 +-
 drivers/iio/potentiometer/max5487.c         |  6 +++---
 drivers/iio/pressure/dps310.c               |  2 +-
 drivers/iio/pressure/hp206c.c               |  2 +-
 drivers/iio/pressure/st_pressure_i2c.c      |  2 +-
 drivers/iio/proximity/sx9310.c              |  4 ++--
 drivers/iio/proximity/sx9500.c              |  4 ++--
 drivers/iio/temperature/max30208.c          |  2 +-
 56 files changed, 109 insertions(+), 109 deletions(-)
---
base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
change-id: 20260929-acpi-iio-0a8198cd3198

Best regards,
--  
Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-10-06  7:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05 14:01 [PATCH 00/12] iio: use designated initializers for acpi_device_id Pawel Zalewski
2026-10-05 14:01 ` [PATCH 01/12] iio: accel: use named " Pawel Zalewski
2026-10-05 14:01 ` [PATCH 02/12] iio: adc: " Pawel Zalewski
2026-10-05 14:01 ` [PATCH 03/12] iio: dac: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 04/12] iio: gyro: bmg160_i2c: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 05/12] iio: humidity: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 06/12] iio: imu: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 07/12] iio: light: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 08/12] iio: magnetometer: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 09/12] iio: potentiometer: max5487: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 10/12] iio: pressure: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 11/12] iio: proximity: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 12/12] iio: temperature: max30208: " Pawel Zalewski
2026-10-06  7:26 ` [PATCH 00/12] iio: use designated " Joshua Crofts

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®