dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

99 Commits

Author SHA1 Message Date
Paul Gortmaker 452962366c 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>
2011-10-31 19:32:10 -04:00
Paul Gortmaker 8e336a722b staging: Add export.h for THIS_MODULE/EXPORT_SYMBOL to drivers/staging users.
Lots of drivers have in the past expected the presence of basic things
like THIS_MODULE and EXPORT_SYMBOL.  With the header cleanup, they wont
have these.  Call out the include explicitly.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:32:08 -04:00
Jonathan Cameron d2fffd6c2f 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>
2011-10-17 15:34:53 -07:00
Jonathan Cameron 3e2c96eab9 staging:iio: gpio build dependency fixing
Numerous drivers either had pointless includes of gpio.h
or should have been dependent on GENERIC_GPIO and were not.
Conversion of ads1210 to use array registration triggered
build failures that highlighted all was not well.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:25:28 -07:00
Jonathan Cameron 41ea040c7b 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>
2011-10-05 13:47:46 -07:00
Jonathan Cameron 6835cb6b43 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>
2011-09-29 17:32:07 -07:00
Jonathan Cameron 14555b1445 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>
2011-09-26 17:31:53 -07:00
Jonathan Cameron 3811cd6291 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>
2011-09-26 17:31:53 -07:00
Jonathan Cameron f2a96245ba staging:iio: tree wide IIO_RING_BUFFER config symbol to IIO_BUFFER
Functionality is generic, so name is missleading.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:53 -07:00
Jonathan Cameron ec3afa40c6 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>
2011-09-26 17:31:52 -07:00
Jonathan Cameron 3b99fb7656 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>
2011-09-26 17:31:52 -07:00
Manuel Stahl 0aeac51d1b staging: iio: Move sensor drivers to sub menus
We have a lot of drivers now, so the iio sub menu becomes quite large.
This patch creates sub menus for the different sensors.

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>
2011-09-26 17:31:50 -07:00
Jonathan Cameron 26d25ae3f0 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>
2011-09-06 16:02:01 -07:00
Jonathan Cameron bd94c6a8a6 staging:iio:various move default scan mask setting after ring register or remove
The scan mask will be dynamically assigned in register, so don't
use it before that.

In adis16260 I've moved it as I know this driver has userspace code.
Same for sca3000 where it is cost free due to hardware buffer.
Can do that for the others, but in theory userspace code should always
have been checking these and setting them appropriately anyway!

V2: Clear default mask out of adis16400 as reported by Michael

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:01:59 -07:00
Jonathan Cameron 3e39440789 staging:iio:fix using iio_priv or iio_dev after iio_unregister_device
This includes calling iio_free_device as that should only be called
before the device has been registered.

Also one case of iio_free_device being called on a registered device.

This has been pulled out of the reworking attributes patch.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:00:29 -07:00
Jonathan Cameron c009f7e426 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>
2011-09-06 16:00:28 -07:00
Jonathan Cameron 1aa0427832 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>
2011-09-06 15:59:10 -07:00
Paul Gortmaker 99c978529a 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>
2011-08-25 17:01:20 -07:00
Jonathan Cameron 3f72395ee5 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>
2011-08-24 14:23:43 -07:00
Jonathan Cameron e65bc6ac6f 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>
2011-08-24 14:23:42 -07:00
Jonathan Cameron 9a0a73f485 staging:iio:gyro: remove gyro.h
Not longer needed now all devices with gyro channels are using
iio_chan_spec registration.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:34:23 -07:00
Jonathan Cameron 4f2ca0809c staging:iio:gyro:adis16060 convert to iio_chan_spec
Still a very odd driver. This patch has the side effect of changing
it's name slightly.

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-08-23 13:32:48 -07:00
Jonathan Cameron ae0b4bddc6 staging:iio:gyro:adis16130 move to iio_chan_spec registration.
Simple conversion now we've dropped the type attributes.

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-08-23 13:32:48 -07:00
Jonathan Cameron 584c81fbee staging:iio:gyro:adis16080 convert to iio_chan_spec.
This is a rare driver that is so simple it actually gets longer
as a result of this conversion.  Oh well, swings and roundabouts.

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-08-23 13:32:47 -07:00
Jonathan Cameron 037bad9a72 staging:iio:gyro:adxrs450 squish some trivial single call point wrappers functions.
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-08-23 13:32:47 -07:00
Jonathan Cameron cb4496876f staging:iio:gyro:adxrs450 make more use of spi_read and spi_write.
This needs confirmation that the devices is happy if another part is
talked to in between the request for a register and the read back.

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-08-23 13:32:47 -07:00
Jonathan Cameron 58ea7784a3 staging:iio:gyro:adxrs450 move to iio_chan_spec registration
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-08-23 13:32:47 -07:00
Jonathan Cameron 17ee97e5f3 staging:iio:gyro and meter: header housecleaning.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:11 -07:00
Jonathan Cameron ce87c128b9 staging:iio:various header includes that should never have been.
I will assume these were cut and pastes messup.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:08 -07:00
Jonathan Cameron a5e7363ca4 staging:iio:gyro:adis16130 drop control of adc resolution.
There is no clear use case for this functionality in a driver
that only supports slow reading via sysfs. The interface
use was non compliant with the abi motiving it being dropped.

It can go back in if anyone ever implements buffered reading
support for this device.  Then it will be controlled as
part of the buffering abi where this should indeed be correctly
supported.

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-08-23 13:31:07 -07:00
Jonathan Cameron bc8ea46b55 staging:iio:gyro:adis16260 remove some unused headers
These should have gone with the iio_chan_spec conversion patch.

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-08-23 13:31:06 -07:00
Jonathan Cameron d29f73db79 staging:iio:triggers introduce iio_trigger_ops to take const bits out of iio_trig_structure.
Right now this results in increased code, but I still think it is worth doing to avoid
replication across instances of drivers etc and move as much stuff as possible to constant.
Ops structure is optional for the occasional driver that uses none of it (currently
only the ad7793).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:06 -07:00
Jonathan Cameron cdf6e81790 staging:iio:gyro:adis16130 fix adis16130_spi_read which was never selecting the channel
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-08-23 13:28:42 -07:00
Dan Carpenter 8f89615528 Staging: iio: add some unlocks to raw_read() functions
This code was cut and pasted in several places.  It's missing some
unlocks on error.

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>
2011-08-02 16:07:51 -07:00
Jonathan Cameron 7bcf302ff1 staging:iio:gyro:adis16260 fix missing num_channels setup.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Cc: stable <stable@kernel.org>  [3.0]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 20:31:35 -07:00
Greg Kroah-Hartman 0c9e98af5e Merge Linux 3.0-rc6 into staging-next
This handles the merge conflicts with the
drivers/staging/brcm80211/Kconfig file due to changes on the two
different branches.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 07:35:09 -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
Randy Dunlap 89089158d1 Staging: fix more iio builds when IIO_RING_BUFFER is not enabled
Fix lots more build errors in staging/iio when CONFIG_IIO_RING_BUFFER
is not enabled by moving enums and defines outside of the
CONFIG_IIO_RING_BUFFER ifdef block.

Examples (one from each driver; there were 116 total errors):

drivers/staging/iio/accel/adis16204_core.c:437: error: 'ADIS16204_SCAN_SUPPLY' undeclared here (not in a function)
drivers/staging/iio/accel/adis16209_core.c:410: error: 'ADIS16209_SCAN_SUPPLY' undeclared here (not in a function)
drivers/staging/iio/gyro/adis16260_core.c:420: error: 'ADIS16260_SCAN_GYRO' undeclared here (not in a function)
drivers/staging/iio/imu/adis16400_core.c:565: error: 'ADIS16400_SCAN_SUPPLY' undeclared here (not in a function)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-27 14:19:20 -07:00
Jonathan Cameron 0ed731d234 staging:iio: use pollfunc allocation helpers in remaining drivers.
Some didn't get converted the first time around.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:15:06 -07:00
Jonathan Cameron 6fe8135fcc 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>
2011-05-19 16:15:05 -07:00
Jonathan Cameron 5565a45024 staging:iio: rationalization of different buffer implementation hooks.
1) move a generic helper function out of ring_sw. It applies to other buffers as well.
2) Get rid of a lot of left over function definitions.
3) Move all the access functions into static structures.
4) Introduce and use a static structure for the setup functions, preenable etc.

Some driver conversions thanks to Michael Hennerich (pulled out of patches
that would otherwise sit after this).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:15:03 -07:00
Jonathan Cameron 59c85e82c2 staging:iio:trigger handle name attr in core, remove old alloc and register any control_attrs via struct device
As the majority of triggers don't actually have any other control_attrs lets use the fact
that struct device has a groups element when we do need to have these attributes registered.
A vargs function is used to cut down on lots of building strings in every single driver
just in order to pass them into the allocate.

Also iio_allocate_trigger_named -> iio_allocate_trigger as there is no
unamed version any more, so that is now just confusing.

Blackfin tested and fixed by Michael Hennerich.

V2: Elements from Michael Hennerich's patches for the ade7758

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:15:02 -07:00
Jonathan Cameron 29b7f43ef4 staging:iio:gyro:adis16260 move to chan_spec based setup.
For clean drivers its easier to convert to chan_spec based
registration than to work around the scan_el attributes
going away.

Some minor cleanups done whilst here.

Untested.
V3: rebase fixup and make attribute_group static.

V2: IIO_CHAN macro updates.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:57 -07:00
Jonathan Cameron 845bd12ac7 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>
2011-05-19 16:14:54 -07:00
Jonathan Cameron 504b4958ff staging:iio:gyro:adis16260 move to irqchip based trigger handling.
Untested.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:53 -07:00
Michael Hennerich 1810b3bb7b IIO: GYRO: ADXRS450: Don't exit probe, in case the power on default is not met.
If the part get's probed twice without hard reset in between, the power on default
register read-back can't be met. This shouldn't cause the second probe to fail.
So warn but don't exit.

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-05-03 11:40:03 -07:00