staging:iio:core add in kernel interface mapping and getting IIO channels.
authorJonathan Cameron <jic23@cam.ac.uk>
Wed, 15 Feb 2012 19:48:01 +0000 (19:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 20:10:02 +0000 (12:10 -0800)
commite27d75d71c0dbbab83768c6e327d13f445d0214f
tree3076216ea6fba337f8a88351c35f40427fa86301
parentac917a81117ce0286847666b55dd265f6cda8383
staging:iio:core add in kernel interface mapping and getting IIO channels.

Lifted from proposal for in kernel interface built on the out of staging
branch.

Two elements here:
* Map as defined in "inkern.h"
* Matching code to actually get the iio_dev and channel
that we want from the global list of IIO devices.
V4: Everything now built if iio is built (rather than being optional)
    Removal race condition prevented by using info pointer as a check
    of removal under a lock.
V3: Drop the option of registering / getting channels using dev pointer.
Stick to name only as suggested by Mark Brown (this has caused user
confusion in the regulator framework.)
V2: As per Greg KH suggestion, move over to registration by passing
the tables into the provider drivers (how regulator does it).
This does not prevent us using the original more flexible approach
if at a later date there is a usecase that demands it.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/Makefile
drivers/staging/iio/consumer.h [new file with mode: 0644]
drivers/staging/iio/driver.h [new file with mode: 0644]
drivers/staging/iio/inkern.c [new file with mode: 0644]
drivers/staging/iio/machine.h [new file with mode: 0644]