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

494 Commits

Author SHA1 Message Date
Jonathan Cameron eb7fea53e5 staging:iio: Add chan info support for 'peak_raw' attributes.
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 1e8fa5b863 staging:iio:accel: lis3l02dq add writing for calibscale and calibbias.
This was missed out in original chan_spec conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:56 -07:00
Michael Hennerich 01a99e1823 staging:iio:adc:ad7298: Convert to new channel registration method
Convert to new channel registration method Update
Add missing call to iio_trigger_notify_done()

Backported to a point that will allow the driver to build all the
way through the series.

V2: IIO_CHAN macro usage updated.

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>
2011-05-19 16:14:56 -07:00
Jonathan Cameron 6684e5b47d staging:iio:adc:ad799x removed unused headers.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:56 -07:00
Michael Hennerich 1bf7ac76cc staging:iio:adc:ad799x: Use private data space from iio_allocate_device
Use private data space from iio_allocate_device

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-19 16:14:56 -07:00
Michael Hennerich d22fd9c553 staging:iio:adc:ad799x: Convert to new channel registration method.
Convert to new channel registration method
Update copyright header
Add missing call to iio_trigger_notify_done()

V2: IIO_CHAN macro updates

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-19 16:14:56 -07:00
Michael Hennerich f39e086adc staging:iio:adc:ad7887: Use private data space from iio_allocate_device
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-19 16:14:55 -07:00
Michael Hennerich 596d06097f staging:iio:adc:ad7887: Convert to new channel registration method.
Convert to new channel registration method
Update / change license copyright header
Add missing call to iio_trigger_notify_done()

V2: use IIO_CHAN macro.

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-19 16:14:55 -07:00
Jonathan Cameron a34c26dcd4 staging:iio:accel:adis16209 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.

V2: IIO_CHAN macro used.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:55 -07:00
Jonathan Cameron ad3eb9ab12 staging:iio:accel:adis16204 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.

V2: used IIO_CHAN macro

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:55 -07:00
Jonathan Cameron d37b24b3c0 staging:iio:accel:adis16203 move to chan_spec based setup.
Mainly motivated by wish to remove the remaing users of the
scan helpers.

Some minor cleanups done whilst here.

Untested.

V2: Use IIO_CHAN macro
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 cf96ffd8c2 staging:iio:accel:adis16201 move to chan_spec based setup.
Mainly motivated by wish to remove the remaing users of the
scan helpers.

Some minor cleanups done whilst here.

Untested.

V2: IIO_CHAN macro used.

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 cbcdf4dd4f staging:iio:light:tsl2563: chan_spec based channel setup.
Makes a small interface change by splitting event _en attr
in two.

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 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 1b732888d8 staging:iio: Add core attribute handling for name of device.
Saves on a fair bit of code replication.

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 51c060a069 staging:iio:trigger remove legacy pollfunc elements.
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
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
Jonathan Cameron 36177c0318 staging:iio:adc:ad799x move to irqchip based trigger handling.
Untested. Also cleared out last_timestamp as it isn't used anywhere.

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
Jonathan Cameron e362dfbb69 staging:iio:adc:ad7887 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
Jonathan Cameron 13cfac2038 staging:iio:adc:ad7606 conversion to irq_chip based polling.
I'm far from sure what the best way to handle this particular
part is, so have (I think) done the absolute minimum to change
it to the new interface.

V2: Trivial constification of device name.

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-05-19 16:14:52 -07:00
Jonathan Cameron 70d4fd3fcd staging:iio:adc:ad7298 move to irqchip based trigger handling.
Untested. This one is of a different form, so worth a closer look than
the previous incredibly similar patches (which were based on the
adis16400 that I have tested).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:52 -07:00
Jonathan Cameron d6d30d2685 staging:iio:accel:adis16240 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:52 -07:00
Jonathan Cameron d7e044f146 staging:iio:accel:adis16209 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:52 -07:00
Jonathan Cameron 80142f0de6 staging:iio:accel:adis16204 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:52 -07:00
Jonathan Cameron f3dadc1dd2 staging:iio:accel:adis16203 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:51 -07:00
Jonathan Cameron 05c2858d2f staging:iio:accel:adis16201 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:51 -07:00
Jonathan Cameron 20e79c515f staging:iio:imu remove adis16300 driver.
Support is now provided by the unified adis16400 driver.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:51 -07:00
Jonathan Cameron 8e886e651f 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>
2011-05-19 16:14:51 -07:00
Jonathan Cameron 70987b81ec staging:iio:imu remove old adis16350. Support now in adis16400 driver.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:51 -07:00
Jonathan Cameron 2a29a90b58 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>
2011-05-19 16:14:50 -07:00
Jonathan Cameron e78548455d 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>
2011-05-19 16:14:50 -07:00
Jonathan Cameron 3f00ca47fc staging:iio:meter:ade7758 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:50 -07:00
Jonathan Cameron f20546e004 staging:iio:adc:ad7476 move to irqchip based triggering
Untested

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

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:50 -07:00
Jonathan Cameron c5e0819e2d staging:iio:adc:ad7476 use channel_spec
V3: Trivial rebase fixup.
V2: Move to new single IIO_CHAN macro.

Done without hardware.

Fix from Michael Hennerich incorporated to use
iio_ring_buffer_register_ex instead of
iio_ring_buffer_register and thus actually make it work.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:49 -07:00
Jonathan Cameron 6da288a35b 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>
2011-05-19 16:14:49 -07:00
Jonathan Cameron d1dbf01128 staging:iio:accel:lis3l02dq move to threaded trigger handling.
V2: Cleaned up handling of name string.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:49 -07:00
Jonathan Cameron 8384d9573e staging:iio: add generic data ready poll function.
This case is extremely common, so let us only have the one
copy.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:49 -07:00
Jonathan Cameron e058003265 staging:iio:ring_sw add function needed for threaded irq.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:49 -07:00
Jonathan Cameron 52615d4783 staging:iio:Documentation generic_buffer.c update to new abi for buffers + misc fixes
Trivial space before newline fix incorporated.

Additional fixes related to handling of sign extension and shifted
data.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>

squash into buffer handling update.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:48 -07:00
Jonathan Cameron d96d1337e3 staging:iio: Add infrastructure for irq_chip based triggers
V3: Get rid of separate interrupt pool. This is well handled
    by irq_get_descs and irq_free_descs.  Two functions I simply
    wasn't aware of previously.  Thus the allocation for a given
    trigger is now handled by core code rather than us reinventing
    the wheel.

V2: Stop silly name duplication.
    Move pool handling to industrialio-trigger as that is the only user.
    Changed over to using irq_modify_status rather than the arm
    specific set_irq_flags as per Thomas Gleixner's suggestion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:48 -07:00
Jonathan Cameron 461be80674 staging:iio:accel:lis3l02dq make threshold interrupt threaded.
We have moved the timestamp acquisition into the bottom half. It may
technically be less accurate but for this device I very much doubt
anyone cares!

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:13:06 -07:00
Jonathan Cameron aaf370db7d 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>
2011-05-19 16:13:05 -07:00
Jonathan Cameron 72148f6ec7 staging:iio:adc:ad799x move to new event handling
Untested.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:15 -07:00
Jonathan Cameron 6f3ca9e3d6 staging:iio:adc:ad7314 remove unmatched unregister of event line.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:15 -07:00
Jonathan Cameron cda0b2af52 staging:iio:adt7310 move to current event handling
Another driver that has two event lines, but pushes all events out
the same chrdev. Probably needs a rethink.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:15 -07:00
Jonathan Cameron 9c6b6ba819 staging:iio:adc:adt7410 move to current event handling
This device actually has a pair of interrupts. The code basically ignores
that and feeds them both to the same handlers.  I'm not sure if that is
the right thing to do, but the updated code should do exactly the same.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:14 -07:00
Jonathan Cameron 58c0323c94 staging:iio:ad7291 move from old event system to current.
This driver needed some tender loving care. It still does.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:14 -07:00
Jonathan Cameron 1142f709e6 staging:iio:adc:adt75 old to new event handling conversion
Another one where the events are 'unusual'.  Still left sorting
that out for another day.

Untested changes

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:14 -07:00
Jonathan Cameron 4f2c1b02b9 staging:iio:adc:ad7152 remove unregister of interrupt line.
a) This interface is going away
b) There is no matching register call so looks like a cut and paste
error

Trivial sparse warning fix.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:14 -07:00
Jonathan Cameron 9b5d9b06a4 staging:iio:adc:ad7150 move from deprecated event handling plus remove irq as gpio requirement.
Another driver with some very 'non standard' magic event codes.
Again I've left it be for now and merely moved it to the new
api.

There is no reason why the irq in this driver ever had to be a gpio.
Scrap that test and clean out unecessary headers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:14 -07:00
Jonathan Cameron db9afe2fc0 staging:iio:adc:ad7816 move from old to current event handling.
I'm not sure what the event is and am very much against the dodgy
hack to give it a code. However for now, lets just stop it using
the deprecated core handling so we can move on.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:14 -07:00
Jonathan Cameron 724cf92ddc staging:iio:adc:ad7745 move from old to current event handling.
Nice simple one.  Not sure we actually want devices outputting
datardy signals like that, but I'll leave it for now.
Cleaned up some unneeded functions whilst here.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:14 -07:00
Jonathan Cameron 90f79e7687 staging:iio:adt7316 get rid of legacy event handling code.
Note this driver is still a long way from being abi compliant.
What I have done here cleans up a few corners, but primarily gets
it away from using the infrastructure that is going away.

Untested

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:13 -07:00
Jonathan Cameron ce298d4031 staging:iio:dac:ad5504 move from old to new event handling.
Untested, but fairly trivial change here.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:13 -07:00
Jonathan Cameron bdab100173 staging:iio:light:tsl2563 remove old style event registration.
Untested.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:13 -07:00
Jonathan Cameron b26a2188e0 staging:iio:buffering remove unused parameter dead_offset from read_last_n in all buffer implementations.
This element has been usused by the core for quite some time.  sca3000 set it none the less
until the rewrite in the previous patch (and hence didn't work).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:13 -07:00
Jonathan Cameron 25888dc511 staging:iio:sca3000 extract old event handling and move to poll for events from buffer
Fairly substantial rewrite as the code had bitrotted.
A rethink is needed for how to handle variable types in the new chan_spec world.

This patch restores sca3000 buffer usage to a working state.
V3: Rebase fixups.
V2: Move to new version of IIO_CHAN macro

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:13 -07:00
Jonathan Cameron 1e3345bc2c staging:iio: lis3l02dq - separate entirely interrupt handling for thesholds from that for the datardy signal.
This removes the one and only real user of the rather complex event list management.
V3: More trivial rebase fixups.
V2: Trivial rebase fixup.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:12 -07:00
Jonathan Cameron 72b38e3de1 staging:iio: Push interrupt setup down into the drivers for event lines.
It is much easier to do in driver, and the core does not add much.
Note all drivers will have to be updated with this patch.
None currently are.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:12 -07:00
Jonathan Cameron 1b076b5210 staging:iio:lis3l02dq: General cleanup
As Arnd observed, things are clearner if we pass iio_dev into read and write fucntions.

Now uses st for lis3l02dq_state everywhere.

Other bits of trivial tidying.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:12 -07:00
Jonathan Cameron 3feb07979c staging:iio: Buffer device flattening.
Given we now only have one device we don't need the extra layer any more.
Hence this patch removes it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:12 -07:00
Jonathan Cameron b9d40a9d55 staging:iio: remove legacy event chrdev for the buffers
part of sca3000 driver temporarily disabled (buffer won't run
anyway).  This section is replaced later in this patch set.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:12 -07:00
Jonathan Cameron a7348347ba staging:iio: Add polling of events on the ring access chrdev.
Staging one of combining the ring chrdevs.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:12 -07:00
Jonathan Cameron 939606d5cc staging:iio: remove ability to escalate events.
Whilst it is possible to output events to say buffers have passed
a particular level there are no obvious reasons to actually do so.

The upshot of this patch is that buffers will only ever have
one threshold turned on at a time.

For now sca3000 has it's ring buffer effectively disabled.
Fixed later in series.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:11 -07:00
Jonathan Cameron 298cd976e0 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>
2011-05-19 16:06:11 -07:00
Jonathan Cameron f3736416e8 staging:iio:lis3l02dq - move to new channel_spec approach.
V3: Move to single IIO_CHAN macro.
V2: Update to two part read_raw value.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:11 -07:00
Jonathan Cameron 1d892719e7 staging:iio: allow channels to be set up using a table of iio_channel_spec structures.
V8: Add missing address in IIO_CHAN macro. Spotted by Michael Hennerich.
V7: Document additions to iio_dev structure.
V6: Fixup the docs for iio_chan_spec structure.
V5: Actually have the macro handle the _input type channels (oops)
V4: Add ability to do, _input and modified channel naming in a coherent fashion.
    Scrap all the messy IIO_CHAN_* macros and move to only one.

V3: Added more types - intensity and light.

V2: Various fixes - some thanks to Arnd.
    Bug fix for unregistering of event attr group
    Changed iio_read_channel_info to have two part value - use for
    raw value read as well.
    constify the channelspec structures
    raw write support for calibbias and similar
    Additional strings for buidling attribute names.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:06:11 -07:00
Michael Hennerich 64a47c5072 iio: adc: ad7780: Add missing GPIOLIB dependency
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Reported-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-05-12 09:26:57 -07:00
Michael Hennerich c5ad56530a iio: trigger: iio-trig-bfin-timer: select missing dependency
This driver requires CONFIG_BFIN_GPTIMERS.

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-12 09:26:57 -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
Michael Hennerich 7dd04eb04e IIO: GYRO: ADXRS450: Fix sign issues, properly shift results and limit values
RATE and QUADRATURE_CORRECTION data is formatted as a twos complement number,
and therefore must be handled as type signed short.

TEMP result should be properly shifted.

Dynamic Null Correction is a 10-bit signed 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>
2011-05-03 11:40:02 -07:00
Michael Hennerich 8ffc4e7213 IIO: GYRO: ADXRS450: enforce sequential transfer delay of at least 0.1ms
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:02 -07:00
Michael Hennerich 232b1648e5 IIO: GYRO: ADXRS450: Add missing parity bit generation
Add missing parity bit generation. Failure to add the parity bit
caused half of the register accesses to fail.

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:02 -07:00
Michael Hennerich caca8c89c2 IIO: GYRO: ADXRS450: Cleanup result extraction and update license notice
Cleanup result extraction and update license notice, no functional changes.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 11:40:01 -07:00
Michael Hennerich 31f6a29a58 IIO: GYRO: ADXRS450: Don't issue two messages, use two transfers
Don't issue the same message twice, use two transfers and group them together

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:01 -07:00
Michael Hennerich bd5a793fec IIO: DDS: AD9834: Add support for AD9837 and AD9838 DDS devices
Add support for AD9837 and AD9838 DDS devices
Update copyright and license notice
Fix typo

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:01 -07:00
Michael Hennerich ba1c2bb2cc IIO: DAC: AD5791: Add support for the AD5760/AD5780 High Resolution DACs
Add support for the AD5760/AD5780 High Resolution Voltage Output DACs

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:01 -07:00
Jonathan Cameron 4be6f5dab7 staging:iio:ade7758 replace unnecessary event line registration.
This was only used for triggering and hence should never have been
done this way in the first place.  Needs to go prior to cleaning
out some of the registration functions.

Untested but identical in form to those that have been.

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-04-25 17:24:35 -07:00
Jonathan Cameron 48f27194a3 staging:iio:adis16209 replace unnecessary event line registration.
Untested but identical in form to those that have been.

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-04-25 17:24:34 -07:00
Jonathan Cameron bdd560c52b staging:iio:adis16240 replace unnecessary event line registration.
Untested but identical in form to those that have been.

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-04-25 17:24:34 -07:00
Jonathan Cameron 80782446bc staging:iio:adis16201 replace unnecessary event line registration.
Untested but identical in form to those that have been.

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-04-25 17:24:33 -07:00
Jonathan Cameron 37f9d2714a staging:iio:adis16204 replace unnecessary event line registration.
Whilst the adis16204 does indeed support events, currently the driver
does not.  The trigger code should never use that infrastructure.

Untested but identical in form to those that have been.

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-04-25 17:24:33 -07:00
Jonathan Cameron 9e558ff544 staging:iio:adis16203 replace unnecessary event line registration.
Whilst the adis16203 does indeed support events, currently the driver
does not.  The trigger code should never use that infrastructure.

Untested, but identical in form to those that have been so should be fine.

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-04-25 17:24:33 -07:00
Jonathan Cameron ab8d48d453 staging:iio:adis16260 replace unnecessary event line registration.
Whilst the adis16260 does indeed support events, currently the driver
does not.  The trigger code should never use that infrastructure.

Untested - but identical in form to those that have been.

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-04-25 17:24:33 -07:00
Jonathan Cameron b333a24057 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>
2011-04-25 17:24:32 -07:00
Jonathan Cameron 9f201bbeb5 staging:iio:adis16350 replace unnecessary event line registration.
Whilst the adis163500 does indeed support events, currently the driver
does not.  The trigger code should never use that infrastructure.

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-04-25 17:24:31 -07:00
Jonathan Cameron 0955c1e387 staging:iio:adis16300 replace unnecessary event line registration.
Whilst the adis16300 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>
2011-04-25 17:24:31 -07:00
Jonathan Cameron 1ff7e1d84d staging:iio:light:tsl2563 constify gain level table.
Trivial cleanup.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:24:30 -07:00
Jonathan Cameron 33789dce54 staging:iio:tsl2563 take advantage of new iio_device_allocate private data.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:24:30 -07:00
Jonathan Cameron c77b38108d staging:iio:documentation make read_size signed to allow for errors.
Without this all hell breaks loose if you have no data.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:23:11 -07:00
Jonathan Cameron 3dba81ba80 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>
2011-04-25 17:23:11 -07:00
Jonathan Cameron b6b7068ca3 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>
2011-04-25 17:23:10 -07:00
Jonathan Cameron 9cc5598911 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>
2011-04-25 17:23:10 -07:00
Jonathan Cameron 6f7c8ee585 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>
2011-04-25 17:23:09 -07:00
Jonathan Cameron b428173316 staging:iio: replace rip_lots naming with read_first_n
Change suggested by Arnd Bergmann, Related patch to remove
pointless (now) dead_offset parameter will have await
proper fix for the sca3000 driver.  That depends on
some intermediate patches so may be a little while.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:23:09 -07:00
Jonathan Cameron 582e548908 staging:iio: iio_trigger_unregister - remove rather strange search for what we already have.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:23:08 -07:00
Jonathan Cameron f6517f22d4 staging:iio:trigger remove export of iio_trigger_find_by_name, use sysfs_streq for matching
Trivial reorganization.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:23:08 -07:00
Michael Hennerich 67d1c1f4e0 staging: IIO: DAC: AD5446 add support for AD5541A devices
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-04-25 17:22:07 -07:00
Jon Brenner ac4f6eee8f staging: iio: TAOS tsl258x: Device driver
Added suspend/resume functions.
Changed attribute names to match existing where applicable and updated
or documented new ABI as discussed.
Changed integration time ABI from using index (0 to 3) to use actual
gain values (1x,8x, etc.).
Removed various unused variables, declarations, and functions.
Revised code to accommodate different endianess (le16_to_cpu).
Updated error return codes in various functions.
Changed from mdelay to msleep after determining that longer wait would
be acceptable.

V5: Makefile and Kconfig cleanups by Jonathan Cameron.

Signed-off-by: Jon August Brenner <jbrenner@taosinc.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:22:07 -07:00
Michael Hennerich 69d900a695 staging: IIO: DAC: New driver for AD5791/AD5781 High Resolution Voltage Output DACs
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-04-25 17:20:44 -07:00