1
0
Fork 0
Commit Graph

23 Commits (b1a613d505c53ad4f4af4cf228841a1784a50011)

Author SHA1 Message Date
Alexander Stein 569c4ac218 iio: Fix some comments
Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-12-27 11:21:28 +00:00
Jonathan Cameron 84b36ce5f7 staging:iio: Add support for multiple buffers
Route all buffer writes through the demux.
Addition or removal of a buffer results in tear down and
setup of all the buffers for a given device.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Tested-by: srinivas pandruvada <srinivas.pandruvada@intel.com>
2012-11-10 10:17:21 +00:00
Lars-Peter Clausen 3fff227436 staging:iio:dummy: Fix potential NULL pointer dereference
If the config contains CONFIG_IIO_BUFFER=y and CONFIG_IIO_SIMPLE_DUMMY_BUFFER=n
iio_simple_dummy_configure_buffer() is stubbed out and iio_buffer_register() is
not. As a result we try to register a buffer which has not been configured.
This will causes a NULL pointer deref in iio_buffer_register. To solve this
issue move the iio_buffer_register() call to iio_simple_dummy_configure_buffer(),
so it will only be called if iio_simple_dummy_configure_buffer() has been called.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-22 10:55:08 +01:00
Lars-Peter Clausen ce56ade6ae iio: Drop timestamp parameter from buffer store_to callback
Drop timestamp parameter from buffer store_to callback and subsequently from
iio_push_to_buffer. The timestamp parameter is unused and it seems likely that
it will stay unused in the future, so it should be safe to remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-08 10:14:34 +01:00
Lars-Peter Clausen 00176b360c staging:iio: Use iio_push_to_buffer
Consistently use iio_push_to_buffer instead of manually calling the buffers
store_to callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-06 22:05:36 +01:00
Peter Meerwald be344c84c2 iio staging: fix cast warning
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-15 17:33:17 +01:00
Lars-Peter Clausen a1bdeefd7b staging:iio:dummy driver: Do not return error code in interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-08 20:02:27 +01:00
Peter Meerwald 8b32b11c2e staging: iio: fix typo, improve timestamp alignment comment
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:24:27 -07:00
Peter Meerwald 970689f10e staging: iio: simplify timestamp alignment in iio_simple_dummy
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:24:27 -07:00
Peter Meerwald 708706ff29 staging: iio: fix trigger handler of iio_simple_dummy driver
accessing first and last channel fails:
fakedata[0] is never accessed, out-of-bound access for last channel

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:24:27 -07:00
Peter Meerwald d163a19d91 iio staging: another typo in iio_simple_dummy_buffer
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:31:42 -07:00
Peter Meerwald 25c38aa3d1 staging: iio: fix typos in simple dummy driver
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:36:26 -07:00
Masanari Iida 99de0c2b34 staging: iio: Fix typo in iio
Correct spelling typo in staging/iio

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Michael Hennerich<michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08 16:04:12 -07:00
Jonathan Cameron 06458e277e IIO: Move core headers to include/linux/iio
Step 1 in moving the IIO core out of staging.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 11:01:43 -07:00
Jonathan Cameron fd6487f843 staging:iio: Add caching of scan_timestamp to the core as well as buffers.
This will be needed when multiple buffer support is added.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24 11:23:38 -07:00
Jonathan Cameron 420fe2e947 staging:iio: add caching of the number of bytes in a scan.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24 11:23:37 -07:00
Lars-Peter Clausen 7e632344ad staging:iio: Setup buffer access functions when allocating the buffer
Setup the buffer access functions in the buffer allocate function. There is no
need to let each driver handle this on its own.

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>
2012-02-09 10:03:51 -08:00
Jonathan Cameron 66748b5ada staging:iio:buffer remove unused owner field from struct iio_buffer
Legacy of having multiple chrdevs that never got cleaned up.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08 12:11:09 -08:00
Jonathan Cameron 550268ca11 staging:iio: scrap scan_count and ensure all drivers use active_scan_mask
Obviously drivers should only use this for pushing to buffers.
They need buffer->scan_mask for pulling from them post demux.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08 12:11:08 -08:00
Jonathan Cameron 1612244f8a staging:iio:buffer move setup ops from buffer instance to iio_dev
These callbacks should not be buffer instance specific.
Hence move them out of the buffer.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08 12:11:08 -08:00
Jonathan Cameron c15c4f1dea staging:iio:buffer drop bpe field.
Has no remaining users.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08 12:05:04 -08:00
Paul Gortmaker 8e336a722b staging: Add export.h for THIS_MODULE/EXPORT_SYMBOL to drivers/staging users.
Lots of drivers have in the past expected the presence of basic things
like THIS_MODULE and EXPORT_SYMBOL.  With the header cleanup, they wont
have these.  Call out the include explicitly.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:32:08 -04:00
Jonathan Cameron 9ad2e2e1d6 staging:iio:dummy Add buffered reading support
Very simple buffered reading.  Did not provide a trigger as
the sysfs trigger already meets that requirement.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:36:30 -07:00