public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: Applied "docs: driver-api: add iio hw consumer section" to the asoc tree
Date: Wed, 10 Jan 2018 11:13:39 +0000	[thread overview]
Message-ID: <E1eZEKB-00053k-9T@debutante> (raw)
In-Reply-To: <1511881557-28596-3-git-send-email-arnaud.pouliquen@st.com>

The patch

   docs: driver-api: add iio hw consumer section

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 5b178943d64b85d78350ea9c86344c376d7bfe74 Mon Sep 17 00:00:00 2001
From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Date: Wed, 10 Jan 2018 11:13:04 +0100
Subject: [PATCH] docs: driver-api: add iio hw consumer section

This adds a section about the Hardware consumer
API of the IIO subsystem to the driver API
documentation.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/driver-api/iio/hw-consumer.rst | 51 ++++++++++++++++++++++++++++
 Documentation/driver-api/iio/index.rst       |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 Documentation/driver-api/iio/hw-consumer.rst

diff --git a/Documentation/driver-api/iio/hw-consumer.rst b/Documentation/driver-api/iio/hw-consumer.rst
new file mode 100644
index 000000000000..8facce6a6733
--- /dev/null
+++ b/Documentation/driver-api/iio/hw-consumer.rst
@@ -0,0 +1,51 @@
+===========
+HW consumer
+===========
+An IIO device can be directly connected to another device in hardware. in this
+case the buffers between IIO provider and IIO consumer are handled by hardware.
+The Industrial I/O HW consumer offers a way to bond these IIO devices without
+software buffer for data. The implementation can be found under
+:file:`drivers/iio/buffer/hw-consumer.c`
+
+
+* struct :c:type:`iio_hw_consumer` ??? Hardware consumer structure
+* :c:func:`iio_hw_consumer_alloc` ??? Allocate IIO hardware consumer
+* :c:func:`iio_hw_consumer_free` ??? Free IIO hardware consumer
+* :c:func:`iio_hw_consumer_enable` ??? Enable IIO hardware consumer
+* :c:func:`iio_hw_consumer_disable` ??? Disable IIO hardware consumer
+
+
+HW consumer setup
+=================
+
+As standard IIO device the implementation is based on IIO provider/consumer.
+A typical IIO HW consumer setup looks like this::
+
+	static struct iio_hw_consumer *hwc;
+
+	static const struct iio_info adc_info = {
+		.read_raw = adc_read_raw,
+	};
+
+	static int adc_read_raw(struct iio_dev *indio_dev,
+				struct iio_chan_spec const *chan, int *val,
+				int *val2, long mask)
+	{
+		ret = iio_hw_consumer_enable(hwc);
+
+		/* Acquire data */
+
+		ret = iio_hw_consumer_disable(hwc);
+	}
+
+	static int adc_probe(struct platform_device *pdev)
+	{
+		hwc = devm_iio_hw_consumer_alloc(&iio->dev);
+	}
+
+More details
+============
+.. kernel-doc:: include/linux/iio/hw-consumer.h
+.. kernel-doc:: drivers/iio/buffer/industrialio-hw-consumer.c
+   :export:
+
diff --git a/Documentation/driver-api/iio/index.rst b/Documentation/driver-api/iio/index.rst
index e5c3922d1b6f..7fba341bd8b2 100644
--- a/Documentation/driver-api/iio/index.rst
+++ b/Documentation/driver-api/iio/index.rst
@@ -15,3 +15,4 @@ Contents:
    buffers
    triggers
    triggered-buffers
+   hw-consumer
-- 
2.15.1

  reply	other threads:[~2018-01-10 11:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 15:05 [PATCH v5 00/13] Add STM32 DFSDM support Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 01/13] iio: Add hardware consumer buffer support Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 02/13] docs: driver-api: add iio hw consumer section Arnaud Pouliquen
2018-01-10 11:13   ` Mark Brown [this message]
2017-11-28 15:05 ` [PATCH v5 03/13] IIO: hw_consumer: add devm_iio_hw_consumer_alloc Arnaud Pouliquen
2018-01-10 11:13   ` Applied "IIO: hw_consumer: add devm_iio_hw_consumer_alloc" to the asoc tree Mark Brown
2017-11-28 15:05 ` [PATCH v5 04/13] IIO: inkern: API for manipulating channel attributes Arnaud Pouliquen
2017-11-29  6:20   ` Phil Reid
2017-12-01 14:41   ` [alsa-devel] " kbuild test robot
2017-12-01 15:12   ` kbuild test robot
2017-11-28 15:05 ` [PATCH v5 05/13] IIO: Add DT bindings for sigma delta adc modulator Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 06/13] IIO: ADC: add sigma delta modulator support Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 07/13] IIO: add DT bindings for stm32 DFSDM filter Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 08/13] IIO: ADC: add stm32 DFSDM core support Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 09/13] IIO: ADC: add STM32 DFSDM sigma delta ADC support Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 10/13] IIO: ADC: add stm32 DFSDM support for PDM microphone Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 11/13] IIO: consumer: allow to set buffer sizes Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 12/13] ASoC: add bindings for stm32 DFSDM filter Arnaud Pouliquen
2017-11-28 15:05 ` [PATCH v5 13/13] ASoC: stm32: add DFSDM DAI support Arnaud Pouliquen
2017-11-29 15:37   ` Mark Brown
2017-12-01 14:41   ` [alsa-devel] " kbuild test robot
2017-12-01 19:16   ` kbuild test robot

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=E1eZEKB-00053k-9T@debutante \
    --to=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox