summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/magnetometer
Commit message (Collapse)AuthorAgeFilesLines
* staging:iio:magnetometer:hmc5843: allocate device state with iio_dev.Jonathan Cameron2011-06-281-29/+21Star
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:magnetometer:ak8975: allocate chip state with iio_dev.Jonathan Cameron2011-06-281-51/+40Star
| | | | | | | | Here the ordering is a little tricky, so to keep changes minimal, a copy of the gpio number is introduced. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: implement an iio_info structure to take some of the constant ↵Jonathan Cameron2011-05-202-4/+12
| | | | | | | | | | elements out of iio_dev. This was suggested by Arnd Bergmann, Other elements may well move in here in future, but it definitely makes sense for these. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Add ability to allocate private data space to iio_allocate_deviceJonathan Cameron2011-04-262-2/+2
| | | | | | | | | | | | | Suggested by Arnd Bergmann. Note this will break ALL drivers that are out of mainline. The fix is trivial change of iio_allocate_device() -> iio_allocate_device(0) Sorry if this causes issues for any one! V2: Include new drivers in the update Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: iio: oaktrail AK8975 support via IIOAlan Cox2011-04-201-37/+83
| | | | | | | | | | | | | Actually this is generic 'I have no GPIO' support for the AK8975, instead we have to go bus polling. Huang Liang produced an initial patch which worked by removing the support for GPIO pins. This patch instead makes GPIO support optional and Huang then fixed some bugs in it. Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: ak8975: Add ak8975 magnetometer sensorAndrew Chew2010-09-153-0/+569
| | | | | | | | | | | | | | | | | | This is for the Asahi Kasei AK8975 3-axis magnetometer. It resides within the magnetometer section of the IIO subsystem, and implements the raw magn_x,y,z_raw attributes, as well as magn_x,y,z_scale attributes for converting to Gauss. Changed to use the magn_x,y,z_scale attributes, and made those attributes give the scale factor to conert to Gauss. Also applied more fixes from feedback. Keeping mode as an unsigned long. I'm going to add proper power management at some point anyway, which would deprecate this attribute. Signed-off-by: Andrew Chew <achew@nvidia.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: Change GAIN macros to SCALE.Andrew Chew2010-09-151-6/+6
| | | | | | | | | | | | Per email exchange with Jonathan Cameron, GAIN should instead be SCALE, to be consistent with documentation. Resending, since this goes with the 2/2 patch. Signed-off-by: Andrew Chew <achew@nvidia.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: hmc5843 change ABI to comply with documentationManuel Stahl2010-08-311-16/+16
| | | | | | | | | this one completes my last patch set to compile fine for all drivers. Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Datta, Shubhrajyoti <shubhrajyoti@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: iio: signedness bugDan Carpenter2010-08-311-2/+2
| | | | | | | | | | | | i2c_smbus_read_byte_data() returns an s32 type. We need to change "rate" to signed for the error handling to work. Also I changed it to propogate the error code instead of just returning -EINVAL. Other error codes could be -EAGAIN for example. 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>
* drivers/staging/iio: call mutex_unlock in error handling codeJulia Lawall2010-08-311-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the error handling code so that it benefits from the call to mutex_unlock at the end of the function. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @rcu exists@ position p1; expression E; @@ mutex_lock@p1(E); ... mutex_unlock(E); @exists@ position rcu.p1; expression E; @@ *mutex_lock@p1(E); ... when != mutex_unlock(E); ?*return ...; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: iio: add digital compass hmc5843 driverShubhrajyoti D2010-07-223-0/+644
| | | | | | | | | | | | Adding support for the Honeywell HMC5843. The interface to the device is i2c TODO: Adding the documentation Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: Break up gyro.h and move to new abiJonathan Cameron2010-05-111-6/+6
| | | | | Signed-off-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/+31
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>