From: Alexandru Ardelean <alexandru.ardelean@analog.com>
To: <linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>
Cc: <lars@metafoo.de>, <Michael.Hennerich@analog.com>,
<jic23@kernel.org>, <nuno.sa@analog.com>,
<dragos.bogdan@analog.com>,
Alexandru Ardelean <alexandru.ardelean@analog.com>
Subject: [PATCH v2 00/12] iio: core,buffer: add support for multiple IIO buffers per IIO device
Date: Fri, 22 Jan 2021 17:57:53 +0200 [thread overview]
Message-ID: <20210122155805.83012-1-alexandru.ardelean@analog.com> (raw)
Continuing from:
https://lore.kernel.org/linux-iio/20201117162340.43924-1-alexandru.ardelean@analog.com/
Changelog v1 -> v2:
* 'iio: buffer: rework buffer & scan_elements dir creation'
add more doc-strings detailing the reasoning for this change
* 'iio: buffer: re-route scan_elements via it's kobj_type'
move list_del() before the kfree()'s in the list destruction
* 'iio: buffer: introduce support for attaching more IIO buffers'
- changed to 'cnt' variable vs re-using the 'i' for unwinding in
iio_buffer_alloc_sysfs_and_mask()
- removed kfree(old) in iio_device_attach_buffer()
- made iio_device_attach_buffer() an int return; this means that some
follow up patches are needed to make this return value be used;
* 'iio: buffer: add ioctl() to support opening extra buffers for IIO device'
- tested ioctl() with a simple C program; attached to comment;
- changed 'i' variable usage to 'sz' for alloc
- changed logic for buffer0; returning FD 0; userspace should know
that the IIO_BUFFER_GET_FD_IOCTL call returns 0 for buffer0;
this is because I can't find a way to determine the FD of the
ioctl() in the kernel; duplicating an ioctl() for buffer0 is also bad;
Alexandru Ardelean (12):
iio: core: register chardev only if needed
iio: buffer: add back-ref from iio_buffer to iio_dev
iio: buffer: rework buffer & scan_elements dir creation
iio: buffer: add index to the first IIO buffer dir and symlink it back
iio: core: split __iio_device_attr_init() to init only the attr object
iio: buffer: re-route scan_elements via it's kobj_type
iio: buffer: re-route core buffer attributes via it's new kobj_type
iio: buffer: add helper to get the IIO device to which a buffer
belongs
iio: re-route all buffer attributes through new buffer kobj_type
iio: core: wrap iio device & buffer into struct for character devices
iio: buffer: introduce support for attaching more IIO buffers
iio: buffer: add ioctl() to support opening extra buffers for IIO
device
drivers/iio/accel/adxl372.c | 36 +-
drivers/iio/accel/bmc150-accel-core.c | 34 +-
drivers/iio/adc/at91-sama5d2_adc.c | 30 +-
.../buffer/industrialio-buffer-dmaengine.c | 13 +-
.../cros_ec_sensors/cros_ec_sensors_core.c | 30 +-
.../common/hid-sensors/hid-sensor-trigger.c | 32 +-
drivers/iio/iio_core.h | 11 +
drivers/iio/industrialio-buffer.c | 647 ++++++++++++++----
drivers/iio/industrialio-core.c | 117 ++--
include/linux/iio/buffer.h | 6 +-
include/linux/iio/buffer_impl.h | 25 +-
include/linux/iio/iio-opaque.h | 6 +
include/linux/iio/iio.h | 2 +-
include/linux/iio/sysfs.h | 50 ++
include/uapi/linux/iio/buffer.h | 10 +
15 files changed, 790 insertions(+), 259 deletions(-)
create mode 100644 include/uapi/linux/iio/buffer.h
--
2.17.1
next reply other threads:[~2021-01-22 17:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 15:57 Alexandru Ardelean [this message]
2021-01-22 15:57 ` [PATCH v2 01/12] iio: core: register chardev only if needed Alexandru Ardelean
2021-01-22 15:57 ` [PATCH v2 02/12] iio: buffer: add back-ref from iio_buffer to iio_dev Alexandru Ardelean
2021-01-22 15:57 ` [PATCH v2 03/12] iio: buffer: rework buffer & scan_elements dir creation Alexandru Ardelean
2021-01-22 15:57 ` [PATCH v2 04/12] iio: buffer: add index to the first IIO buffer dir and symlink it back Alexandru Ardelean
2021-01-22 15:57 ` [PATCH v2 05/12] iio: core: split __iio_device_attr_init() to init only the attr object Alexandru Ardelean
2021-01-22 15:57 ` [PATCH v2 06/12] iio: buffer: re-route scan_elements via it's kobj_type Alexandru Ardelean
2021-01-22 16:12 ` Alexandru Ardelean
2021-01-22 15:58 ` [PATCH v2 07/12] iio: buffer: re-route core buffer attributes via it's new kobj_type Alexandru Ardelean
2021-01-22 15:58 ` [PATCH v2 08/12] iio: buffer: add helper to get the IIO device to which a buffer belongs Alexandru Ardelean
2021-01-22 15:58 ` [PATCH v2 09/12] iio: re-route all buffer attributes through new buffer kobj_type Alexandru Ardelean
2021-01-22 15:58 ` [PATCH v2 10/12] iio: core: wrap iio device & buffer into struct for character devices Alexandru Ardelean
2021-01-22 15:58 ` [PATCH v2 11/12] iio: buffer: introduce support for attaching more IIO buffers Alexandru Ardelean
2021-01-22 15:58 ` [PATCH v2 12/12] iio: buffer: add ioctl() to support opening extra buffers for IIO device Alexandru Ardelean
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=20210122155805.83012-1-alexandru.ardelean@analog.com \
--to=alexandru.ardelean@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=dragos.bogdan@analog.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/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;
as well as URLs for NNTP newsgroup(s).