All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nuno Sa via B4 Relay <devnull+nuno.sa.analog.com@kernel.org>
To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org
Cc: Dragos Bogdan <dragos.bogdan@analog.com>,
	 Lars-Peter Clausen <lars@metafoo.de>,
	 Michael Hennerich <Michael.Hennerich@analog.com>,
	 Jonathan Cameron <jic23@kernel.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	 Olivier Moysan <olivier.moysan@foss.st.com>,
	 Paul Cercueil <paul@crapouillou.net>,
	 Alexandru Ardelean <ardeleanalex@gmail.com>,
	Nuno Sa <nuno.sa@analog.com>
Subject: [PATCH v3 05/10] iio: buffer-dmaengine: Enable write support
Date: Fri, 12 Apr 2024 15:36:12 +0200	[thread overview]
Message-ID: <20240412-iio-backend-axi-dac-v3-5-3e9d4c5201fb@analog.com> (raw)
In-Reply-To: <20240412-iio-backend-axi-dac-v3-0-3e9d4c5201fb@analog.com>

From: Paul Cercueil <paul@crapouillou.net>

Use the iio_dma_buffer_write() and iio_dma_buffer_space_available()
functions provided by the buffer-dma core, to enable write support in
the buffer-dmaengine code.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 drivers/iio/buffer/industrialio-buffer-dmaengine.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
index 051e1758e020..e5492572b248 100644
--- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c
+++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
@@ -123,12 +123,14 @@ static void iio_dmaengine_buffer_release(struct iio_buffer *buf)
 
 static const struct iio_buffer_access_funcs iio_dmaengine_buffer_ops = {
 	.read = iio_dma_buffer_read,
+	.write = iio_dma_buffer_write,
 	.set_bytes_per_datum = iio_dma_buffer_set_bytes_per_datum,
 	.set_length = iio_dma_buffer_set_length,
 	.request_update = iio_dma_buffer_request_update,
 	.enable = iio_dma_buffer_enable,
 	.disable = iio_dma_buffer_disable,
 	.data_available = iio_dma_buffer_usage,
+	.space_available = iio_dma_buffer_usage,
 	.release = iio_dmaengine_buffer_release,
 
 	.modes = INDIO_BUFFER_HARDWARE,

-- 
2.44.0



WARNING: multiple messages have this Message-ID (diff)
From: Nuno Sa <nuno.sa@analog.com>
To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org
Cc: Dragos Bogdan <dragos.bogdan@analog.com>,
	 Lars-Peter Clausen <lars@metafoo.de>,
	 Michael Hennerich <Michael.Hennerich@analog.com>,
	 Jonathan Cameron <jic23@kernel.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	 Olivier Moysan <olivier.moysan@foss.st.com>,
	 Paul Cercueil <paul@crapouillou.net>,
	 Alexandru Ardelean <ardeleanalex@gmail.com>,
	Nuno Sa <nuno.sa@analog.com>
Subject: [PATCH v3 05/10] iio: buffer-dmaengine: Enable write support
Date: Fri, 12 Apr 2024 15:36:12 +0200	[thread overview]
Message-ID: <20240412-iio-backend-axi-dac-v3-5-3e9d4c5201fb@analog.com> (raw)
In-Reply-To: <20240412-iio-backend-axi-dac-v3-0-3e9d4c5201fb@analog.com>

From: Paul Cercueil <paul@crapouillou.net>

Use the iio_dma_buffer_write() and iio_dma_buffer_space_available()
functions provided by the buffer-dma core, to enable write support in
the buffer-dmaengine code.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 drivers/iio/buffer/industrialio-buffer-dmaengine.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
index 051e1758e020..e5492572b248 100644
--- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c
+++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
@@ -123,12 +123,14 @@ static void iio_dmaengine_buffer_release(struct iio_buffer *buf)
 
 static const struct iio_buffer_access_funcs iio_dmaengine_buffer_ops = {
 	.read = iio_dma_buffer_read,
+	.write = iio_dma_buffer_write,
 	.set_bytes_per_datum = iio_dma_buffer_set_bytes_per_datum,
 	.set_length = iio_dma_buffer_set_length,
 	.request_update = iio_dma_buffer_request_update,
 	.enable = iio_dma_buffer_enable,
 	.disable = iio_dma_buffer_disable,
 	.data_available = iio_dma_buffer_usage,
+	.space_available = iio_dma_buffer_usage,
 	.release = iio_dmaengine_buffer_release,
 
 	.modes = INDIO_BUFFER_HARDWARE,

-- 
2.44.0


  parent reply	other threads:[~2024-04-12 13:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 13:36 [PATCH v3 00/10] iio: dac: support IIO backends on the output direction Nuno Sa via B4 Relay
2024-04-12 13:36 ` Nuno Sa
2024-04-12 13:36 ` [PATCH v3 01/10] iio: buffer-dma: add iio_dmaengine_buffer_setup() Nuno Sa via B4 Relay
2024-04-12 13:36   ` Nuno Sa
2024-04-12 13:36 ` [PATCH v3 02/10] iio: buffer-dma: Rename iio_dma_buffer_data_available() Nuno Sa via B4 Relay
2024-04-12 13:36   ` Nuno Sa
2024-04-12 13:36 ` [PATCH v3 03/10] iio: buffer-dma: Enable buffer write support Nuno Sa via B4 Relay
2024-04-12 13:36   ` Nuno Sa
2024-04-12 13:36 ` [PATCH v3 04/10] iio: buffer-dmaengine: Support specifying buffer direction Nuno Sa via B4 Relay
2024-04-12 13:36   ` Nuno Sa
2024-04-12 13:36 ` Nuno Sa via B4 Relay [this message]
2024-04-12 13:36   ` [PATCH v3 05/10] iio: buffer-dmaengine: Enable write support Nuno Sa
2024-04-12 13:36 ` [PATCH v3 06/10] dt-bindings: iio: dac: add docs for AXI DAC IP Nuno Sa via B4 Relay
2024-04-12 13:36   ` Nuno Sa
2024-04-12 13:36 ` [PATCH v3 07/10] dt-bindings: iio: dac: add docs for AD9739A Nuno Sa via B4 Relay
2024-04-12 13:36   ` Nuno Sa
2024-04-12 23:47   ` David Lechner
2024-04-15 12:25     ` Nuno Sá
2024-04-15 13:51       ` David Lechner
2024-04-12 13:36 ` [PATCH v3 08/10] iio: backend: add new functionality Nuno Sa via B4 Relay
2024-04-12 13:36   ` Nuno Sa
2024-04-12 13:36 ` [PATCH v3 09/10] iio: dac: add support for AXI DAC IP core Nuno Sa via B4 Relay
2024-04-12 13:36   ` Nuno Sa
2024-04-12 13:36 ` [PATCH v3 10/10] iio: dac: support the ad9739a RF DAC Nuno Sa via B4 Relay
2024-04-12 13:36   ` Nuno Sa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240412-iio-backend-axi-dac-v3-5-3e9d4c5201fb@analog.com \
    --to=devnull+nuno.sa.analog.com@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=ardeleanalex@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dragos.bogdan@analog.com \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=olivier.moysan@foss.st.com \
    --cc=paul@crapouillou.net \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.