1
0
Fork 0
Commit Graph

263397 Commits (c39aada6926c915f8f3bdee19fa9b27800b8cb09)

Author SHA1 Message Date
Aaro Koskinen c39aada692 staging: xgifb: eliminate #ifdef XGIFB_PAN
XGIFB_PAN is always defined and checks can be eliminated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:46 -07:00
Aaro Koskinen f3e5260585 staging: xgifb: delete unused structs
Delete unused struct declarations.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:46 -07:00
Aaro Koskinen 3f1095328e staging: xgifb: vb_table: delete unused data
Delete unused data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:46 -07:00
Aaro Koskinen fa4c212f2b staging: xgifb: delete unused definitions
Delete some more unused definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:45 -07:00
Aaro Koskinen 1f8385841b staging: xgifb: delete duplicate #defines
Delete duplicate identical #defines.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:45 -07:00
Aaro Koskinen 5c167b30c1 staging: xgifb: eliminate #ifdef NewScratch
NewScratch is always defined so all checks can be eliminated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:45 -07:00
Ruslan Pisarev 032abf7bf9 Staging: xgifb: Delete define XGIINITSTATIC in XGI_main_26.c and XGI_main.h
This is a patch to the XGI_main.h and XGI_main_26.c file that fixed up a define warrning found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:45 -07:00
Ruslan Pisarev e684f4682d Staging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main_26.c
This is a patch to the XGI_main_26.c file that fixed up a errors "do not initialise statics to 0 or NULL" found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:44 -07:00
Ruslan Pisarev 44c4ec78c9 Staging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main.h
This is a patch to the XGI_main.h file that fixed up a errors "do not initialise statics to 0 or NULL" found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:44 -07:00
Michael Hennerich 7a27b042f9 IIO: ADC: New driver for AD7190/AD7192/AD7195 4 Channel SPI ADC
New driver for AD7190/AD7192/AD7195 4.8 kHz, Ultralow Noise, 24-Bit
Sigma-Delta ADC with PGA

These devices features a dual use data out ready DOUT/RDY output.
In order to avoid contentions on the SPI bus, it's necessary to use
spi bus locking. The DOUT/RDY output must also be wired to an
interrupt capable GPIO.

In INDIO_RING_TRIGGERED mode, this driver may block its SPI bus segment
for an extended period of time.

Changes since V1:

Add missing documentation.
Remove obsoleted include files.
Fix typos and style issues.
Fix buffer size.
Split ad7192_show() into two functions.
Avoid race condition add mutex.
Abandon IIO_CHAN macro.
Reorder elements in ad7192_platform_data.
Remove driver bus type.

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-08-23 13:40:46 -07:00
Jonathan Cameron 88b42f3a75 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>
2011-08-23 13:40:15 -07:00
Grant Grundler 176f9f29ce STAGING:iio:light: fix ISL29018 init to handle brownout
After a voltage brownout, sensor will now operate correctly.

Page 10 of ISL29018 data sheet and the Intersil Application Note 1534
describe the required initialization sequence:
1. Write 0x00 to register 0x08 (TEST)
2. Write 0x00 to register 0x00 (CMD1)
3. msleep(1)
4. program remaining registers as before

Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:39:48 -07:00
Michael Hennerich f94aa354d6 iio: impedance-analyzer: New driver for AD5933/4 Impedance Converter, Network Analyzer
The AD5933 is a high precision impedance converter system solution
that combines an on-board frequency generator with a 12-bit, 1 MSPS,
analog-to-digital converter (ADC). The frequency generator allows an
external complex impedance to be excited with a known frequency.

The response signal from the impedance is sampled by the on-board ADC
and a discrete Fourier transform (DFT) is processed by an on-chip DSP engine.
The DFT algorithm returns a real (R) and imaginary (I) data-word at each
output frequency.

Changes since V1:

Apply list review feedback:
Consistently use poll_time_jiffies.
Use be|le cpu endian helpers where applicable.
Add various comments.

Changes since V2:

Fix KernelVersion tag in Documentation.
Declare ad5933_default_pdata static.
Fix typos.

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-08-23 13:37:02 -07:00
Michael Hennerich 2051f25d2a iio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System
The AD7280A monitoring system contains all the functions required for
general purpose monitoring and maintenance of stacked
lithium ion batteries as used in hybrid electric vehicles,
battery backup applications, etc.

Changes since V1:

Make cell channels all type IIO_IN_DIFF, update documentation accordingly.
Remove unused and redundant defines.
Use SI units where applicable.
Remove unnecessary wrapper function.
Remove redundant initialization.
Add comments where requested.
Revise event handler.
Use const where applicable.

Changes since V2:

Remove redundant adc.h include file, scheduled for removal.

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-08-23 13:35:49 -07:00
Michael Hennerich 1c5e6a3f76 iio: core: deconstify members of struct iio_chan_spec
Allow dynamic allocation and population of channel spec.

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-08-23 13:35:49 -07:00
Jonathan Cameron 4bfd542103 staging:iio: remove unneeded include
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:34:24 -07:00
Jonathan Cameron c4b14d99bb 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>
2011-08-23 13:34:24 -07:00
Jonathan Cameron df9c1c42c2 staging:iio: Introduce iio_core.h and move all core only stuff out of iio.h.
Also get rid of a few function defs where they are only now in one core file
anyway.
Whilst here add mask = 0 to get rid of warning.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:34:24 -07:00
Jonathan Cameron 657b90473b staging:iio:adc remove unused adc.h.
Another header unused after chan_spec conversions.

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 bbb658a99b staging:iio:accel remove unused accel.h header.
The chan spec conversions and a small amount of pushdown of defines
mean this header is no longer used.

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 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 765f88f2ea staging:iio:magnetometer: remove unused header magnet.h
Now all magnetomers are using iio_chan_spec there is no need for
the macros in magnet.h

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 694e1b5f95 staging:iio:magnetometer:ak8975 convert to iio_chan_spec + cleanups.
iio_chan_spec conversion is straight forward.

Other changes:
* use i2c_smbus_write_byte_data in write_data
* c99 isms to setup various structures.
* move the comment about the scale factor and kill off trivial access func.
* make mode setting code use a bool rather than a ulong.

Ultimately I'd like to get rid of that mode bit entirely and handle it through
core pm routines, but have left it for now.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:32:49 -07:00
Jonathan Cameron 7991029a55 staging:iio:accel:adis16220 iio_chan_spec conversion.
I still have numerous issues with this driver and it
needs a substantial rewrite.

Whilst doing this patch at least one bug has been fixed (temp
reading didn't have an address) and a number of missing channel
info elements added.

Untested!

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 c9b9e49e13 staging:iio:accel:adis16204: use peak_raw info_mask element + push some defs down from header.
Currently this is the only driver using some of the defines in accel.h.
If these become common we'll just add them to the channel_spec options,
for now push down into this 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-08-23 13:32:48 -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 494c6b150a staging:iio:magnetometer:hmc5843 iio_chan_spec conversion.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
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 7d43817803 staging:iio: add quadrature correction to chan info types.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:32:46 -07:00
Jonathan Cameron d34dbee8ac staging:iio:accel:kxsd9 cleanup and conversion to iio_chan_spec.
Lots of minor bits and pieces.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:32:46 -07:00
Jonathan Cameron 4024bc73b1 staging:iio: Remove deprecated dev_data from iio_dev.
The equivalent should always be done using iio_alllocate_device
with to create a private area for the driver and then iio_priv
to access it.  There may be other uses for a private data pointer
but right now it just leads driver writers astray.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:12 -07:00
Jonathan Cameron e05e5f2336 staging:iio:light:tsl2583 allocate chip state with iio_dev
There are some unusual corners in the probe function of this
driver, so may need another look.

V2: Now with the check for allocation success not inverted.
V3: Now with the i2c devdata calls actually being correctly cast.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Jon Brenner <jbrenner@TAOSinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:12 -07:00
Jonathan Cameron 355e25c1de staging:iio:sysfs cleanout header for unused definitions.
Also push one down into the only driver that actually uses it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:12 -07:00
Jonathan Cameron 9aa1a167f0 staging:iio:core squash trivial wrappers and use ida allocation func.
Reorder to remove need for definitions currently in header.
Remove ida related utility function defs from header.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:12 -07:00
Jonathan Cameron 232b9cba13 staging:iio:core flatten convenience function that only has one user.
Fix trivial wrong index (no effect on any current drivers).

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 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 779921683e staging:iio:accel header housekeeping - remove unecessary includes.
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 6dd7bcaae2 staging:iio:adc: header cleanup - remove unused.
Clear out all the excessive includes in the *_ring.c files.
Mixture of cut and paste bloat and things needed for code that
has gone away.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:10 -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 e18ef34419 staging:iio:inclinometer.h remove as now unused.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:07 -07:00
Jonathan Cameron cdf387096e 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>
2011-08-23 13:31:07 -07:00
Jonathan Cameron 5b847ccbf5 staging:iio:accel: usused header removals.
Missing from the iio_chan_spec conversion patches.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 13:31:07 -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 b066b4f89b 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>
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