Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/9] iio: timestamp declaration cleanup
@ 2026-05-25  1:38 David Lechner
  2026-05-25  1:38 ` [PATCH v2 1/9] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal David Lechner
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: David Lechner @ 2026-05-25  1:38 UTC (permalink / raw)
  To: Jyoti Bhayana, Jonathan Cameron, Nuno Sá, Andy Shevchenko,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Maxime Coquelin,
	Alexandre Torgue, Benson Leung, Guenter Roeck
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-stm32,
	chrome-platform, David Lechner, Andy Shevchenko

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>



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

end of thread, other threads:[~2026-05-28  6:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-25  1:38 [PATCH v2 0/9] iio: timestamp declaration cleanup David Lechner
2026-05-25  1:38 ` [PATCH v2 1/9] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal David Lechner
2026-05-25  1:38 ` [PATCH v2 2/9] iio: common: scmi_sensors: simplify timestamp channel definition David Lechner
2026-05-25  1:38 ` [PATCH v2 3/9] iio: adc: dln2-adc: " David Lechner
2026-05-25  1:38 ` [PATCH v2 4/9] iio: adc: at91_adc: " David Lechner
2026-05-25  1:38 ` [PATCH v2 5/9] iio: adc: cc10001_adc: " David Lechner
2026-05-25  1:38 ` [PATCH v2 6/9] iio: adc: stm32-adc: " David Lechner
2026-05-25  1:38 ` [PATCH v2 7/9] iio: common: cros_ec_sensors: " David Lechner
2026-05-25  1:38 ` [PATCH v2 8/9] iio: light: cros_ec_light_prox: " David Lechner
2026-05-25  1:46 ` [PATCH] iio: pressure: cros_ec_baro: " David Lechner
2026-05-25  1:49   ` David Lechner
2026-05-26 18:12     ` Jonathan Cameron
2026-05-28  6:40   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox