Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v4 0/7]  iio: core: wrap IIO device into an iio_dev_opaque object
@ 2020-06-30  4:57 Alexandru Ardelean
  2020-06-30  4:57 ` [PATCH v4 1/7] iio: core: remove iio_priv_to_dev() helper Alexandru Ardelean
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Alexandru Ardelean @ 2020-06-30  4:57 UTC (permalink / raw)
  To: linux-iio, linux-kernel; +Cc: jic23, lars, pmeerw, knaack.h, Alexandru Ardelean

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.

Changelog v3 -> v4:
* added ifdef guard for iio_get_debugfs_dentry();
  Reported-by: kernel test robot <lkp@intel.com>

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   | 120 +++++++++++++++++++-----------
 drivers/iio/industrialio-event.c  |  68 ++++++++++-------
 include/linux/iio/iio-opaque.h    |  36 +++++++++
 include/linux/iio/iio.h           |  35 ++-------
 5 files changed, 182 insertions(+), 115 deletions(-)
 create mode 100644 include/linux/iio/iio-opaque.h

-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, back to index

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30  4:57 [PATCH v4 0/7] iio: core: wrap IIO device into an iio_dev_opaque object Alexandru Ardelean
2020-06-30  4:57 ` [PATCH v4 1/7] iio: core: remove iio_priv_to_dev() helper Alexandru Ardelean
2020-06-30  4:57 ` [PATCH v4 2/7] iio: core: wrap IIO device into an iio_dev_opaque object Alexandru Ardelean
2020-07-21  9:46   ` Dmitry Baryshkov
2020-07-21 10:00     ` Alexandru Ardelean
2020-06-30  4:57 ` [PATCH v4 3/7] iio: core: remove padding from private information Alexandru Ardelean
2020-06-30  4:57 ` [PATCH v4 4/7] iio: core: move debugfs data on the private iio dev info Alexandru Ardelean
2020-06-30  4:58   ` Ardelean, Alexandru
2020-07-01 18:42     ` Jonathan Cameron
2020-07-02  9:34       ` Ardelean, Alexandru
2020-06-30  4:57 ` [PATCH v4 5/7] iio: core: move channel list & group to private iio device object Alexandru Ardelean
2020-06-30  4:57 ` [PATCH v4 6/7] iio: core: move iio_dev's buffer_list to the " Alexandru Ardelean
2020-06-30  4:57 ` [PATCH v4 7/7] iio: core: move event interface on the opaque struct Alexandru Ardelean

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git