History log of /drivers/staging/iio/imu/adis16400_core.c
Revision Date Author Comments
98c9373d31b63ac7c8c180a2cb5a3b2476e4074e 27-Nov-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16400 add control of data filtering.

Bartlett filter used. Values read of figures on datasheet
so far from precise.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
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>
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>
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>
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>
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>
41ea040c7b6daf05d4884097b0168e7b74c6c0d0 05-Oct-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: rename gyro channels to anglvel

Ensure naming reflects what is measured, not how it is done.
Resolvers can measure the same thing for starters.
IIO_GYRO->IIO_ANGL_VEL to ensure consistent naming.

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>
85da50596db89356524974d78bec0e32952521a8 30-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16400 rename adis16344 -> adis16334.

Part never existed under that name. Ooops

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
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>
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>
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>
69d80bae9b2009ba36c4bb7032354c27a97b198a 02-Sep-2011 Michael Hennerich <michael.hennerich@analog.com> staging:iio:imu: adis16400: Avoid using printk facility

use dev_info() instead.

Signed-off-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>
521de51871fdb89b8530ddd694401d689e1f94ad 02-Sep-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16400 cleanups

a) remove irq is gpio requirement - No reason this needs to be true.
b) use actual part name in info message rather than adis16400 in all cases.
c) scrap use of IIO_CHAN to simplify move out of staging.

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>
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>
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>
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>
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>
88b42f3a75ee53a4943069d4f8206f3c8d56bd58 12-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16344 support

Simple device. Note the sparse scan mask used.

Done from datasheet as very similar to existing parts.

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>
b066b4f89bebb13febdbe179f9000d68a02f0996 12-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16400 remove unused headers.

These should have gone with the iio_chan_spec conversion.

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>
7a6ff010e5f423822145e728a57744e5d0f18e2f 12-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16400: use strtobool for reset sysfs and don't assign unused tx members.

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>
91ab3fc907ab938b99683dbd8146008d10d09dd8 13-Jul-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu fix missing register table index for some channels

A number of these register indexes were not set or actually wrong.
This only effects sysfs reads.

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>
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>
38d15f06f942306050a063abd111467d39c5cc37 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16400 avoid allocating rx, tx, and state separately from iio_dev.

Uses the iio_allocate_device parameter to set aside space for adis16400_state and
____cacheline_aligned buffers for tx and rx to avoid separatel allocating them.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
8e886e651fded8e96d222fe47741dbb3bc06557e 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16400 add support for adis16300

Next patch will remove original driver.
Note this leaves holes in the scan indexing.

Untested - except via adis16350...

V3: rebase fixup.
V2: move to single IIO_CHAN macro.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2a29a90b581067cd32dbb65512ec379c9891a500 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16350 etc support into adis16400 driver.

Next patch will remove the current adis16350 driver.
These should have been merged a long time ago, but there we are.

V3: rebase fixup + add missing extend_name for supply on adis16350

V2: Move to single IIO_CHAN macro + use the new extend_name
to make the naming of the temperature sensors contain x, y, z
rather than messing with modifiers. This a very weird case
and I don't want temperature to use axial modifiers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
e78548455d05a8b315f2a98712cf64f07d88ef9c 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:imu:adis16400 move to irq based triggers and channel spec channel registration.

V2: rebase fixup.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
b333a24057e9443ec2db52afe78b4a60dfb79097 18-Apr-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:adis16400 replace unnecessary event line registration.

Whilst the adis16400 does indeed support events, currently the driver
does not. The trigger code should never use that infrastructure.

Tested indirectly via the IMU driver merge to follow.

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>
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>
6a6ec6233403ecdad0c042276e4479ca23716b1c 21-Mar-2011 Michael Hennerich <michael.hennerich@analog.com> staging: IIO: IMU: ADIS16400: Avoid using printk facility directly

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>
4d1ea4a67ef4d8ba9462c1c8df84ab7c9176006b 21-Mar-2011 Michael Hennerich <michael.hennerich@analog.com> staging: IIO: IMU: ADIS16400: Fix product ID check, skip embedded revision number

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>
b181119723d62b19904e1f12e467e996631c5a29 21-Mar-2011 Michael Hennerich <michael.hennerich@analog.com> staging: IIO: IMU: ADIS16400: Fix addresses of GYRO and ACCEL calibration offset

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
c59c95ce6ace6d256401fc3a3648a95375ef4e63 21-Mar-2011 Michael Hennerich <michael.hennerich@analog.com> staging: IIO: IMU: ADIS16400: Add delay after self test

Add delay after self test to satisfy timing requirements.
Increase start-up delay.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fc5b85b0ad1f9da948e4d683710081a9bda357cb 21-Mar-2011 Michael Hennerich <michael.hennerich@analog.com> staging: IIO: IMU: ADIS16400: Fix up SPI messages cs_change behavior

cs_change must not be set in the last transfer of a spi message

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1755b0ae17b95a851f0a8940900ac1e7d5fa8edb 08-Oct-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: adc add numbers to naming of all adc channels as needed to associate events with them.

Given event codes are associated by number not name, all adc channels
including those with names need to have numbers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
4f64b80144f548bb0ffbef6bdc4624d922739a66 31-Aug-2010 Manuel Stahl <manuel.stahl@iis.fraunhofer.de> staging: iio sync scale units

g -> ms/s^2
deg -> rad
deg/s -> rad/s
some temperatures still broken

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>
51a0a5b02132f880ff2d2bd7dbbe73b2dfd708a4 31-Aug-2010 Manuel Stahl <manuel.stahl@iis.fraunhofer.de> staging: iio sync drivers with current ABI

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>
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>
1980e4ac3a62e42a3db56185f9bd01a0e40dfe55 26-Jun-2010 Jonathan Cameron <jic23@cam.ac.uk> staging:iio: Remove used iio_work_cont definition and all references

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3fd66da1d529c65488a84f54d8da7bed972fd14f 04-Jun-2010 Barry Song <21cnbao@gmail.com> Staging: iio: adis16400: fix some minor issues and clean-up

1. move adis16400_spi_read_burst() to adis16400_ring.c since it is only
called there
2. add the lost calling to adis16400_self_test()
3. codes cleanup

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1cb6c1f59431f16e46f0d07398cc789ee0a26731 23-May-2010 Mike Frysinger <vapier@gentoo.org> Staging: iio: pull in slab.h for kmalloc funcs

These drivers use kzalloc() but don't include slab.h. They currently
build though because the spi.h header will pull in slab.h for us. But
rather than rely on that behavior forever, include slab.h explicitly.

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>
b155498b1842090f2cf5164908deaa0762a9a8b1 07-May-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: adis16400 clean out some unused code

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
a1169c5a0bfec75730a080a5f5d668e65144d1d1 07-May-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: Break up gyro.h and move to new abi

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
a9d26f00b8b1b2a79e42cfa4ca20ec9a1c11c1d2 04-May-2010 Barry Song <Barry.Song@analog.com> staging:iio:imu ADIS16400 and ADIS16405 driver

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>