History log of /drivers/staging/iio/adc/ad7793.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7e632344adfe749749aa525f6fbe0ffc05ae3190 03-Jan-2012 Lars-Peter Clausen <lars@metafoo.de> staging:iio: Setup buffer access functions when allocating the buffer

Setup the buffer access functions in the buffer allocate function. There is no
need to let each driver handle this on its own.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/drivers/staging/iio/adc/ad7793.c
12e55508921865aefdd80fd17afe70c191afbd1b 09-Jan-2012 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (466 commits)
net/hyperv: Add support for jumbo frame up to 64KB
net/hyperv: Add NETVSP protocol version negotiation
net/hyperv: Remove unnecessary kmap_atomic in netvsc driver
staging/rtl8192e: Register against lib80211
staging/rtl8192e: Convert to lib80211_crypt_info
staging/rtl8192e: Convert to lib80211_crypt_data and lib80211_crypt_ops
staging/rtl8192e: Add lib80211.h to rtllib.h
staging/mei: add watchdog device registration wrappers
drm/omap: GEM, deal with cache
staging: vt6656: int.c, int.h: Change return of function to void
staging: usbip: removed unused definitions from header
staging: usbip: removed dead code from receive function
staging:iio: Drop {mark,unmark}_in_use callbacks
staging:iio: Drop buffer mark_param_change callback
staging:iio: Drop the unused buffer enable() and is_enabled() callbacks
staging:iio: Drop buffer busy flag
staging:iio: Make sure a device is only opened once at a time
staging:iio: Disallow modifying buffer size when buffer is enabled
staging:iio: Disallow changing scan elements in all buffered modes
staging:iio: Use iio_buffer_enabled instead of open coding it
...

Fix up conflict in drivers/staging/iio/adc/ad799x_core.c (removal of
module_init due to using module_i2c_driver() helper, next to removal of
MODULE_ALIAS due to using MODULE_DEVICE_TABLE instead).
c0fdbe149c9d1cab9057c39a10cd609751541cf2 14-Dec-2011 Jonathan Cameron <jic23@kernel.org> staging:iio: iio_trigger contains defunct owner field. Remove it.

This field moved into the trigger_ops structure a while back, but somehow
never quite got cleared up. This clears the last few drivers to set it
(nothing uses it) and gets rid of it entirely.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
8324e860770b1defa73d8f52244211bb9f0ed2f8 14-Dec-2011 Jonathan Cameron <jic23@kernel.org> staging:iio: Make sure all triggers have a trigger_ops for the owner field.

The core needs the owner field to prevent module removal whilst in use and
uses it without confirming that the trigger_ops structure actually exists.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
950935b17c67ddfedfc5cf917de3da7294307874 05-Dec-2011 Jonathan Cameron <jic23@kernel.org> staging:iio:adc:ad7993 stop reading from buffer for sysfs raw read.

No known usecase and makes in kernel interface work more complex.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
550268ca1111a5b4737f15f7bf646cede9d1f0cd 05-Dec-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: scrap scan_count and ensure all drivers use active_scan_mask

Obviously drivers should only use this for pushing to buffers.
They need buffer->scan_mask for pulling from them post demux.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
1612244f8a70dae6a7f266e78c5ba22a3db75780 05-Dec-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:buffer move setup ops from buffer instance to iio_dev

These callbacks should not be buffer instance specific.
Hence move them out of the buffer.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
94386ab0b4c5a4e15afae8542cb01caa2ff37594 05-Dec-2011 Lars-Peter Clausen <lars@metafoo.de> staging:iio: Remove redundant spi driver bus initialization

In ancient times it was necessary to manually initialize the bus field of an
spi_driver to spi_bus_type. These days this is done in spi_register_driver() so
we can drop the manual assignment.

The patch was generated using the following coccinelle semantic patch:
// <smpl>
@@
identifier _driver;
@@
struct spi_driver _driver = {
.driver = {
- .bus = &spi_bus_type,
},
};
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
55e4390cb04e8b0fbae8983c3494c9e24132db1b 16-Nov-2011 Lars-Peter Clausen <lars@metafoo.de> staging:iio: Add missing MODULE_DEVICE_TABLE and MODULE_ALIAS

Quite a few iio drivers provide no MODULE_DEVICE_TABLE or MODULE_ALIAS or only
provide a MODULE_ALIAS while they have support for multiple device ids. This
prevents auto module loading from working correctly.

This patch fixes it by adding the missing MODULE_DEVICE_TABLEs and
MODULE_ALIAS'.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
c8a9f8056f40f6201b84fdddb49a1c62630902c5 26-Oct-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:treewide only use shared to decide on interfaces

Internally the fact that say scale is shared across channels is
actually of remarkably little interest. Hence lets not store it.
Numerous devices have weird combinations of channels sharing
scale anyway so it is not as though this was really telling
us much. Note however that we do still use the shared sysfs
attrs thus massively reducing the number of attrs in complex
drivers.

Side effect is that certain drivers that were abusing this
(mostly my work) needed to do a few more checks on what the
channel they are being queried on actually is.

This is also helpful for in kernel interfaces where we
just want to query the scale and don't care whether it
is shared with other channels or not.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
924f8a21dd13223cc1493a916c6769cf73e0d45e 26-Oct-2011 Lars-Peter Clausen <lars@metafoo.de> staging:iio: Do not use bitmasks for channel info addresses

Currently the iio framework uses bitmasks for the address field of channel info
attributes. This is for historical reasons and no longer required since it will
only ever query a single info attribute at once. This patch changes the code to
use the non-shifted iio_chan_info_enum values for the info attribute address.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
af5046af1c812839f085030f358a01814666fc80 26-Oct-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: header reorganization

Issue brought up by Lars-Peter Clausen. This is a varient of what
he suggested.

io/iio.h for driver stuff (has to include types.h)
Sub files for the bits drivers may or may not use
iio/sysfs.h
iio/buffer.h (contents of current buffer_generic.h)
(obviously anything offering events will need events.h as well)
iio/types.h for the enums that matter to both
iio_chan_type, iio_modifier
iio/events.h for the event code stuff
IIO_EVENT_CODE and friends. + everything in chrdev.h So this
is the stuff that userspace cares about.
Also include iio_event_type, iio_event_direction

Thus iio drivers include iio.h + as required
events.h
sysfs.h
buffer.h

in kernel users (once that interface is merged) will need inkern.h
which will pull in types.h

Userspace will need just events.h (which pulls in types.h) to get
everything they need to know about. Buffer userspace access doesn't
currently need any core defines. All information about the data
format is passed through sysfs.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
ae6ae6fec3f7d6919e0146996df37b665c75f662 16-Nov-2011 Lars-Peter Clausen <lars@metafoo.de> staging:iio: Use module_spi_driver to register SPI driver

Use the newly introduced module_spi_driver macro for registering SPI drivers.
This allows us to remove a few lines of boilerplate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
452962366c11a9126fabac8cb28af49c27464408 30-Aug-2011 Paul Gortmaker <paul.gortmaker@windriver.com> staging: Add module.h to more drivers implicitly using it.

This 2nd batch of implicit module.h users only appeared when we
removed the unnecessary module.h from include/linux/miscdevice.h
[The 1st batch is already present in Greg's staging tree.]

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
/drivers/staging/iio/adc/ad7793.c
d2fffd6c2fd60fe9ab63ef30758d9d43a5057549 14-Oct-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: fix removal path to allow correct freeing.

Fix a dumb lack of consideration of the effect of combining
the iio_device_unregister and iio_free_device calls into
one. There is no valid place to free some of the sysfs
array elements.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
6835cb6b438b77ba82ad5a23944bbfb12128f5db 27-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: unwind the IIO_IN -> IIO_VOLTAGE define

This was originally there to avoid churn during a complex change.
Now everything is stable lets get rid of this as it is missleading
and confusing.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
14555b14455f9acbdf0e500ae96140828a970796 21-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: replacing term ring with buffer in the IIO core.

They aren't always ring buffers, so just use buffer for all naming.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
3811cd6291bb5a11c8d830831149d6369e7d3b68 21-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: rename ring_generic.h -> buffer_generic.h

Nothing in this file is specific to RING buffers so rename it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
ec3afa40c648ed17eb2a83a4b7249deab3631f61 21-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: tree wide IIO_RING_TRIGGERED -> IIO_BUFFER_TRIGGERED

also, IIO_RING_HARDWARE_BUFFER -> IIO_BUFFER_HARDWARE

These aren't always rings so the naming should not imply that.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
3b99fb7656a73d483b00fd4777646c00db16b040 21-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: treewide rename iio_triggered_ring_* to iio_triggered_buffer_*

Not always a ring so naming is missleading.
Also, kfifo_buf is probably first buffer to take out of staging and it
definitely isn't a ring.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
ade7ef7ba3bf888b90269f8ca864841b2cd9803f 02-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: Differential channel handling - use explicit flag rather than types.

Straight forward change in the core, but required some drivers to not use
the IIO_CHAN macro as that doesn't allow setting this bit (and is
going away anyway). Hence the churn.

Tested on max1363 with a couple of supported parts.

V2: differential bit in code got 7 bits and direction 1. Reversed that.
Issue spotted by Michael - thanks!

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>
/drivers/staging/iio/adc/ad7793.c
26d25ae3f0d8ffe350aacc75b71198d6b35bd1f4 02-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: rework of attribute registration.

This set also includes quite a number of bug fixes of particularly
remove functions.

Necessary due to issue pointed out in Bart Van Assche's patch:
docs/driver-model: Document device.groups

V2: Rebase due to patch reordering.
V3: Pull various error fixes and cleanups out into their own patches.

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>
/drivers/staging/iio/adc/ad7793.c
32b5eecab0f2d6f66f2e237e161d58d5916f8b13 02-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: Switch the channel masks to bitmaps so as to allow for more channels.

This is as light as possible on changes to current drivers.
Some drivers make assumptions that their masks fit in a single
long. Given they were previously working this is clearly valid if
not tidy.

The max1363 is an example where there should be no such assumptions.

V2: Add the new ad5933

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>
/drivers/staging/iio/adc/ad7793.c
c009f7e42617bd52b61a35de621cd1deda08042b 30-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:buffering cleanup ring_buffer_register_ex naming.

Now the old method is long gone, lets get rid of the _ex and whilst
here remove the unused id parameter.

Trivial mechanical change, but will break any out of tree drivers
using this.

V2: rebase
V3: rebase

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
1aa042783251c27a93e31929c24647729db326d4 30-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: push the main buffer chrdev down to the top level.

Sorry all, this one is very invasive, though the driver changes are
just trivial interface fixes. Not all done yet.

V2 - bring the sca3000 with us.
V3 - fix ade7758 bugs in conversion.
V4 - add ad5933

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>
/drivers/staging/iio/adc/ad7793.c
3f72395ee595a2a2fe1ed01c006c4f0cce313512 24-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: spit trigger.h into provider and consumer parts.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
f60c4a02aa05817f00408ecefdf221f44781e08a 24-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: prevent removal of module connected to trigger.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
e65bc6ac6fa54959ac0b3712b0f35bbf073c073e 24-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:pollfunc: Make explicit that private data is always pointer to a struct iio_dev.

This is always true, so lets make it explicit.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
cdf387096e34e71eeb6238183dd1856fd94a4e38 12-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adc: unused header removals.

More headers now not needed after iio_chan_spec conversions.
A couple of drivers were using helpers from adc.h.

Given these were trivial, they are pushed down into the drivers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/ad7793.c
88bc30548aae18a39fd5d35cbb160a1ea347b4a7 08-Jun-2011 Michael Hennerich <michael.hennerich@analog.com> 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>
/drivers/staging/iio/adc/ad7793.c