Skip to content

IIO: in kernel (as opposed to userspace) pull consumers

Jonathan Cameron linux-iio 1 version Applied

Status from this message: I've applied the first 5, and then I got confused, care to resend the

Get series with b4
b4 am [email protected]

Versions newest first

  1. v6 Latest6 patches 5 repliesApplied

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/6staging:iio:core set the iio_dev.info pointer to null on unregister under lock.drivers/staging/iio/iio.h drivers/staging/iio/industrialio-core.c+6 -00 replies
2/6staging:iio:core add in kernel interface mapping and getting IIO channels.drivers/staging/iio/Makefile drivers/staging/iio/consumer.h drivers/staging/iio/driver.h +2 more+447 -10 replies
3/6staging:iio: move iio data return types into types.h for use by inkerndrivers/staging/iio/iio.h drivers/staging/iio/types.h+4 -60 replies
4/6staging:iio::hwmon interface client driver.drivers/staging/iio/Kconfig drivers/staging/iio/Makefile drivers/staging/iio/iio_hwmon.c+241 -00 replies
5/6staging:iio:Documentation in kernel pull description.drivers/staging/iio/Documentation/inkernel.txt+58 -00 replies
6/6stargate2: example of map configuration for iio to hwmon example.arch/arm/mach-pxa/stargate2.c+24 -03 replies

Reviews trailers per patch

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

PatchLinus Walleij
SeriesA-b
1/6
2/6
3/6
4/6
5/6
6/6

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

Read the v6 thread

Cover letter [PATCH 0/6 V6] IIO: in kernel (as opposed to userspace) pull consumers

Previously IIO: in kernel pull interfaces.

Changes since the RFC V5. The race condition on exit is avoided by the introduction of the first patch and related modifications later. All in kernel consumers ultimately access the IIO devices through the iio_info structure pointer in the relevant iio_dev structure. Thus (protected by a mutex) we can set this to null on device removal and check it in users. Thus ensuring a clean error is returned if the provider is removed before the consumer has finished with it. Right now there is nothing to even make this hard but we can easily get the module at a later date to cut down on this happening.

Otherwise, I've made the whole thing no longer an option for IIO as suggested by Linus.

Few cleanups beyond that from testing and appopriate updates to the documentation.

Any comments? I'd like to get this out the way so we can move on to the more 'interesting' case of push interfaces (those that are interrupt driven). Patches for that are ready but need cleaning up and are more invasive that these within IIO itself.

Jonathan

Jonathan Cameron (6):
staging:iio:core set the iio_dev.info pointer to null on unregister
under lock.
staging:iio:core add in kernel interface mapping and getting IIO
channels.
staging:iio: move iio data return types into types.h for use by
inkern
staging:iio::hwmon interface client driver. staging:iio:Documentation in kernel pull description.
stargate2: example of map configuration for iio to hwmon example.

 arch/arm/mach-pxa/stargate2.c                  |   24 ++
 drivers/staging/iio/Documentation/inkernel.txt |   58 +++++
 drivers/staging/iio/Kconfig                    |    7 +
 drivers/staging/iio/Makefile                   |    4 +-
 drivers/staging/iio/consumer.h                 |   96 ++++++++
 drivers/staging/iio/driver.h                   |   34 +++
 drivers/staging/iio/iio.h                      |    8 +-
 drivers/staging/iio/iio_hwmon.c                |  232 +++++++++++++++++++
 drivers/staging/iio/industrialio-core.c        |    4 +
 drivers/staging/iio/inkern.c                   |  292 ++++++++++++++++++++++++
 drivers/staging/iio/machine.h                  |   24 ++
 drivers/staging/iio/types.h                    |    4 +
 12 files changed, 780 insertions(+), 7 deletions(-)
 create mode 100644 drivers/staging/iio/Documentation/inkernel.txt
 create mode 100644 drivers/staging/iio/consumer.h
 create mode 100644 drivers/staging/iio/driver.h
 create mode 100644 drivers/staging/iio/iio_hwmon.c
 create mode 100644 drivers/staging/iio/inkern.c
 create mode 100644 drivers/staging/iio/machine.h
Signature · 1 line
1.7.8.4