aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/imu/adis16400_ring.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: iio: error case memory leak fixAndre Bartke2011-06-071-3/+7
| | | | | | | | | The data pointer should be freed in the error cases of adis16400_trigger_handler(). Signed-off-by: Andre Bartke <andre.bartke@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: poll func allocation clean up.Jonathan Cameron2011-05-191-14/+9
| | | | | | | | Add a function to neatly deal with allocation of poll functions. Ultimately this allows us to more easily change the implementation. 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-6/+10
| | | | | | | | | | | | | 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:imu:adis16400 avoid allocating rx, tx, and state separately from ↵Jonathan Cameron2011-05-191-9/+8
| | | | | | | | | | iio_dev. Uses the iio_allocate_device parameter to set aside space for adis16400_state and ____cacheline_aligned buffers for tx and rx to avoid separatel allocating them. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:imu:adis16350 etc support into adis16400 driver.Jonathan Cameron2011-05-191-19/+70
| | | | | | | | | | | | | | | Next patch will remove the current adis16350 driver. These should have been merged a long time ago, but there we are. V3: rebase fixup + add missing extend_name for supply on adis16350 V2: Move to single IIO_CHAN macro + use the new extend_name to make the naming of the temperature sensors contain x, y, z rather than messing with modifiers. This a very weird case and I don't want temperature to use axial modifiers. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:imu:adis16400 move to irq based triggers and channel spec ↵Jonathan Cameron2011-05-191-121/+39
| | | | | | | | | channel registration. V2: rebase fixup. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: IIO: IMU: ADIS16400: Make sure only enabled scan_elements are ↵Michael Hennerich2011-04-051-3/+7
| | | | | | | | | pushed into the ring Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> CC: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: IIO: IMU: ADIS16400: Fix up SPI messages cs_change behaviorMichael Hennerich2011-04-051-2/+0
| | | | | | | | | cs_change must not be set in the last transfer of a spi message Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> CC: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: adc add numbers to naming of all adc channels as needed to ↵Jonathan Cameron2010-10-081-12/+12
| | | | | | | | | | associate events with them. Given event codes are associated by number not name, all adc channels including those with names need to have numbers. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: adis16400 add _index attribute registrationJonathan Cameron2010-09-211-0/+13
| | | | | | 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-23/+12
| | | | | | | | | 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: adis16400 add _type attributes for all scan elementsJonathan Cameron2010-09-211-0/+15
| | | | | | | | | The bit depth of 14 for the supply adc on the datasheet is highly suspicious. Confirmation requested from Analog. 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 sync drivers with current ABIManuel Stahl2010-08-311-6/+6
| | | | | | 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 move scan_elements into ring bufferManuel Stahl2010-08-311-25/+24
| | | | | | | | 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-1/+1
| | | | | | | | | 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: Make extensive use of iio_sw_ring_preenableJonathan Cameron2010-07-221-24/+2
| | | | | | 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: Add stubs for iio_ring_buffer_[un]register and equivalent ↵Jonathan Cameron2010-07-221-10/+0
| | | | | | | | 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: replace combine_8_to_16 with be16_to_cpup where possible.Jonathan Cameron2010-07-221-14/+3
| | | | | | 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 timestamp field from trigger and pass instead through ↵Jonathan Cameron2010-07-221-2/+2
| | | | | | | pollfuncs Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: Add iio_triggered_ring postenable and predisable + use in driversJonathan Cameron2010-07-221-18/+2
| | | | | | 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: Add and convert drivers to use iio_alloc_pollfuncJonathan Cameron2010-07-221-7/+4
| | | | | | 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: adis16400: fix some minor issues and clean-upBarry Song2010-06-181-0/+48
| | | | | | | | | | | 1. move adis16400_spi_read_burst() to adis16400_ring.c since it is only called there 2. add the lost calling to adis16400_self_test() 3. codes cleanup Signed-off-by: Barry Song <21cnbao@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: iio: pull in slab.h for kmalloc funcsMike Frysinger2010-06-181-0/+1
| | | | | | | | | | These drivers use kzalloc() but don't include slab.h. They currently build though because the spi.h header will pull in slab.h for us. But rather than rely on that behavior forever, include slab.h explicitly. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:imu ADIS16400 and ADIS16405 driverBarry Song2010-05-111-0/+245
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Barry Song <Barry.Song@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>