summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/adc/ad7887_ring.c
Commit message (Collapse)AuthorAgeFilesLines
* staging:iio: Setup buffer access functions when allocating the bufferLars-Peter Clausen2012-02-091-2/+0
| | | | | | | | | 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>
* staging:iio:adc:ad7887 stop reading from buffer for sysfs access.Jonathan Cameron2011-12-081-34/+0
| | | | | | | | No known use case and complicates in kernel interface work. 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>
* staging:iio: scrap scan_count and ensure all drivers use active_scan_maskJonathan Cameron2011-12-081-3/+5
| | | | | | | | | 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>
* staging:iio:buffer move setup ops from buffer instance to iio_devJonathan Cameron2011-12-081-1/+1
| | | | | | | | | 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>
* staging:iio: header reorganizationJonathan Cameron2011-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue brought up by Lars-Peter Clausen. This is a varient of what he suggested. io/iio.h for driver stuff (has to include types.h) Sub files for the bits drivers may or may not use iio/sysfs.h iio/buffer.h (contents of current buffer_generic.h) (obviously anything offering events will need events.h as well) iio/types.h for the enums that matter to both iio_chan_type, iio_modifier iio/events.h for the event code stuff IIO_EVENT_CODE and friends. + everything in chrdev.h So this is the stuff that userspace cares about. Also include iio_event_type, iio_event_direction Thus iio drivers include iio.h + as required events.h sysfs.h buffer.h in kernel users (once that interface is merged) will need inkern.h which will pull in types.h Userspace will need just events.h (which pulls in types.h) to get everything they need to know about. Buffer userspace access doesn't currently need any core defines. All information about the data format is passed through sysfs. 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-14/+14
| | | | | | | 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: rename ring_generic.h -> buffer_generic.hJonathan Cameron2011-09-261-1/+1
| | | | | | | Nothing in this file is specific to RING buffers so rename it. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: tree wide IIO_RING_TRIGGERED -> IIO_BUFFER_TRIGGEREDJonathan Cameron2011-09-261-1/+1
| | | | | | | | | also, IIO_RING_HARDWARE_BUFFER -> IIO_BUFFER_HARDWARE These aren't always rings so the naming should not imply that. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: treewide rename iio_triggered_ring_* to iio_triggered_buffer_*Jonathan Cameron2011-09-261-2/+2
| | | | | | | | | Not always a ring so naming is missleading. Also, kfifo_buf is probably first buffer to take out of staging and it definitely isn't a ring. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Switch the channel masks to bitmaps so as to allow for more ↵Jonathan Cameron2011-09-061-4/+6
| | | | | | | | | | | | | | | | | channels. This is as light as possible on changes to current drivers. Some drivers make assumptions that their masks fit in a single long. Given they were previously working this is clearly valid if not tidy. The max1363 is an example where there should be no such assumptions. V2: Add the new 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: spit trigger.h into provider and consumer parts.Jonathan Cameron2011-08-241-1/+1
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: prevent removal of module connected to trigger.Jonathan Cameron2011-08-241-6/+0
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:pollfunc: Make explicit that private data is always pointer to a ↵Jonathan Cameron2011-08-241-1/+1
| | | | | | | | | struct iio_dev. This is always true, so lets make it explicit. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:adc: header cleanup - remove unused.Jonathan Cameron2011-08-231-3/+0
| | | | | | | | | Clear out all the excessive includes in the *_ring.c files. Mixture of cut and paste bloat and things needed for code that has gone away. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:adc:ad7887 clear out last few uses of iio_dev->dev_data.Jonathan Cameron2011-06-281-3/+3
| | | | | | 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: use pollfunc allocation helpers in remaining drivers.Jonathan Cameron2011-05-191-16/+8
| | | | | | | Some didn't get converted the first time around. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: rationalization of different buffer implementation hooks.Jonathan Cameron2011-05-191-12/+15
| | | | | | | | | | | | | 1) move a generic helper function out of ring_sw. It applies to other buffers as well. 2) Get rid of a lot of left over function definitions. 3) Move all the access functions into static structures. 4) Introduce and use a static structure for the setup functions, preenable etc. Some driver conversions thanks to Michael Hennerich (pulled out of patches that would otherwise sit after this). Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:adc:ad7887: Use private data space from iio_allocate_deviceMichael Hennerich2011-05-191-4/+1
| | | | | | Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:adc:ad7887: Convert to new channel registration method.Michael Hennerich2011-05-191-61/+7
| | | | | | | | | | | | Convert to new channel registration method Update / change license copyright header Add missing call to iio_trigger_notify_done() V2: use IIO_CHAN macro. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:adc:ad7887 move to irqchip based trigger handling.Jonathan Cameron2011-05-191-35/+27
| | | | | | | Untested. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* IIO: ADC: AD7887: Update timestamp handlingMichael Hennerich2011-02-281-15/+21
| | | | | | | | | | Add timestamp attributes. Revise timestamp handling accordingly. Preset timestamp generation. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: adc: Enable driver support for ad7887 AD converterMichael Hennerich2010-11-291-0/+266
Enable support for AD7887: SPI Micropower, 2-Channel, 125 kSPS, 12-Bit ADC staging: iio: adc: Fix according to review feedback Review feedback by Jonathan Cameron: Combine statements. Document struct members. Remove redundant variable initialization. Simplify multichannel scan from ring logic. Fix coding style. [v2] staging: iio: adc: ad7887: Fix typos Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud