All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] iio: dac: support IIO backends on the output direction
@ 2024-03-28 13:22 ` Nuno Sa
  0 siblings, 0 replies; 43+ messages in thread
From: Nuno Sa via B4 Relay @ 2024-03-28 13:22 UTC (permalink / raw)
  To: linux-iio, devicetree
  Cc: Dragos Bogdan, Jonathan Cameron, Lars-Peter Clausen,
	Michael Hennerich, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Olivier Moysan, Nuno Sa, Paul Cercueil,
	Alexandru Ardelean

Hi Jonathan,

This is the result of the brief discussion we had in the RFC [1].
Patches 2 to 5 from Paul's series to bring output buffer support to
DMA buffers [2].

Note that the original DMA patch 4 ("iio: buffer-dmaengine: Support
specifying buffer direction") also had changes for the axi-adc as it
used devm_iio_dmaengine_buffer_setup(). However, when that was converted
to the backend framework, we started to use iio_dmaengine_buffer_alloc()
and default is INPUT so no need for any change.

I did gave it a try on beginning to support extending IIO channels
(chan_spec) from backend's. For now, we just need to do it for the
extended info and honestly, IMHO, I don't think the result to be
horrible :). The only thing that I don't like much is the call to
iio_device_set_drvdata() in iio_backend_extend_chan_spec(). Long story
short, I know it's likely to break so maybe we should have a proper
solution right from the beginning. But see the comment I have in there.
I did thought in a solution that should work but you may have a better
idea.

Also note the main reason to come up with the iio_backend_ext_info_set()
and iio_backend_ext_info_get() helpers is not to allow starting having
these from backends. I was even thinking in just passing the callbacks
from the frontend to iio_backend_extend_chan_spec() but I kind of prefer
this way. We may still need at some point to allow frontends to have full
control and have their callbacks in the attributes. But for now, I'm not
even allowing for backends to append a channel ext_info so i would say to
worry about that when such a scenario pops up.

I would also prefer for  iio_backend_ext_info_set() and
iio_backend_ext_info_get() to be static but that would make the code more
complex than it needs to be (we would have to kmemdup() the backends
ext_info and assign the callbacks) so I went this way.

[1]: https://lore.kernel.org/linux-iio/20240216-iio-backend-axi-dds-v1-0-22aed9fb07a1@analog.com/
[2]: https://lore.kernel.org/linux-iio/20230807112113.47157-1-paul@crapouillou.net/

---
Nuno Sa (6):
      iio: buffer: add helper for setting direction
      dt-bindings: iio: dac: add bindings doc for AXI DAC driver
      dt-bindings: iio: dac: add bindings doc for AD9739A
      iio: backend: add new functionality
      iio: dac: add support for AXI DAC IP core
      iio: dac: support the ad9739a RF DAC

Paul Cercueil (4):
      iio: buffer-dma: Rename iio_dma_buffer_data_available()
      iio: buffer-dma: Enable buffer write support
      iio: buffer-dmaengine: Support specifying buffer direction
      iio: buffer-dmaengine: Enable write support

 Documentation/ABI/testing/sysfs-bus-iio-ad9739a    |  17 +
 .../devicetree/bindings/iio/dac/adi,ad9739a.yaml   |  88 +++
 .../devicetree/bindings/iio/dac/adi,axi-dac.yaml   |  62 ++
 MAINTAINERS                                        |  17 +
 drivers/iio/buffer/industrialio-buffer-dma.c       | 100 +++-
 drivers/iio/buffer/industrialio-buffer-dmaengine.c |  28 +-
 drivers/iio/dac/Kconfig                            |  37 ++
 drivers/iio/dac/Makefile                           |   2 +
 drivers/iio/dac/ad9739a.c                          | 445 ++++++++++++++
 drivers/iio/dac/adi-axi-dac.c                      | 644 +++++++++++++++++++++
 drivers/iio/industrialio-backend.c                 | 144 +++++
 drivers/iio/industrialio-buffer.c                  |   7 +
 include/linux/iio/backend.h                        |  49 ++
 include/linux/iio/buffer-dma.h                     |   4 +-
 include/linux/iio/buffer-dmaengine.h               |   6 +-
 include/linux/iio/buffer.h                         |   3 +
 16 files changed, 1624 insertions(+), 29 deletions(-)
---
base-commit: a276b4da56e988157a34b9fef9c46ebfd95f7f09
change-id: 20240326-iio-backend-axi-dac-497a707a5d88
--

Thanks!
- Nuno Sá



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

end of thread, other threads:[~2024-04-04  9:59 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 13:22 [PATCH 00/10] iio: dac: support IIO backends on the output direction Nuno Sa via B4 Relay
2024-03-28 13:22 ` Nuno Sa
2024-03-28 13:22 ` [PATCH 01/10] iio: buffer: add helper for setting direction Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-28 14:36   ` Jonathan Cameron
2024-03-28 15:18     ` Nuno Sá
2024-03-28 15:54       ` Jonathan Cameron
2024-03-28 13:22 ` [PATCH 02/10] iio: buffer-dma: Rename iio_dma_buffer_data_available() Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-28 13:22 ` [PATCH 03/10] iio: buffer-dma: Enable buffer write support Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-28 13:22 ` [PATCH 04/10] iio: buffer-dmaengine: Support specifying buffer direction Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-28 13:22 ` [PATCH 05/10] iio: buffer-dmaengine: Enable write support Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-28 13:22 ` [PATCH 06/10] dt-bindings: iio: dac: add bindings doc for AXI DAC driver Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-29 18:46   ` David Lechner
2024-04-02  7:51     ` Nuno Sá
2024-04-01 13:59   ` Rob Herring
2024-04-04 10:03     ` Nuno Sá
2024-03-28 13:22 ` [PATCH 07/10] dt-bindings: iio: dac: add bindings doc for AD9739A Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-29 19:06   ` David Lechner
2024-03-30 18:27     ` Krzysztof Kozlowski
2024-04-02  7:49       ` Nuno Sá
2024-04-02  7:50     ` Nuno Sá
2024-04-01 14:02   ` Rob Herring
2024-03-28 13:22 ` [PATCH 08/10] iio: backend: add new functionality Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-28 15:16   ` Jonathan Cameron
2024-03-28 15:42     ` Nuno Sá
2024-03-28 15:59       ` Jonathan Cameron
2024-03-28 16:54         ` Nuno Sá
2024-03-28 13:22 ` [PATCH 09/10] iio: dac: add support for AXI DAC IP core Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-28 15:35   ` Jonathan Cameron
2024-03-28 16:43     ` Nuno Sá
2024-03-28 13:22 ` [PATCH 10/10] iio: dac: support the ad9739a RF DAC Nuno Sa via B4 Relay
2024-03-28 13:22   ` Nuno Sa
2024-03-28 15:51   ` Jonathan Cameron
2024-03-28 16:37     ` Nuno Sá
2024-03-28 16:52       ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.