|
|
Log in / Subscribe / Register

iio: core,buffer-dma: add mmap support

From:  Alexandru Ardelean <alexandru.ardelean-AT-analog.com>
To:  linux-kernel-AT-vger.kernel.org, linux-iio-AT-vger.kernel.org
Subject:  [PATCH 0/3] iio: core,buffer-dma: add mmap support
Date:  Thu, 11 Feb 2021 14:33:50 +0200
Message-ID:  <20210211123353.78963-1-alexandru.ardelean@analog.com>
Cc:  lars-AT-metafoo.de, Michael.Hennerich-AT-analog.com, jic23-AT-kernel.org, nuno.sa-AT-analog.com, dragos.bogdan-AT-analog.com, Alexandru Ardelean <alexandru.ardelean-AT-analog.com>
Archive-link:  Article

This is basically Lars' work adapted from branch:
  https://github.com/larsclausen/linux/commits/iio-high-spe...
[hopefully i got the stuff correctly from that branch]

What is different, is that this one is adapted on top of the multibuffer
support (currently at v5) discussed here:
  https://lore.kernel.org/linux-iio/20210211122452.78106-1-...

Also, adapted an example for high-speed/mmap support in
'tools/iio/iio_generic_buffer.c'

The example is adapted from libiio:
  https://github.com/analogdevicesinc/libiio/blob/master/lo...
but will all the ioctl()s organized after the one that are reserved
(hopefully) for IIO

Tested that mmap() works.
Moved (artifically) valid buffer0 as buffer2 and the operation still
works.

Alexandru Ardelean (1):
  tools: iio: add example for high-speed buffer support

Lars-Peter Clausen (2):
  iio: core: Add mmap interface infrastructure
  iio: buffer-dma: Add mmap support

 drivers/iio/buffer/industrialio-buffer-dma.c  | 314 ++++++++++++++++--
 .../buffer/industrialio-buffer-dmaengine.c    |  22 +-
 drivers/iio/industrialio-buffer.c             | 158 +++++++++
 include/linux/iio/buffer-dma.h                |  25 +-
 include/linux/iio/buffer_impl.h               |  11 +
 include/uapi/linux/iio/buffer.h               |  27 ++
 tools/iio/iio_generic_buffer.c                | 184 +++++++++-
 7 files changed, 694 insertions(+), 47 deletions(-)

-- 
2.17.1



Copyright © 2021, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds