Skip to content

buffer.h cleanup and split

Jonathan Cameron linux-iio 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11iio:buffer: Stop exporting iio_update_demuxdrivers/iio/industrialio-buffer.c include/linux/iio/buffer.h+129 -1330 replies
2/11iio:buffer.h Reformat structure comments to be inline.include/linux/iio/buffer.h+63 -370 replies
3/11iio:buffer: Introduced a function to assign the buffer specific attrs.drivers/iio/accel/bmc150-accel-core.c drivers/iio/industrialio-buffer.c include/linux/iio/buffer.h+16 -10 replies
4/11iio:buffer: Stop exporting iio_scan_mask_querydrivers/iio/industrialio-buffer.c include/linux/iio/buffer.h+13 -170 replies
5/11iio:buffers: Push some docs down into the .c file.drivers/iio/industrialio-buffer.c include/linux/iio/buffer.h+5 -50 replies
6/11iio:buffer:iio_push_to_buffers_with_timestamp fix kernel-doc.include/linux/iio/buffer.h+1 -10 replies
7/11iio:kfifo_buf header include push down.drivers/iio/accel/ssp_accel_sensor.c drivers/iio/adc/ina2xx-adc.c drivers/iio/common/ssp_sensors/ssp_iio.c +4 more+9 -31 reply
8/11iio:buffer.h include pushdown into buffer implementationsdrivers/iio/buffer/industrialio-buffer-cb.c drivers/iio/buffer/kfifo_buf.c+2 -00 replies
9/11iio:buffer: Push implementation of iio_device_attach_buffer into .c filedrivers/iio/industrialio-buffer.c include/linux/iio/buffer.h+18 -151 reply
10/11iio:dummy: Stop enabling timestamp by default.drivers/iio/dummy/iio_simple_dummy_buffer.c+0 -30 replies
11/11iio:buffer.h - split into buffer.h and buffer_impl.hdrivers/iio/buffer/industrialio-buffer-cb.c drivers/iio/buffer/kfifo_buf.c drivers/iio/industrialio-buffer.c +3 more+167 -1550 replies

Reviews trailers per patch

None of the 11 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLars-Peter Clausen
SeriesR-b
1/11
2/11
3/11
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] buffer.h cleanup and split

This series came out of the mess that became apparant when looking at the autogenerated docs. As we pull the kernel-doc from buffer.h in when describing the API the drivers use to access it we were pulling in a lot of documentation that was irrelevant to that use case.

Hence, this series does two things:
1) Splits the buffer.h header into two parts:
* buffer.h which just contains the stuff that drivers using buffers need.
* buffer_impl.h which just contains the stuff related to the implementation of buffers
This makes struct iio_buffer opaque to the drivers (with a few extra access functions and a bit of code reorganization)
2) Takes the documentation of struct iio_buffer inline, allowing fairly sensible use of the private: label within docs rather than our local iio specific tagging of documentation. There is an oddity here in that I have deliberately 'broken' the kernel-doc for elements that are private in order to avoid lots of warnings about excess documentation.

Along the way various drivers gained additional includes that should probably have been there in the first place. This was needed to cleanup the includes within the includes. Most drivers did it 'right' anyway so this wasn't too bad.

I'll probably follow this up with similar cleanups elsewhere at some point.

This was against 4.10-rc1 as that's where I'm working on docs, but should go in reasonably cleanly on iio/togreg or iio/testing.

Jonathan Cameron (11):
iio:buffer: Stop exporting iio_update_demux
iio:buffer.h Reformat structure comments to be inline. iio:buffer: Introduced a function to assign the buffer specific attrs. iio:buffer: Stop exporting iio_scan_mask_query iio:buffers: Push some docs down into the .c file. iio:buffer:iio_push_to_buffers_with_timestamp fix kernel-doc. iio:kfifo_buf header include push down.
iio:buffer.h include pushdown into buffer implementations iio:buffer: Push implementation of iio_device_attach_buffer into .c
file
iio:dummy: Stop enabling timestamp by default. iio:buffer.h - split into buffer.h and buffer_impl.h

 drivers/iio/accel/bmc150-accel-core.c       |   3 +-
 drivers/iio/accel/ssp_accel_sensor.c        |   1 +
 drivers/iio/adc/ina2xx-adc.c                |   2 +
 drivers/iio/buffer/industrialio-buffer-cb.c |   3 +-
 drivers/iio/buffer/kfifo_buf.c              |   2 +
 drivers/iio/common/ssp_sensors/ssp_iio.c    |   1 +
 drivers/iio/dummy/iio_simple_dummy_buffer.c |   4 +-
 drivers/iio/gyro/ssp_gyro_sensor.c          |   1 +
 drivers/iio/industrialio-buffer.c           | 321 +++++++++++++++-------------
 drivers/iio/industrialio-core.c             |   1 +
 drivers/staging/iio/meter/ade7758_ring.c    |   1 +
 include/linux/iio/buffer.h                  | 160 +-------------
 include/linux/iio/buffer_impl.h             | 162 ++++++++++++++
 include/linux/iio/kfifo_buf.h               |   5 +-
 14 files changed, 360 insertions(+), 307 deletions(-)
 create mode 100644 include/linux/iio/buffer_impl.h
Signature · 1 line
2.11.0