Michael Hennerich
88bc30548a
IIO: ADC: New driver for AD7792/AD7793 3 Channel SPI ADC
...
New driver for AD7792/AD7793 3-Channel, Low Noise,
Low Power, 16-/24-Bit Sigma-Delta ADC with On-Chip In-Amp
and Reference.
The AD7792/AD7793 features a dual use data out ready DOUT/RDY output.
In order to avoid contentions on the SPI bus, it's necessary to use
spi bus locking. The DOUT/RDY output must also be wired to an
interrupt capable GPIO.
In INDIO_RING_TRIGGERED mode, this driver may block its SPI bus segment
for an extended period of time.
Changes since V1:
Use bool where applicable.
Use data buffer that lives in their own cache line.
Restructure ad7793_calibrate_all to use an array.
Use msleep.
Query REG_ID instead of doing a write/read This is a test.
Add support for unipolar mode.
Drop range attribute in favor of write scale.
Add proper locking.
Use new validate_trigger callbacks.
Use IIO_IN_DIFF for differential channels.
Change attribute naming.
Use available_scan_masks.
Some other miscellaneous cleanup (none functional changes).
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 >
2011-06-28 14:47:25 -07:00
anish kumar
3fd47d4486
staging:iio:accel:kxsd9 replace kmallocs in power_up with use of already allocated buffer.
...
Signed-off-by: anish kumar <anish198519851985@gmail.com >
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:52 -07:00
anish
d5614701df
staging: IIO corrected the spelling in iio-trig-gpio
...
Corrected the spelling.
Signed-off-by: anish kumar <anish198519851985@gmail.com >
Acked-by: Jonathan Cameron <jic23@cam.ac.uk >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:52 -07:00
Jonathan Cameron
d31907f343
staging:iio:accel:adis16201 general cleanup, move to iio_priv and buffers in adis16201_state
...
Basically use various new facilities to tidy up.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:52 -07:00
Jonathan Cameron
927afbec71
staging:iio:light:isl29018: allocate device state with iio_dev
...
V2: Actually allocate the space for iio_priv
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:51 -07:00
Jonathan Cameron
88fa4de48e
staging:iio:magnetometer:hmc5843: allocate device state with iio_dev.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:51 -07:00
Jonathan Cameron
afc2ff0afa
staging:iio:meter:ade7759: allocate state with iio_dev
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:51 -07:00
Jonathan Cameron
338473c819
staging:iio:magnetometer:ak8975: allocate chip state with iio_dev.
...
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 >
2011-06-28 14:39:51 -07:00
Jonathan Cameron
58f08b0af8
staging:iio:resolver:ad2s90 general cleanup
...
Very simple driver, so not much to do.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:50 -07:00
Jonathan Cameron
8f2bd8363f
staging:iio:resolver:ad2s120x cleanup.
...
I've currently squashed the vel + pos combined attribute. If people need them
precisely paired I doubt they will get them from the sysfs interface anyway.
If that is a requirement it should come via a buffer implementation.
Note this patch leaves the completely non standard interface alone.
That will get fixed later.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:50 -07:00
Jonathan Cameron
b19e9ad5e2
staging:iio:resolver:ad2s1210 general driver cleanup.
...
Note I haven't made any changes to the userspace interface as yet.
This is all about cleaning up what was actually there (handling
all errors etc).
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:49 -07:00
Jonathan Cameron
937a960121
staging:iio:meter:ade7854: Allocate buffers in state and state with iio_dev.
...
Requires moving a few things around, but should be no functional changes.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:49 -07:00
Jonathan Cameron
57157d1c0e
staging:iio:meter:ade7754: allocate state with iio_dev and buffers in state.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:48 -07:00
Jonathan Cameron
bfccd4fb9a
staging:iio:meter:ade7753 allocate chip state with iio_dev; allocate buffers within state
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:48 -07:00
Jonathan Cameron
ba61bb18c2
staging:iio:gyro:adxrs450: allocate chip state with iio_dev
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:48 -07:00
Jonathan Cameron
d088ab8388
staging:iio:gyro:adis16260: allocate chip state with iio_dev and use iio_priv to access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:47 -07:00
Jonathan Cameron
9f8632d73e
staging:iio:gyro:adis16130: allocate chip state with iio_dev and use iio_priv to access it.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:47 -07:00
Jonathan Cameron
1dd9290a7e
staging:iio:gyro:adis16080: allocate chip state with iio_dev
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:47 -07:00
Jonathan Cameron
3a5952f97a
staging:iio:gyro:adis16060 allocate chip state with iio_dev.
...
This is still a very odd driver.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:47 -07:00
Jonathan Cameron
3e772581c2
staging:iio:dds:ad9951: allocate chip state with iio_dev
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:46 -07:00
Jonathan Cameron
fb565f132b
staging:iio:dds:ad9910: allocate chip state with iio_dev
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:46 -07:00
Jonathan Cameron
a28299114b
staging:iio:dds:ad9810: allocate chip state with iio_dev and use iio_priv for access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:46 -07:00
Jonathan Cameron
7be94372ca
staging:iio:dds:ad9850 allocate chip state with iio_dev + fix name of attr group.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:45 -07:00
Jonathan Cameron
8b7163a5f6
staging:iio:ad9834: allocate chip state with iio_dev and use iio_priv to access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:45 -07:00
Jonathan Cameron
39f3b32eb3
staging:iio:dds:ad9832: allocate chip state with iio_dev and use iio_priv to access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:45 -07:00
Jonathan Cameron
7074e1d44f
staging:iio:dds:ad5930 Fix attr group location + allocate state with iio_dev
...
The main attribute group was placed under driver name for some reason.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:44 -07:00
Jonathan Cameron
cada11fa20
staging:iio:dac:max517: allocate chip state with iio_dev and use iio_priv to access it.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:44 -07:00
Jonathan Cameron
f5730d52ba
staging:iio:dac:ad5791: allocate chip state with iio_dev and use iio_priv for access.
...
Slightly fiddly case with two regulators - could reorder, but this is the approach with
smallest likely impact.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:43 -07:00
Jonathan Cameron
86729fc46f
staging:iio:dac:ad5446: allocate chip state with iio_dev and use iio_priv for access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:43 -07:00
Jonathan Cameron
a3684ded4f
staging:iio:dac:ad5504: allocate chip state with iio_dev and use iio_priv for access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:43 -07:00
Jonathan Cameron
3ff242055b
staging:iio:dac:ad5624r: allocate chip state with iio_dev and use iio_priv for access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:42 -07:00
Jonathan Cameron
d3de2935b6
staging:iio:adc:adt7410 allocate chip state with iio_dev and use iio_priv to access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:42 -07:00
Jonathan Cameron
70be42919a
staging:iio:addac:adt7316: allocate chip state with iio_dev and use iio_priv to access.
...
Various minor cleanups needed to deal with removal of iio_dev pointer from chip state.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:42 -07:00
Jonathan Cameron
7978f9f8f9
staging:iio:adc:adt7310: allocate chip state with iio_dev and use iio_priv for access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:41 -07:00
Jonathan Cameron
84e8d84d0f
staging:iio:adc:adt75: allocate chip state with iio_dev and cleanup some function calls.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:41 -07:00
Jonathan Cameron
b0011d6dba
staging:iio:adc:ad7816: allocate chip state with iio_dev and use iio_priv to access.
...
Again, get rid of unwanted iio_dev pointer in state.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:41 -07:00
Jonathan Cameron
febafb94d6
staging:iio:adc:ad7745 allocate chip state with iio_dev and use iio_priv to access.
...
Also remove the iio_dev pointer from chip state as never needed.
V2: Actually allocate the space for iio_priv data.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:40 -07:00
Jonathan Cameron
744e4a6b85
staging:iio:adc:ad7314 allocate chip state with iio_dev and use iio_priv to access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:39 -07:00
Jonathan Cameron
d439797281
staging:iio:adc:ad7291: allocate chip state with iio_dev and use iio_priv for access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:39 -07:00
Jonathan Cameron
f4c794a2c1
staging:iio:adc:ad7152: allocate chip state with iio_dev and use iio_priv for access.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:38 -07:00
Jonathan Cameron
46a6af3820
staging:iio:adc:ad7150: allocate chip state with iio_dev and use iio_priv to access.
...
V2 - actually allocate some space for the iio_priv data.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:38 -07:00
Jonathan Cameron
d8aea29b62
staging:iio:adc:ad799x clear out last few uses of iio_dev->dev_data.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:37 -07:00
Jonathan Cameron
f490f42bdf
staging:iio:adc:ad7887 clear out last few uses of iio_dev->dev_data.
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:37 -07:00
Jonathan Cameron
67688105af
staging:iio:adc:ad7476 allocate state with iio_dev and use iio_priv to access.
...
Reg handling is a little fiddly given the ordering of calls.
All part of getting rid of iio_dev->dev_data
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:37 -07:00
Jonathan Cameron
ed0c012b85
staging:iio:accel:kxsd9: allocate state with iio_dev and use iio_priv to access.
...
V2: Actually allocate the storage.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:36 -07:00
Jonathan Cameron
83f0422dc6
staging:iio:accel:sca3000: allocate state in iio_dev and use iio_priv to access.
...
Mechanical change.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:36 -07:00
Jonathan Cameron
01a6721600
staging:iio:accel:adis16220 allocate tx and rx in state plus state via iio_priv
...
Few other misc cleanups.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:35 -07:00
Jonathan Cameron
a22ff7066c
staging:iio:accel:adis16240 allocate tx and rx in state plus state via iio_priv
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:35 -07:00
Jonathan Cameron
35212dfa6b
staging:iio:accel:adis16209 allocate tx and rx in state plus state via iio_priv
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:35 -07:00
Jonathan Cameron
4de66bbb3e
staging:iio:accel:adis16204 allocate tx and rx in state plus state via iio_priv
...
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-06-28 14:39:35 -07:00