aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-10-14staging: Complete sched.h removal from interrupt.hJeff Mahoney1-0/+1
Commit d43c36dc removed sched.h from interrupt.h and distributed sched.h to users which needed it. This finishes it up for staging. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14Staging: iio: Fix missing include <linux/sched.h>Jonathan Cameron1-0/+1
linux/sched.h include was removed form linux/poll.h by commmit a99bbaf5ee6bad1aca0c88ea65ec6e5373e86184 Required for definition of TASK_INTERRUPTIBLE amongst others From: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: iio: Don't build on s390Jeff Mahoney1-0/+1
The IIO core expects request_irq to work, which doesn't appear to exist on s390. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-04Staging: IIO: tsl2561: Drop unused module parametersJean Delvare1-4/+0
The I2C_CLIENT_INSMOD macro is only useful for i2c drivers which implement device detection. The tsl2561 driver doesn't, so there is no point in calling it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jonathan Cameron <jic23@cam.ac.uk>
2009-09-21Driver-Core: fix devnode callbacks for dabusb and industrialioIngo Molnar1-2/+2
The build of the dabusb driver broke: drivers/media/video/dabusb.c:758: error: unknown field 'nodename' specified in initializer drivers/media/video/dabusb.c:758: warning: initialization from incompatible pointer type make[3]: *** wait: No child processes. Stop. Due to this commit: e454cea: Driver-Core: extend devnode callbacks to provide permissions Missing the dabusb driver's dabusb_nodename() callback. Similar issues with the iio/industrialio driver in staging, pointed out and patched by Jean Delvare. Signed-off-by: Ingo Molnar <mingo@elte.hu> Industrialio-parts-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 Dunlap3-4/+4
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 Cox2-2/+2
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: Add todo list for stagingJonathan Cameron1-0/+69
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: Initial documentationJonathan Cameron7-0/+600
This needs considerably more work, all comments / suggestions welcomed. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: Proof of concept gpio triggerJonathan Cameron3-1/+209
Simple example of how a gpio trigger driver would work. Things to be added include interupt type control (high, low). Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: Periodic timer based triggerJonathan Cameron5-1/+254
The original posting of this driver led to a discussion in which it was commented that a better system was needed for dealing with the many possible periodic interrupt sources available on some SoCs. Unfortunately that is a big task and as far as I know, no-one has taken it on as yet. So in the meantime this driver is still in here. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: max1363 add software ring buffer support using ring_swJonathan Cameron3-1/+255
Changes since V2: * Moved to new registration methodology. Signed-off-by: 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: Ring buffer: Initial pass at rarely locked ring bufferJonathan Cameron4-0/+636
Please note this ring buffer implementation is very much a work in progress (and hence RFC). In it's current form it is stable and reasonably efficient. There are a couple of unlikely cases that will lead to more data being lost that is strictly necessary. The target was for the case of requiring regular sampling even during user space reads. All comments welcome. The intention is to make this only one of several implementations with run time selection. For now there is only one, so it is hard coded into the drivers using it. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: Trigger support added to core.Jonathan Cameron5-1/+579
Add general registration support for IIO triggers. These are currently only used to initialize a 'poll' of a given device. Examples include the lis3l02dq's data ready signal being used to initialize a read and gpio triggers being used to allow externally synchronized sensor reading. Each trigger can cause any number of 'consumer' devices to be polled with each storing data into a related ring buffer. Two stage triggering is supported with 'fast' and 'slow' paths. The first is used for things like pulling a data hold line high and the second for actual read which may take far longer. Changes since V2: * As with IIO triggers now use a registration approach much closer to that of input leading to cleaner code. 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 Cameron6-0/+2171
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: Add generic ring buffer support to the IIO coreJonathan Cameron4-0/+858
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>
2009-09-15Staging: IIO: kxsd9 accelerometer minimal supportJonathan Cameron4-0/+417
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 Cameron7-0/+1324
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>
2009-09-15Staging: IIO: tsl2561 digital light sensor core supportJonathan Cameron6-1/+309
This is a pretty minimalist example of an IIO driver. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: max1363 ADC driverJonathan Cameron6-0/+907
Core support for MAX1361, MAX1362, MAX1363, MAX1364, MAX1136, MAX1137, MAX1138, MAX1139, MAX1236, MAX1237, MAX1238, MAX1239. Ring buffer support later in series. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: IIO: core support for device registration and managementJonathan Cameron7-0/+1716
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>