History log of /drivers/staging/iio/adc/max1363_core.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4abf6f8b29e37f492078173a9d4cb808ce327ec0 01-Mar-2012 Justin P. Mattock <justinmattock@gmail.com> drivers:staging:iio Fix typos and comments in staging iio.

The below patch fixes some comments and some typos that I have found
while reading drivers/staging/iio/*

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/drivers/staging/iio/adc/max1363_core.c
cd4361c7e2e0778016a770157d0ccf126fca7a2a 22-Feb-2012 Michael Hennerich <michael.hennerich@analog.com> iio: core: constitfy available_scan_mask

The core must not modify available_scan_mask, because it causes problems
with drivers where multiple instances of the driver share the same mask set.
So make this explicit by marking available scan masks as const.

The max1363 driver needs some minor adjustment to accommodate this change.
Pull scan mask allocation into a separate function.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/drivers/staging/iio/adc/max1363_core.c
da36716042d90a214dc80ea85c71b80c23889832 13-Feb-2012 Lars-Peter Clausen <lars@metafoo.de> staging:iio: Rename IIO_EVENT_CODE_EXTRACT_NUM to IIO_EVENT_CODE_EXTRACT_CHAN

We name this field "chan" throughout IIO with the exception of this one macro.
Rename it to be more consistent.

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/max1363_core.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).
3ca34cc462aa26c748ea194e6c5047a00c915bc4 05-Dec-2011 Jonathan Cameron <jic23@kernel.org> staging:iio:adc:max1363 stop reading from buffer for sysfs access

No known use case 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/max1363_core.c
bc234e72eb032dcb759df2fdcae23d3932547e43 05-Dec-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adc:max1363 add datasheet_name entries.

Kind of obvious for this device but useful
for testing purposes.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
18cffbedc2c4af8a83816a9ee17a010138abd36b 05-Dec-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adc:max1363 correctly set channels as big endian.

Also, the differential channels should always have been signed.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
c52cfb638d5f10223d60841c3a6dac913701a18d 05-Dec-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adc:max1363 use new demuxing support.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.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/max1363_core.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/max1363_core.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/max1363_core.c
6e5af184f810f6150e07339bd23a09c498739c82 16-Nov-2011 Lars-Peter Clausen <lars@metafoo.de> staging:iio: Use module_i2c_driver to register I2C drivers

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

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
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/max1363_core.c
9c95e01e84e31178b9a83b683a501ed76166c259 14-Oct-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adc:max1363 incorrect allocation of available_scanmasks

Longs are not known for being 8 bits.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.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/max1363_core.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/max1363_core.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/max1363_core.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/max1363_core.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/max1363_core.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/max1363_core.c
330c6c57e6284a755d7e8a031b3c917571ee6dc3 02-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:events - new 64 bit code structure and push out drivers.

This costs us nothing in event storage (as we are carrying a 64 bit
timestamp in the structure) and gives us lots more room to play with.

Also allows for more channels which some parts need.

V2: Cleanup some loose ends (such as the switch with only one option now).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.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/max1363_core.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/max1363_core.c
5aa9618896e0ba49b444731f9fafa7f7c18a13ab 30-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: remove broken support for multiple event interfaces.

We don't have a use case for these. Two drivers appeared to use them
but both report all events on the first.

V2: Remove now irrelevant comment.
V3: Include fixup for adc/ad7280a.c

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/max1363_core.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/max1363_core.c
8e7d967244a8eebcdadb048efc5e66849ec0a6b6 30-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: remove specific chrdev for event reading. Get fd from ioctl on buffer.

Change suggested by Arnd Bergmann.

No real reason to have two chrdevs per device. This step merges them into one.
Currently this means that events will only work on devices with buffers. THat will
be remedied shortly.

V2: set name for event attribute groups. Otherwise they all sorts of fun occurs on
dynamic channel event attribute creation.

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/max1363_core.c
99c978529a40132a6f7a5f136b4362b56fc88d8c 03-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com> staging: Add module.h to drivers/staging users

Lots of people expect module.h to just "be there" without
any #include effort. But we are crushing that. So fix those
files in staging relying on implicit module.h presence.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
c4b14d99bbc93c9fa03b5934a07e95594efe7a93 12-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:events: use IIO_<TYPE> and IIO_MOD_<> instead of IIO_EV_CLASS_<TYPE> etc

The original definitions were duplicated to reduce tree churn during introduction of chan_spec
registration. Now there is no point in maintaining the two sets of definitions.

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/max1363_core.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/max1363_core.c
cd0380190f7c7ad8d5a8f15403a67fedd37fcddb 12-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adc: max1363 fix 2 raw sysfs issues.

indio_dev->channels was accidentally removed thus preventing any sysfs
registrations occuring for direct reading. That hid the other issue.

Unfortunately the incorrect handling leads to misspresentation of data
in sysfs reads.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
f88af7e7d338e067eff0c2b9e317da97488ff74c 08-Jun-2011 Dan Carpenter <error27@gmail.com> Staging: iio: dereferencing uninitialized variable

In the error handling, it dereferences "st" before it has been
initialized. I also just tidied it up a bit to remove some extra
conditions.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
58f0a255454dc2338d24d9827eadbd9db386acc5 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 misc cleanups and use of for_each_bit_set to simplify event code spitting out.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
6fe8135fccd66aedcc55ded70824342587fd2499 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: implement an iio_info structure to take some of the constant 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>
/drivers/staging/iio/adc/max1363_core.c
586d15255dd529be94253b2d4bbb9f40ef680c1a 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 add new 2 channels parts form maxim, 11644-7

V2: IIO_CHAN macro usage update.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
845bd12ac78f92ba8905f45de7e17a4a8b3cef40 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: use the new central name attribute creation code

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
6da288a35b1b90dd1cbe8a682ba1180f672b1c13 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adc:max1363 move to irqchip based threaded irq triggering

V2: Fixed missing free of pollfunc->name as pointed out by
Michael Hennerich.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
aaf370db7dad574e166f64cd9ad4129f12198145 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: Remove legacy event handling.

This requires all drivers using the channel registration code and
events to change in one go.

V3: remove unwanted irq enable from event handler.
V2: rebase related fixes to move to new IIO_CHAN macro. All trivial.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
298cd976e07f1a0ca56adffd80c237117e3e11af 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 - move to channel_spec registration.

V3: move to single chan registration macro. Also introduce some
local macros to greatly reduce code length when setting up the
chan_spec arrays for all the different devices.

V2: update read_raw for two value approach.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
3dba81ba803ca0cd7a1bc0dc6f21536b30ad059f 15-Apr-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 take advantage of new iio_device_allocate private data.

The only fiddly bit in here was ensuring the regulator was available until after
the free had occured.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
b6b7068ca3d2fa52d69870ba37cbb6ebac53eff8 15-Apr-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adc: max1363 dev_info -> indio_dev in naming for consistency

Either name is fine, so went with the most common.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
9cc559891181d354cc5b83d0cfecbe262d690b32 15-Apr-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adc:max1363 fix timestamp handling.

Not only was this not compliant with the abi, it was also missconfiguring
the buffer.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
6f7c8ee585e9db54cb29af1bdb93f29837824933 15-Apr-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: Add ability to allocate private data space to iio_allocate_device

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>
/drivers/staging/iio/adc/max1363_core.c
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
/drivers/staging/iio/adc/max1363_core.c
a7861ff082fe75fd7d7fd22c87c37c8425674ae2 07-Oct-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: max1363 fix bug due to scan_element directory move.

The device found passed to the attr functions is that of the ring
buffer, not the the iio_dev so we need to bounce through one more
hop to get the right address.

Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
77b3d3facfb32913a85f40156e7d4a70b18d0bd6 21-Sep-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: max1363 add _index attribute registration

Also fixes a missing NULL to terminate one of the attribute arrays.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
44f270de711dcaf595786f2318b36f9b4f007338 21-Sep-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: Remove unused bit_count from struct iio_scan_el

The job this was intended to do (never implemented) is now done
by explicit definition of _type attributes in all drivers

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
8d9c636b60434fd5f7453937e7d2139757481574 21-Sep-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: max1363 add _type attributes for all scan elements

As both signed and unsigned in attributes exist, each element must
be fully specified.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
bf32963cbeb5d34fa32a4c1eeed1163ab1b4501c 31-Aug-2010 Manuel Stahl <manuel.stahl@iis.fraunhofer.de> staging: iio move scan_elements into ring buffer

tested with sca3000, adis16400

Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
2662051e0868d1bde0abeea19bd54c3c18941afc 11-Jul-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: Add stubs for iio_ring_buffer_[un]register and equivalent driver stubs

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
440a5200347734032f7ad0dc84ac3e9222dab9bd 26-Jun-2010 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 add theshold event support

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
c40ab87494522201a8478305204c3db8e051af73 26-Jun-2010 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 trivial code and comment cleanups.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
962a4ccb4ab76a297ef63e2c5de78cb56220d0f8 26-Jun-2010 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 use device_id instead of searching on name again

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
c608cb012e150d5c24b400ea89000105134bd564 23-May-2010 Mike Frysinger <vapier@gentoo.org> Staging: iio: kill off spurious semicolons

A bunch of IIO files contain spurious semicolons after function
definitions and case statements and if statements. Guess people
really like this thing, but kill them anyways so they'll stop
spreading via copy & paste with new drivers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
fbae3fb1546e199ab0cd185348f8124411a1ca9d 03-Jun-2010 Wolfram Sang <w.sang@pengutronix.de> i2c: Remove all i2c_set_clientdata(client, NULL) in drivers

I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.

As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/staging/iio/adc/max1363_core.c
c8d1a126924fcbc1d61ceb830226e0c7afdcc841 21-May-2010 Greg Kroah-Hartman <gregkh@suse.de> Merge staging-next tree into Linus's latest version

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>
f03de82b3f10b2e8b7f75f3d4323ec38d131a99c 05-May-2010 Greg Kroah-Hartman <gregkh@suse.de> Staging: iio: max1363_core: fix bug in kzalloc call

The operands were switched around :(

Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
1b183e4b93c4e05160d2c8f08b9546dd4752084b 05-May-2010 Greg Kroah-Hartman <gregkh@suse.de> Staging: iio: adc: max1363_core: fix up some sparse warnings

Also fix a minor coding style issue.

Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
3bf877c1cc0d17ef471f21ae319fcb9c9211df61 04-May-2010 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 add support for 8 bit equivalent devices, max1036-9, max11600-5

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
c3fa0fddd6fed10eda57de8912a634890ee27a31 04-May-2010 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 add support for max11606-max11617

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
82020b0ef15de0cde1082ba0ff427c2f47a9a011 04-May-2010 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:max1363 move to new abi.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
ee58cb2bcda99ae934176ad5ae66f7699d23cd3d 20-Mar-2010 Wolfram Sang <w.sang@pengutronix.de> Staging: iio: adc: fix dangling pointers

Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/iio/adc/max1363_core.c
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

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>
/drivers/staging/iio/adc/max1363_core.c
d1325cf45077bd27db3271dfc320c40bf65a8a07 18-Aug-2009 Jonathan Cameron <jic23@cam.ac.uk> Staging: IIO: max1363 ADC driver

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>
/drivers/staging/iio/adc/max1363_core.c