From: Alexandru Ardelean <alexandru.ardelean@analog.com>
To: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <jic23@kernel.org>, <lars@metafoo.de>, <pmeerw@pmeerw.net>,
<knaack.h@gmx.de>,
Alexandru Ardelean <alexandru.ardelean@analog.com>
Subject: [PATCH v3 0/7] iio: core: wrap IIO device into an iio_dev_opaque object
Date: Sun, 21 Jun 2020 15:33:38 +0300 [thread overview]
Message-ID: <20200621123345.2469-1-alexandru.ardelean@analog.com> (raw)
This change starts to hide some internal fields of the IIO device into
the framework.
This patchset assumes that all drivers have been addressed with respect
to the use of iio_priv_to_dev(), so the first patch in the series (now)
is to remove it, so that we don't need to move it.
V2 series:
https://patchwork.kernel.org/patch/11548709/
https://lore.kernel.org/linux-iio/20200514131710.84201-1-alexandru.ardelean@analog.com/
Referencing them, since it took a bit longer to get to V3
Changelog v2 -> v3:
- no driver should use iio_priv_to_dev() now; all drivers that use it
should have been taken care by now; and as a result, all patches from
v2 are no longer here
- added patch that just removes iio_priv_to_dev()
- for patch 'iio: core: wrap IIO device into an iio_dev_opaque object'
added comment about 'priv' field that it must be accessed via
iio_priv() helper
- patch 'iio: core: simplify alloc alignment code' removed
added 'iio: core: remove padding from private information' instead
- v2 did not address too many movements from iio_dev -> iio_dev_opaque
this patchset introduces a few more, the ones that seemed easier;
v2 only had 'iio: core: move debugfs data on the private iio dev info'
anything after that was added in v3
Changelog v1 -> v2:
- add pre-work patches that remove some calls to iio_priv_to_dev() from
interrupt handlers
- renamed iio_dev_priv -> iio_dev_opaque
- moved the iio_dev_opaque to 'include/linux/iio/iio-opaque.h' this way
it should be usable for debugging
- the iio_priv() call, is still an inline function that returns an
'indio_dev->priv' reference; this field is added to 'struct iio_dev';
the reference is computed in iio_device_alloc() and should be
cacheline aligned
- the to_iio_dev_opaque() container is in the
'include/linux/iio/iio-opaque.h' header; it's still implemented with
some pointer arithmetic; one idea was to do it via an
'indio_dev->opaque' field; that may still be an optionif there are
some opinions in that direction
Alexandru Ardelean (7):
iio: core: remove iio_priv_to_dev() helper
iio: core: wrap IIO device into an iio_dev_opaque object
iio: core: remove padding from private information
iio: core: move debugfs data on the private iio dev info
iio: core: move channel list & group to private iio device object
iio: core: move iio_dev's buffer_list to the private iio device object
iio: core: move event interface on the opaque struct
drivers/iio/industrialio-buffer.c | 38 ++++++----
drivers/iio/industrialio-core.c | 114 ++++++++++++++++++------------
drivers/iio/industrialio-event.c | 68 ++++++++++--------
include/linux/iio/iio-opaque.h | 36 ++++++++++
include/linux/iio/iio.h | 35 ++-------
5 files changed, 176 insertions(+), 115 deletions(-)
create mode 100644 include/linux/iio/iio-opaque.h
--
2.17.1
next reply other threads:[~2020-06-21 12:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-21 12:33 Alexandru Ardelean [this message]
2020-06-21 12:33 ` [PATCH v3 1/7] iio: core: remove iio_priv_to_dev() helper Alexandru Ardelean
2020-06-27 15:12 ` Jonathan Cameron
2020-06-21 12:33 ` [PATCH v3 2/7] iio: core: wrap IIO device into an iio_dev_opaque object Alexandru Ardelean
2020-06-27 16:40 ` Jonathan Cameron
2020-06-30 4:12 ` Ardelean, Alexandru
2020-06-21 12:33 ` [PATCH v3 3/7] iio: core: remove padding from private information Alexandru Ardelean
2020-06-27 16:41 ` Jonathan Cameron
2020-06-21 12:33 ` [PATCH v3 4/7] iio: core: move debugfs data on the private iio dev info Alexandru Ardelean
2020-06-21 12:33 ` [PATCH v3 5/7] iio: core: move channel list & group to private iio device object Alexandru Ardelean
2020-06-21 12:33 ` [PATCH v3 6/7] iio: core: move iio_dev's buffer_list to the " Alexandru Ardelean
2020-06-21 12:33 ` [PATCH v3 7/7] iio: core: move event interface on the opaque struct Alexandru Ardelean
2020-06-27 17:05 ` Jonathan Cameron
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=20200621123345.2469-1-alexandru.ardelean@analog.com \
--to=alexandru.ardelean@analog.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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).