summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/iio_core.h
Commit message (Collapse)AuthorAgeFilesLines
* staging:iio: Factor out event handling into its own fileLars-Peter Clausen2012-02-091-0/+4
| | | | | | | | | | | | | | | The core iio file has gotten quite cluttered over time. This patch moves the event handling code into its own file. Since the event handling code is largely independent from the core code the only code changes necessary for this are to make the moved iio_device_register_eventset, iio_device_unregister_eventset and iio_event_getfd functions non static. This has also the advantage that industrialio-core.c is now closer again to its counterpart in the outofstaging branch. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:iio: Drop {mark,unmark}_in_use callbacksLars-Peter Clausen2011-12-221-11/+0
| | | | | | | | | | | | | | | | These callbacks are currently used by the individual buffer implementations to ensure that the request_update callback is not issued while the buffer is in use. But the core already provides sufficient measures to prevent this from happening in the first place. So it is safe to remove them. There is one functional change due to this patch. Since the buffer is no longer marked as in use when the chrdev is opened, it is now possible to enable the buffer while it is opened. This did not work before, because mark_param_change did fail if the buffer was marked as in use. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: core. Allow for event chrdev obtaining ioctl if no buffer present.Jonathan Cameron2011-11-261-1/+1
| | | | | | | | | | | | Logic bug meant the chrdev would fail to open if there was no buffer support in a driver or in the core. This meant the ioctl to get the event chrdev would fail and hence events were not available. V2: change error to -EINVAL to mark as unsuitable for reading rather than not there. Both are true depending on how you look at it. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Prevent reading from buffer chrdev when device has no buffer.Jonathan Cameron2011-09-261-3/+6
| | | | | | | Silly bug introduced during the chrdev merge series. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: replacing term ring with buffer in the IIO core.Jonathan Cameron2011-09-261-12/+12
| | | | | | | They aren't always ring buffers, so just use buffer for all naming. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: tree wide IIO_RING_BUFFER config symbol to IIO_BUFFERJonathan Cameron2011-09-261-1/+1
| | | | | | | Functionality is generic, so name is missleading. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:attrs - make address a u64 to allow event codes to be used.Jonathan Cameron2011-09-061-1/+1
| | | | | | | | | | | Makes unusual event related attributes look a lot more like the core ones. V2: Make sure the utils that set these up can handle the codes. V3: rebase Reported-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: rework of attribute registration.Jonathan Cameron2011-09-061-1/+0
| | | | | | | | | | | | | | | This set also includes quite a number of bug fixes of particularly remove functions. Necessary due to issue pointed out in Bart Van Assche's patch: docs/driver-model: Document device.groups V2: Rebase due to patch reordering. V3: Pull various error fixes and cleanups out into their own patches. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <Michael.Hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: fix typoMichael Hennerich2011-09-061-1/+1
| | | | | Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: remove defunct iio_put and iio_get.Jonathan Cameron2011-09-061-10/+0
| | | | | | | | | All iio dependent modules statically depend on industrialio so these aren't needed. Not sure why they originally existed, but they aren't now. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: remove now defunct header definitions and add some staticsJonathan Cameron2011-09-061-9/+0
| | | | | | | | | | Now we have combined all chrdevs into one, some bits and bobs are only needed in industrialio-core.c and don't need to be in the core header. Also remove some unused defines. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: push the main buffer chrdev down to the top level.Jonathan Cameron2011-09-061-0/+32
| | | | | | | | | | | | | Sorry all, this one is very invasive, though the driver changes are just trivial interface fixes. Not all done yet. V2 - bring the sca3000 with us. V3 - fix ade7758 bugs in conversion. V4 - add ad5933 Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Introduce iio_core.h and move all core only stuff out of iio.h.Jonathan Cameron2011-08-231-0/+48
Also get rid of a few function defs where they are only now in one core file anyway. Whilst here add mask = 0 to get rid of warning. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud