aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/accel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-21Merge staging-next tree into Linus's latest versionGreg Kroah-Hartman21-241/+3544
Conflicts: drivers/staging/arlan/arlan-main.c drivers/staging/comedi/drivers/cb_das16_cs.c drivers/staging/cx25821/cx25821-alsa.c drivers/staging/dt3155/dt3155_drv.c drivers/staging/hv/hv.c drivers/staging/netwave/netwave_cs.c drivers/staging/wavelan/wavelan.c drivers/staging/wavelan/wavelan_cs.c drivers/staging/wlags49_h2/wl_cs.c This required a bit of hand merging due to the conflicts that happened in the later .34-rc releases, as well as some staging driver changing coming in through other trees (v4l and pcmcia). Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-18Staging: iio: adis16220 extract bin_attribute structures from stateJonathan Cameron2-53/+56
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-18Staging: iio: adis16220 vibration sensor driverBarry Song5-0/+830
Signed-off-by: Barry Song <Barry.Song@analog.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11staging: iio: adis16240 driverBarry Song6-0/+1208
Signed-off-by: Barry Song <Barry.Song@analog.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11staging: iio: adis16209 driverBarry Song6-0/+1211
Signed-off-by: Barry Song <Barry.Song@analog.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11staging: iio: Break up gyro.h and move to new abiJonathan Cameron1-0/+23
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: iio: accel: fix up some sparse warnings.Greg Kroah-Hartman2-6/+5
Minor stuff (static, NULL, etc.) Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: iio: accelerometers trivial checkpatch related fixesJonathan Cameron2-8/+7
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11staging:iio: Remove naming via IDR's where no longer necessary under new abi.Jonathan Cameron2-2/+2
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11iio:staging:accelerometers move towards the new abiJonathan Cameron8-230/+260
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-30Staging: iio: test for failed allocationDan Carpenter1-0/+3
We should return test to see if iio_allocate_trigger() fails and return -ENOMEM. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-30staging: iio: lis3l02dq - incorrect ws used in container of call.Jonathan Cameron1-1/+1
The word oops comes to mind. Original patch to merge the two work queues in here (prior to Greg taking them into staging) changed the top half to only use one of them and the bottom half to assume it was the other. Currently causes a NULL pointer dereference if you enable any of the events on an lis3l02dq. Just goes to show I need a few more regression tests. Signed-of-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo5-0/+5
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2009-12-11Staging: IIO: add selection of IIO_SW_RING to LIS3L02DQ as neededJonathan Cameron1-0/+1
Here I've kept the selection of IIO_SW_RING separate from IIO_TRIGGER as it will go away fairly shortly when the ring buffer type becomes configurable on a per device basis, whereas the IIO_TRIGGER select will remain. Whether to retain the option to remove the support for ring buffers entirely is one for after that support is in place. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: fix assorted typos all over the placeAndré Goddard Rosa3-6/+6
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: iio: Fix up the module build.Paul Mundt1-0/+1
Both the max1363 and lis3l02dq modules rely on IIO trigger support in their ring buffer implementations, which is presently a separate config option. In the case of IIO_RING_BUFFER=y and IIO_TRIGGER=n, we end up with the following: ERROR: "iio_trigger_attach_poll_func" [drivers/staging/iio/adc/max1363.ko] undefined! ERROR: "iio_trigger_dettach_poll_func" [drivers/staging/iio/adc/max1363.ko] undefined! ERROR: "iio_trigger_unregister" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! ERROR: "iio_trigger_notify_done" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! ERROR: "iio_trigger_read_name" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! ERROR: "iio_trigger_poll" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! ERROR: "iio_trigger_attach_poll_func" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! ERROR: "iio_trigger_register" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! ERROR: "iio_free_trigger" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! ERROR: "iio_trigger_dettach_poll_func" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! ERROR: "iio_allocate_trigger" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 This adds an IIO_TRIGGER select for these two drivers conditional on IIO ring buffer support. Caught with an SH randconfig in -next. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: iio: introduce missing kfreeJulia Lawall1-0/+1
Error handling code following a kmalloc or kzalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk>
2009-09-15Staging: iio: fix duplicate dev_attr_nameRandy Dunlap1-1/+1
device attr's should be static, otherwise duplicate identifiers are created: drivers/staging/iio/trigger/iio-trig-gpio.o:(.data+0x1c): multiple definition of `dev_attr_name' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: iio: Fix type warningsAlan Cox1-1/+1
Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: lis3l02dq ring buffer and data ready trigger supportJonathan Cameron3-1/+621
Example of relatively common case of device sampling based on internal clock and providing a data ready signal to indicate that new data is available to be read out. Generic trigger approach used to allow other devices to be sampled 'at the same time' as this the accelerometer. This is very useful in various motion estimation algorithms. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: VTI sca3000 series accelerometer driver (spi)Jonathan Cameron5-0/+2149
Example of how a device with a hardware ring buffer is handled within IIO. Changes since V2: * Moved to new registration functions giving much cleaner interface. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: kxsd9 accelerometer minimal supportJonathan Cameron3-0/+404
This provides only very minimal support for this device. Note that an alternate driver has been posted to the input mailing list. When the original LMKL discussion that led to the descision to develop IIO occured, the question on whether the differing requirements of IIO and input drivers made it a good idea to have unified drivers was left as an open question. It still is. All opinions on this question welcome. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: lis3l02dq accelerometer core supportJonathan Cameron5-0/+1322
A later patch in the series will add data ready triggering and ring buffer support. This core patch provides an event interface and sysfs based reading of values. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>