[PATCH v2 0/9] iio: timestamp declaration cleanup

David Lechner posted 9 patches 4 hours ago
Only 8 patches received!
drivers/iio/adc/ad7606.c                              |  2 +-
drivers/iio/adc/at91_adc.c                            | 12 +++---------
drivers/iio/adc/cc10001_adc.c                         | 10 ++--------
drivers/iio/adc/dln2-adc.c                            | 12 +-----------
drivers/iio/adc/max11410.c                            |  2 +-
drivers/iio/adc/stm32-adc.c                           | 10 +---------
drivers/iio/common/cros_ec_sensors/cros_ec_activity.c |  8 +-------
drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c  |  8 +-------
drivers/iio/common/scmi_sensors/scmi_iio.c            | 13 +------------
drivers/iio/light/cros_ec_light_prox.c                |  8 +-------
drivers/iio/pressure/cros_ec_baro.c                   |  8 +-------
include/linux/iio/iio.h                               |  6 +++---
12 files changed, 17 insertions(+), 82 deletions(-)
[PATCH v2 0/9] iio: timestamp declaration cleanup
Posted by David Lechner 4 hours ago
While looking around the code, I noticed that there are a lot of places
were we are manually filling all of the fields of an IIO timestamp.

This is error-prone (as seen in the first patch) and more verbose than
it needs to be.

Thanks to Andy's patch, we can just make the macro a compound literal
so it can be used directly in assignments and initializers.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
Changes in v2:
- Include Andy's compound literal patch.
- Drop explicity compound literal in later patches.
- Link to v1: https://patch.msgid.link/20260517-iio-timestamp-cleanup-v1-0-61fb908c11c7@baylibre.com

---
Andy Shevchenko (1):
      iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal

David Lechner (8):
      iio: common: scmi_sensors: simplify timestamp channel definition
      iio: adc: dln2-adc: simplify timestamp channel definition
      iio: adc: at91_adc: simplify timestamp channel definition
      iio: adc: cc10001_adc: simplify timestamp channel definition
      iio: adc: stm32-adc: simplify timestamp channel definition
      iio: common: cros_ec_sensors: simplify timestamp channel definition
      iio: light: cros_ec_light_prox: simplify timestamp channel definition
      iio: pressure: cros_ec_baro: simplify timestamp channel definition

 drivers/iio/adc/ad7606.c                              |  2 +-
 drivers/iio/adc/at91_adc.c                            | 12 +++---------
 drivers/iio/adc/cc10001_adc.c                         | 10 ++--------
 drivers/iio/adc/dln2-adc.c                            | 12 +-----------
 drivers/iio/adc/max11410.c                            |  2 +-
 drivers/iio/adc/stm32-adc.c                           | 10 +---------
 drivers/iio/common/cros_ec_sensors/cros_ec_activity.c |  8 +-------
 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c  |  8 +-------
 drivers/iio/common/scmi_sensors/scmi_iio.c            | 13 +------------
 drivers/iio/light/cros_ec_light_prox.c                |  8 +-------
 drivers/iio/pressure/cros_ec_baro.c                   |  8 +-------
 include/linux/iio/iio.h                               |  6 +++---
 12 files changed, 17 insertions(+), 82 deletions(-)
---
base-commit: e1a29334a9c043defe7a9363fa76d399d3fdfbec
change-id: 20260517-iio-timestamp-cleanup-1ee82f081a70

Best regards,
--  
David Lechner <dlechner@baylibre.com>