public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/6] iio: core: Introduce cleanup.h support for mode locks
@ 2025-12-03 19:18 Kurt Borja
  2025-12-03 19:18 ` [PATCH RFC 1/6] iio: core: Match iio_device_claim_*() return semantics Kurt Borja
                   ` (6 more replies)
  0 siblings, 7 replies; 45+ messages in thread
From: Kurt Borja @ 2025-12-03 19:18 UTC (permalink / raw)
  To: Andy Shevchenko, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, Benson Leung, Antoniu Miclaus, Gwendal Grignou,
	Shrikant Raskar, Per-Daniel Olsson
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Guenter Roeck,
	Jonathan Cameron, linux-iio, linux-kernel, chrome-platform,
	Kurt Borja

Hi,

In a recent driver review discussion [1], Andy Shevchenko suggested we
add cleanup.h support for the lock API:

	iio_device_claim_{direct,buffer_mode}().

Which would allow some nice code simplification* in many places. Some
examples are given as patches, but the last two are the biggest
differences.

Although I was never entirely sure if Andy meant cleanup classes for
locks or for iio_trigger_notify_done(), I still think this is a great
addition to the API :).

Thanks for taking a look!

* It's important to mention that David Lechner expressed some concerns
  about this [2], hence why this is an RFC series.

[1] https://lore.kernel.org/linux-iio/aSsBdJZDWcadxEHC@smile.fi.intel.com/
[2] https://lore.kernel.org/linux-iio/248b009e-0401-4531-b9f0-56771e16bdef@baylibre.com/

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Kurt Borja (6):
      iio: core: Match iio_device_claim_*() return semantics
      iio: core: Match iio_device_claim_*() naming
      iio: core: Add cleanup.h support for iio_device_claim_*()
      iio: light: vcnl4000: Use cleanup.h for IIO locks
      iio: health: max30102: Use cleanup.h for IIO locks
      iio: light: opt4060: Use cleanup.h for IIO locks

 drivers/iio/adc/ade9000.c                          |  4 +-
 .../common/cros_ec_sensors/cros_ec_sensors_core.c  |  7 +--
 drivers/iio/health/max30100.c                      |  4 +-
 drivers/iio/health/max30102.c                      | 24 +++-------
 drivers/iio/industrialio-core.c                    | 34 +++++++++-----
 drivers/iio/light/opt4060.c                        | 52 +++++++---------------
 drivers/iio/light/vcnl4000.c                       | 24 ++++------
 include/linux/iio/iio.h                            | 24 +++++++++-
 8 files changed, 83 insertions(+), 90 deletions(-)
---
base-commit: f9e05791642810a0cf6237d39fafd6fec5e0b4bb
change-id: 20251130-lock-impr-6f22748c15e8

-- 
 ~ Kurt


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

end of thread, other threads:[~2025-12-10 18:04 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-03 19:18 [PATCH RFC 0/6] iio: core: Introduce cleanup.h support for mode locks Kurt Borja
2025-12-03 19:18 ` [PATCH RFC 1/6] iio: core: Match iio_device_claim_*() return semantics Kurt Borja
2025-12-04 14:23   ` Nuno Sá
2025-12-04 15:05     ` Andy Shevchenko
2025-12-06 18:07       ` Jonathan Cameron
2025-12-04 17:27     ` Kurt Borja
2025-12-06 18:05     ` Jonathan Cameron
2025-12-07 15:59       ` Kurt Borja
2025-12-03 19:18 ` [PATCH RFC 2/6] iio: core: Match iio_device_claim_*() naming Kurt Borja
2025-12-03 21:50   ` David Lechner
2025-12-04 17:35     ` Kurt Borja
2025-12-06 18:11       ` Jonathan Cameron
2025-12-03 19:18 ` [PATCH RFC 3/6] iio: core: Add cleanup.h support for iio_device_claim_*() Kurt Borja
2025-12-03 21:50   ` David Lechner
2025-12-03 22:34     ` David Lechner
2025-12-04 17:18       ` Kurt Borja
2025-12-04 17:36         ` Andy Shevchenko
2025-12-06 18:43           ` Jonathan Cameron
2025-12-06 20:40             ` Andy Shevchenko
2025-12-07 16:00             ` Kurt Borja
2025-12-06 18:20   ` Jonathan Cameron
2025-12-07 15:59     ` Kurt Borja
2025-12-03 19:18 ` [PATCH RFC 4/6] iio: light: vcnl4000: Use cleanup.h for IIO locks Kurt Borja
2025-12-03 22:19   ` David Lechner
2025-12-03 19:18 ` [PATCH RFC 5/6] iio: health: max30102: " Kurt Borja
2025-12-03 21:52   ` David Lechner
2025-12-04 17:07     ` Kurt Borja
2025-12-04 17:35       ` David Lechner
2025-12-04 17:47         ` Kurt Borja
2025-12-06 18:17           ` Jonathan Cameron
2025-12-07 15:59             ` Kurt Borja
2025-12-03 19:18 ` [PATCH RFC 6/6] iio: light: opt4060: " Kurt Borja
2025-12-03 22:40   ` David Lechner
2025-12-04 17:23     ` Kurt Borja
2025-12-04 14:42   ` Nuno Sá
2025-12-04 17:31     ` Kurt Borja
2025-12-04 14:36 ` [PATCH RFC 0/6] iio: core: Introduce cleanup.h support for mode locks Nuno Sá
2025-12-04 15:07   ` Andy Shevchenko
2025-12-06 18:46     ` Jonathan Cameron
2025-12-07 16:00       ` Kurt Borja
2025-12-09 10:34       ` Nuno Sá
2025-12-09 17:05         ` David Lechner
2025-12-10  9:17           ` Nuno Sá
2025-12-10 18:04             ` Jonathan Cameron
2025-12-04 17:33   ` Kurt Borja

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