mbox series

[v4,0/8] iio: add new backend framework

Message ID 20231220-iio-backend-v4-0-998e9148b692@analog.com (mailing list archive)
Headers show
Series iio: add new backend framework | expand

Message

Nuno Sa Dec. 20, 2023, 3:34 p.m. UTC
v1:
 https://lore.kernel.org/linux-iio/20231204144925.4fe9922f@jic23-huawei/T/#m222f5175273b81dbfe40b7f0daffcdc67d6cb8ff

v2:
 https://lore.kernel.org/r/20231208-dev-iio-backend-v2-0-5450951895e1@analog.com

v3:
 https://lore.kernel.org/linux-iio/20231213-dev-iio-backend-v3-0-bb9f12a5c6dc@analog.com/

Changes in v4:
 - Patch 1:
  * Don't make io-backends mandatory.
- Patch 5:
  * Add helper __devm_iio_backend_get();
  * Add new devm_iio_backend_get_optional();
  * Add new devm_iio_backend_get_from_fwnode_lookup();
  * Convert all dev_ logs to plain pr_ logs so we actually use pr_fmt.
- Patch 6:
  * Implement the fallback backend lookput in case
    devm_iio_backend_get_optional() fails;

So the main difference in this series is to still handle 'adi,adc-dev'
in case 'io-backends' is not given. Hence we don't need to make it
mandatory and break dt ABI for the ad9467 bindings. Rob, it would be
nice if you can take a quick a look on it and let me know if there's a
more efficient way of doing things.

Rob also already expressed that he is ok with the dt ABI breakage as long
as it is properly justified in the commit message. Jonathan, we should
see if we keep things as in this version or rollback. Personally I'm not
that "happy" with that devm_iio_backend_get_from_fwnode_lookup() given
the fact that is not really supposed to be used anymore. OTOH, it's small
and simple... So, let me know your preference and I'll go with that :).

This is likely the last version of this series for this year. If things
go well, I plan to start working on the second user of the framework
right in the beginning of the next year...
 
Keeping the block diagram in v3's cover so we don't have to follow links
to check one of the typical setups. 

                                           -------------------------------------------------------
 ------------------                        | -----------         ------------      -------  FPGA |
 |     ADC        |------------------------| | AXI ADC |---------| DMA CORE |------| RAM |       |
 | (Frontend/IIO) | Serial Data (eg: LVDS) | |(backend)|---------|          |------|     |       |
 |                |------------------------| -----------         ------------      -------       |
 ------------------                        -------------------------------------------------------

---
Nuno Sa (7):
      dt-bindings: adc: ad9467: add new io-backend property
      dt-bindings: adc: axi-adc: deprecate 'adi,adc-dev'
      driver: core: allow modifying device_links flags
      iio: buffer-dmaengine: export buffer alloc and free functions
      iio: add the IIO backend framework
      iio: adc: ad9467: convert to backend framework
      iio: adc: adi-axi-adc: move to backend framework

Olivier Moysan (1):
      of: property: add device link support for io-backends

 .../devicetree/bindings/iio/adc/adi,ad9467.yaml    |   4 +
 .../devicetree/bindings/iio/adc/adi,axi-adc.yaml   |   4 +-
 MAINTAINERS                                        |   8 +
 drivers/base/core.c                                |  14 +-
 drivers/iio/Kconfig                                |   5 +
 drivers/iio/Makefile                               |   1 +
 drivers/iio/adc/Kconfig                            |   4 +-
 drivers/iio/adc/ad9467.c                           | 282 ++++++++-----
 drivers/iio/adc/adi-axi-adc.c                      | 381 +++++------------
 drivers/iio/buffer/industrialio-buffer-dmaengine.c |   8 +-
 drivers/iio/industrialio-backend.c                 | 456 +++++++++++++++++++++
 drivers/of/property.c                              |   2 +
 include/linux/iio/adc/adi-axi-adc.h                |  68 ---
 include/linux/iio/backend.h                        |  75 ++++
 include/linux/iio/buffer-dmaengine.h               |   3 +
 15 files changed, 845 insertions(+), 470 deletions(-)
---
base-commit: 2dfef50589aef3b9a2fa2190ae95b328fb664f89
change-id: 20231219-iio-backend-a3dc1a6a7a58
--

Thanks!
- Nuno Sá