Skip to content

iio: Buffer cleanups and consolidations

Lars-Peter Clausen linux-iio 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 23 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11staging:iio:ad5933: Don't enable channels by defaultdrivers/staging/iio/impedance-analyzer/ad5933.c+0 -42 replies
2/11staging:iio:sca3000: Don't enable channels by defaultdrivers/staging/iio/accel/sca3000_core.c+0 -52 replies
3/11iio: Unexport iio_scan_mask_set()drivers/iio/industrialio-buffer.c include/linux/iio/buffer.h+74 -842 replies
4/11staging:iio:sca3000: Register same channels for device and bufferdrivers/staging/iio/accel/sca3000_core.c+3 -34 replies
5/11staging:iio:dummy: Register same channels for device and bufferdrivers/staging/iio/iio_simple_dummy.c drivers/staging/iio/iio_simple_dummy.h drivers/staging/iio/iio_simple_dummy_buffer.c+9 -132 replies
6/11iio: Move buffer registration to the coredrivers/iio/adc/ti_am335x_adc.c drivers/iio/iio_core.h drivers/iio/industrialio-buffer.c +10 more+39 -1103 replies
7/11iio: Remove get_bytes_per_datum() from iio_buffer_access_funcsdrivers/iio/kfifo_buf.c drivers/staging/iio/Documentation/ring.txt drivers/staging/iio/accel/sca3000_ring.c +1 more+2 -171 reply
8/11iio: buffer: Move iio_buffer_alloc_sysfs and iio_buffer_free_sysfsdrivers/iio/industrialio-buffer.c+91 -931 reply
9/11iio: buffer: Allocate standard attributes in the coredrivers/iio/industrialio-buffer.c drivers/iio/kfifo_buf.c drivers/staging/iio/accel/sca3000_ring.c +1 more+40 -812 replies
10/11iio: buffer: Make length attribute read only for buffers without set_lengthdrivers/iio/industrialio-buffer.c+7 -33 replies
11/11iio: buffer: Drop get_length callbackdrivers/iio/industrialio-buffer.c drivers/iio/kfifo_buf.c drivers/staging/iio/Documentation/ring.txt +2 more+6 -251 reply

Reviews trailers per patch

3 of 11 patches have a Reviewed-by or Acked-by.

PatchDaniel Baluta
1/11R-b
2/11R-b
3/11R-b
4/11
5/11
6/11
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/11] iio: Buffer cleanups and consolidations

Hi,

This series contains a couple of cleanups and code consolidations for the IIO buffer handling. The biggest change is probably the moving of the buffer registration itself to the core rather than having to do this manually in each driver. Having to do this manually had its place in earlier days, but today it is just boilerplate code.

The other changes are mostly concerned with moving boilerplate code from individual buffer implementations to the core. Given that there is only one serious buffer implementation at the moment this doesn't do to much. But this series is done in preparation for adding the DMA buffer support, so we do not have to add the same duplicated code for the DMA buffer.

- Lars

Lars-Peter Clausen (11):
staging:iio:ad5933: Don't enable channels by default staging:iio:sca3000: Don't enable channels by default
iio: Unexport iio_scan_mask_set()
staging:iio:sca3000: Register same channels for device and buffer staging:iio:dummy: Register same channels for device and buffer
iio: Move buffer registration to the core
iio: Remove get_bytes_per_datum() from iio_buffer_access_funcs
iio: buffer: Move iio_buffer_alloc_sysfs and iio_buffer_free_sysfs
iio: buffer: Allocate standard attributes in the core
iio: buffer: Make length attribute read only for buffers without
set_length
iio: buffer: Drop get_length callback

 drivers/iio/adc/ti_am335x_adc.c                 |   9 -
 drivers/iio/iio_core.h                          |   9 +
 drivers/iio/industrialio-buffer.c               | 403 ++++++++++++------------
 drivers/iio/industrialio-core.c                 |  14 +-
 drivers/iio/industrialio-triggered-buffer.c     |   9 -
 drivers/iio/kfifo_buf.c                         |  27 --
 drivers/staging/iio/Documentation/ring.txt      |   8 +-
 drivers/staging/iio/accel/lis3l02dq_core.c      |  13 +-
 drivers/staging/iio/accel/sca3000_core.c        |  17 +-
 drivers/staging/iio/accel/sca3000_ring.c        |  29 +-
 drivers/staging/iio/iio_simple_dummy.c          |  13 +-
 drivers/staging/iio/iio_simple_dummy.h          |   3 +-
 drivers/staging/iio/iio_simple_dummy_buffer.c   |  10 +-
 drivers/staging/iio/impedance-analyzer/ad5933.c |  16 +-
 drivers/staging/iio/meter/ade7758.h             |   1 -
 drivers/staging/iio/meter/ade7758_core.c        |  15 +-
 drivers/staging/iio/meter/ade7758_ring.c        |   5 -
 include/linux/iio/buffer.h                      |  76 +----
 18 files changed, 255 insertions(+), 422 deletions(-)
Signature · 1 line
1.8.0