public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] iio: adc: ad9467: Support alternative backends
@ 2026-01-30  9:16 Tomas Melin
  2026-01-30  9:16 ` [PATCH v5 1/4] iio: industrialio-backend: support backend capabilities Tomas Melin
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Tomas Melin @ 2026-01-30  9:16 UTC (permalink / raw)
  To: Michael Hennerich, Nuno Sa, Lars-Peter Clausen, Jonathan Cameron,
	David Lechner, Andy Shevchenko, Olivier Moysan
  Cc: linux-iio, linux-kernel, Tomas Melin

To facilitate backends with different set of features, add support
for defining capabilities provided by the backend. These capabilities
typically extend beyond a single operation and are therefore not
directly linked to if a single function call is implemented or not.
Furthermore, the capabilities determine if a certain set of operations
should be attempted, or skipped by the frontend. This way
the frontend driver can work with a minimalistic set of features and
still have the device in fully functional state.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
---
Changes in v5:
- As per recommendation, use guard for whole block
- Typo fix in commit message and cover letter
- Link to v4: https://lore.kernel.org/r/20260121-b4-ad9467-optional-backend-v4-0-18d2c0d450cc@vaisala.com

Changes in v4:
- Readd CAP_BUFFERING and also add CAP_ALWAYS_ON to support backends
  that do not need explicit enable/disable
- Don't mix checks for eopnotsupp and caps. Prefer capability checking
  also for caps that map to single operation
- Move capability checking to top of call stack
- Revise iio_backend_has_caps to use bool signature and fixup semantics
- Amend documentation texts
- Add capability checks for axi-dac
- Drop two's complement patch from this series, already applied
- Link to v3: https://lore.kernel.org/r/20260114-b4-ad9467-optional-backend-v3-0-d2c84979d010@vaisala.com

Changes in v3:
- Reduce set of capabilities to only include calibration. The other
  ones propsed in V2 can be seen as subset of calibration, or single
  operation failing with opnotsupported
- Rename backends checking function
- Relocate caps field inside backend struct (pahole)
- Add kernel-docs
- Add capabilites for exisiting backend variants
- Link to v2: https://lore.kernel.org/r/20260113-b4-ad9467-optional-backend-v2-0-0a27e7e72f41@vaisala.com

Changes in v2:
- Added industrialio-backend capabilities feature
- Removed acceptance for fully optional backend, instead require atleast
  minimalistic backend to exist
- Switched to FIELD_MODIFY()
- Fixed kernel test robot reported failure for missing bitfield.h
- Link to v1: https://lore.kernel.org/r/20251216-b4-ad9467-optional-backend-v1-0-83e61531ef4d@vaisala.com

---
Tomas Melin (4):
      iio: industrialio-backend: support backend capabilities
      iio: adc: adi-axi-adc: define supported iio-backend capabilities
      iio: dac: adi-axi-dac: define supported iio-backend capabilities
      iio: adc: ad9467: check for backend capabilities

 drivers/iio/adc/ad9467.c           | 69 ++++++++++++++++++++++++--------------
 drivers/iio/adc/adi-axi-adc.c      |  3 ++
 drivers/iio/dac/adi-axi-dac.c      |  2 ++
 drivers/iio/industrialio-backend.c | 16 +++++++++
 include/linux/iio/backend.h        | 25 ++++++++++++++
 5 files changed, 89 insertions(+), 26 deletions(-)
---
base-commit: a7b10f0963c651a6406d958a5f64b9c5594f84da
change-id: 20251215-b4-ad9467-optional-backend-23f1099ee4d7

Best regards,
--  
Tomas Melin <tomas.melin@vaisala.com>


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

end of thread, other threads:[~2026-02-04 11:16 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-30  9:16 [PATCH v5 0/4] iio: adc: ad9467: Support alternative backends Tomas Melin
2026-01-30  9:16 ` [PATCH v5 1/4] iio: industrialio-backend: support backend capabilities Tomas Melin
2026-01-31 20:30   ` David Lechner
2026-02-02 10:28     ` Nuno Sá
2026-02-02 11:08       ` Tomas Melin
2026-02-02 12:40         ` Nuno Sá
2026-02-02 13:04           ` Tomas Melin
2026-02-02 15:50             ` David Lechner
2026-02-03  9:50               ` Tomas Melin
2026-02-04  1:07                 ` David Lechner
2026-02-04 11:15                   ` Tomas Melin
2026-02-03 10:01             ` Nuno Sá
2026-02-03 10:45               ` Tomas Melin
2026-02-02 10:58     ` Tomas Melin
2026-02-02 15:17       ` David Lechner
2026-01-30  9:17 ` [PATCH v5 2/4] iio: adc: adi-axi-adc: define supported iio-backend capabilities Tomas Melin
2026-02-02 10:33   ` Nuno Sá
2026-01-30  9:17 ` [PATCH v5 3/4] iio: dac: adi-axi-dac: " Tomas Melin
2026-02-02 10:33   ` Nuno Sá
2026-01-30  9:17 ` [PATCH v5 4/4] iio: adc: ad9467: check for backend capabilities Tomas Melin
2026-01-31 20:40   ` David Lechner
2026-02-02 11:18     ` Tomas Melin
2026-02-02 10:42   ` Nuno Sá
2026-02-02 12:03     ` Tomas Melin
2026-02-03  9:51       ` Nuno Sá

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