summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/ring_generic.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* staging:iio:buffering move the copy to user on rip down into implementationsJonathan Cameron2011-02-181-1/+1
| | | | | | | | | | The current interface is not as adaptable as it should be. Moving this complexity into the implementations makes it easier to add new implementations. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: ring_generic: provide IIO_CONST_ATTR_SCAN_EL_TYPE_WITH_SHIFTMichael Hennerich2010-10-071-0/+17
| | | | | | 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: timestamp_en naming typo fix.Jonathan Cameron2010-10-071-1/+1
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: remove deprecated form of scan_el attribute naming.Jonathan Cameron2010-09-211-3/+3
| | | | | | | | This has been replaced by a separate _index attribute Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: amend macros for SCAN_EL creation to add separate index attrJonathan Cameron2010-09-211-3/+12
| | | | | | | | | | | | | | | | | | As Manuel Stahl observed, putting data into the naming of an attribute (beyond what it is for) breaks the one value per attribute rule (in spirit at least). Hence we introduce a separate _index attribute for each scan element to tell userspace the ordering in output from the buffer. This will generate a lot of sparse warnings as all drivers will have unused iio_const_attrs created. The rest of the set will clean these up. The final patch will remove the old indexing method. It is not here so as to maintain one or other interface for all devices as this set progresses. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: Remove unused bit_count from struct iio_scan_elJonathan Cameron2010-09-211-11/+6
| | | | | | | | | The job this was intended to do (never implemented) is now done by explicit definition of _type attributes in all drivers Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: lis3l02dq add _type attributes for all scan elementsJonathan Cameron2010-09-211-1/+10
| | | | | | | | Also, adds a macro to make defining such attributes simple. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: unecessary header removal and kernel doc clean upJonathan Cameron2010-09-041-9/+60
| | | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio move scan_elements into ring bufferManuel Stahl2010-08-311-0/+100
| | | | | | | | tested with sca3000, adis16400 Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio rename ring attributesManuel Stahl2010-08-311-11/+11
| | | | | | | | | bps -> bytes_per_datum ring_enable -> enable Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: Add a bits per element element to ring_generic allowing a ↵Barry Song2010-07-221-0/+2
| | | | | | | | general ring_sw_preenable_function. Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: Fix scan_element naming issueJonathan Cameron2010-07-221-3/+7
| | | | | | | | | | The addition of a number to the scan_element names caused an issue in drivers that used either #define or an enum to provide the number. Before this fix names like ADIS16350_ACCEL_X_accel_x_en occur rather than 5_accel_x_en. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: Add stubs for iio_ring_buffer_[un]register and equivalent ↵Jonathan Cameron2010-07-221-0/+11
| | | | | | | | driver stubs Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Remove naming via IDR's where no longer necessary under new abi.Jonathan Cameron2010-05-111-1/+1
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Clean out unused IIO_SCAN_EL and add IIO_SCAN_NAMED_EL_CJonathan Cameron2010-05-111-21/+15
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* iio:staging:accelerometers move towards the new abiJonathan Cameron2010-05-111-2/+2
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: IIO: Fix uses of spinlocks prior to init in ring implementationsJonathan Cameron2010-05-111-5/+3
| | | | | | | | | | | | | | | | | Some confusion was caused by the ___iio_init_ring_buffer and equivalent in ring_sw handling both init of spin locks etc and allocation and of the actual buffer. This resulted in ring->use_lock being held before it was initialized and actually during the initialization. Some of the recent cleanups in the spin lock code seem to have triggered the bug actually causing traceable crashes. The following patch should fix this but hasn't been extensively tested as of yet and there may well be some side effects I haven't thought of. Just wanted to get this out there before anyone else runs into it! Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: make drivers use spin_lock_init()Sven-Thorsten Dietrich2010-03-031-2/+1
| | | | | | | | | | This fixes some RT-triggered compile errors and typos. Signed-off-by: Sven-Thorsten Dietrich <sdietrich@novell.com> Acked-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: iio: lots of doc fixesRandy Dunlap2009-12-111-28/+45
| | | | | | | | | | | | | | | Fix iio header files kernel-doc notation errors, spelling, typos, indentation, grammar, etc. It would also be good if these function names were spelled correctly, but I didn't change them: iio_push_or_escallate_ring_event() iio_trigger_dettach_poll_func() Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: IIO: Add generic ring buffer support to the IIO coreJonathan Cameron2009-09-151-0/+283
This provides a unified interface for hardware and software ring buffers. Changes since V2: * Moved to a more consistent structure. Now the ring buffer has an associated struct device which is a child of the relevant iio_dev. This in turn has two children, one for the event interface and one for the access interface. These two interfaces are now managed via cdev structures. * Numerous minor cleanups Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud