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

494 Commits

Author SHA1 Message Date
Joe Perches 95cd17c9f3 staging: Remove unnecessary semicolons when switch (foo) {...};
Done via perl script:

$ cat remove_semi_switch.pl
my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
my $match_balanced_braces      = qr/(\{(?:[^\{\}]++|(?-1))*\})/;

foreach my $file (@ARGV) {
    my $f;
    my $text;
    my $oldtext;

    next if ((-d $file));

    open($f, '<', $file)
	or die "$P: Can't open $file for read\n";
    $oldtext = do { local($/) ; <$f> };
    close($f);

    next if ($oldtext eq "");

    $text = $oldtext;

    my $count = 0;
    do {
	$count = 0;
	$count += $text =~ s@\b(switch\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
    } while ($count > 0);

    if ($text ne $oldtext) {
	my $newfile = $file;

	open($f, '>', $newfile)
	    or die "$P: Can't open $newfile for write\n";
	print $f $text;
	close($f);
    }
}

$

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:58:35 -07:00
Michael Hennerich 24742ac692 IIO: GYRO: IIO driver for Analog Devices Digital Output Gyroscope ADXRS450
From: Cliff Cai <cliff.cai@analog.com>

Add new IIO driver for Analog Devices digital output gyroscope ADXRS450

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
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-20 14:20:46 -07:00
Michael Hennerich d48946357b IIO: Documentation: Add ABI documentatio for gyro quadrature correction
From: Cliff Cai <cliff.cai@analog.com>

Add ABI documentation for gyro quadrature correction.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
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-20 14:20:46 -07:00
Michael Hennerich 860a4e9d9f IIO: GYRO: Add MACRO for gyro quadrature correction
From: Cliff Cai <cliff.cai@analog.com>

Add gyro_z_quadrature_correction_raw define.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
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-20 14:20:45 -07:00
Alan Cox 01fbb4781f Staging: iio: oaktrail AK8975 support via IIO
Actually this is generic 'I have no GPIO' support for the AK8975, instead
we have to go bus polling.

Huang Liang produced an initial patch which worked by removing the support
for GPIO pins. This patch instead makes GPIO support optional and Huang then
fixed some bugs in it.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-20 14:18:55 -07:00
Greg Kroah-Hartman 32235b07b5 Staging: merge 2.6.39-rc3 into staging-next
This was done to handle a number of conflicts, the majority of which
were caused by the big "fix spelling issues" patch.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 12:14:05 -07:00
Linus Torvalds df9b29d13e Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (28 commits)
  staging: usbip: bugfix for isochronous packets and optimization
  staging: usbip: bugfix add number of packets for isochronous frames
  staging: usbip: bugfixes related to kthread conversion
  staging: usbip: fix shutdown problems.
  staging: hv: Fix GARP not sent after Quick Migration
  staging: IIO: IMU: ADIS16400: Avoid using printk facility directly
  staging: IIO: IMU: ADIS16400: Fix product ID check, skip embedded revision number
  staging: IIO: IMU: ADIS16400: Make sure only enabled scan_elements are pushed into the ring
  staging: IIO: IMU: ADIS16400: Fix addresses of GYRO and ACCEL calibration offset
  staging: IIO: IMU: ADIS16400: Add delay after self test
  staging: IIO: IMU: ADIS16400: Fix up SPI messages cs_change behavior
  staging/rtl81*: build as loadable modules only
  staging: brcm80211: removed 'is_amsdu causing toss' log spam
  staging: brcm80211: fix for 'Short CCK' log spam
  staging: brcm80211: fix for 'AC_BE txop..' logs spammed problem
  staging: memrar: remove driver from tree
  staging: sep: remove last memrar remnants
  staging: fix hv_mouse build, needs delay.h
  staging: fix olpc_dcon build errors
  staging: sm7xx: fixed defines
  ...

Fix up trivial conflict in drivers/staging/memrar/memrar_handler.c
(deleted vs trivial spelling fixes)
2011-04-07 11:36:44 -07:00
Michael Hennerich 6a6ec62334 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>
2011-04-05 12:37:12 -07:00
Michael Hennerich 4d1ea4a67e 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>
2011-04-05 12:37:11 -07:00
Michael Hennerich 0fea4d6192 staging: IIO: IMU: ADIS16400: Make sure only enabled scan_elements are pushed into the ring
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>
2011-04-05 12:37:11 -07:00
Michael Hennerich b181119723 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>
2011-04-05 12:37:10 -07:00
Michael Hennerich c59c95ce6a 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>
2011-04-05 12:37:10 -07:00
Michael Hennerich fc5b85b0ad 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>
2011-04-05 12:37:09 -07:00
Michael Hennerich 59c23eabda staging: IIO: DAC: New driver for the AD5504 and AD55041 High Voltage DACs
Changes since V1:

IIO: DAC: Apply review feedback from Jonathan

Fix array size and declare const.
Fix reversed dacY_powerdown read back.
Use individual attribute groups instead of is_visible.
Fix event naming and add the _en file.

Changes since V2:

IIO: DAC: AD5504 use proper event 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-04-05 12:10:59 -07:00
Michael Hennerich d6f087ec9c staging: IIO: ADC: New driver for the AD7780 / AD7781 24-bit Sigma-Delta ADC
Changes since v1:

IIO: ADC: AD7780: Apply review feedback

Abort probe() with error in case platform_data is not present.
Add comment explaining power down reset (PDRST) GPIO handling
and dual function DOUT/RDY interrupt usage.

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-05 12:04:55 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Michael Hennerich 17e2a54203 Staging: IIO: DAC: AD5624R: Consistency cleanup - no functional changes
Consistently use indio_dev and access macro for devdata

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-03-14 12:21:28 -07:00
Michael Hennerich 2b61535a6e staging: IIO: DAC: AD5446: Add support for AD5601/AD5611/AD5621
This patch adds support for the AD5601/AD5611/AD5621 single channel,
8-/10-/12-bit, buffered voltage output DACs.

Changes since v1:
Sort Kconfig description my 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-03-14 11:50:28 -07:00
Michael Hennerich bbed4dc791 staging: IIO: DAC: AD5446: Add power down support
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-03-14 11:50:28 -07:00
Michael Hennerich bd51c0b078 staging: IIO: DAC: AD5446: Add missing ID table entries
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-03-14 11:50:27 -07:00
Michael Hennerich 8b68bb2081 Staging: IIO: Documentation: iio_utils: fix channel array generation.
The previous implementation flawed, in case some channels are not enabled.
The sorted array would then include channel information of disabled channels,
And misses the enabled ones, when the count is reached.
More troublesome, the loop would not even terminate.

The fix is twofold:

First we skip channels that are not enabled.
Then we use a tested bubble sort algorithm to sort the array.
Since we already allocated exactly the number of bytes we need.
We can exercise bubble sort on the original memory.
In all cases I've seen, the array is already sorted, so this sort
terminates immediately.

Changes since V1:
Fix coding style issues.

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-03-09 15:50:28 -08:00
Michael Hennerich 14f88f1b07 Staging: IIO: DAC: AD5624R: Update to IIO ABI
This driver did not conform with the IIO ABI for such devices.
Also the sysfs files that this driver adds were not complete and
partially un-documented.

Update and document ABI
Change License notice, stick to GPL-v2.
Fix indention style
Add option to specify external reference voltage via the regulator framework.
Add mandatory name attribute
Add mandatory out_scale attribute

Changes since V1:
Refine outY_powerdown_mode description
Remove bonus white line

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-03-09 15:50:27 -08:00
Jonathan Cameron 14f983264a staging:iio:gyro: adis16060 cleanup, move to abi and bug fixes.
Moved to standard sysfs naming and got rid of direct register writing from
userspace.

The rx and tx buffers are never used together so just have one and avoid
the need to malloc it by using putting it in the state structure and
using the ____cacheline_aligned trick.

A number of obvious bugs also fixed and correction of register address
defines in header which has now been squashed into the driver.

I don't have one of these so can't test. This is done off datasheet.
Note that the driver had parts that definitely wouldn't work before
this patch.  Now it 'might' assuming I haven't messed up too badly.

I've left fixing the fact that you can only have one of these on a given
machine for another day.

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-02-28 17:50:15 -08:00
Jonathan Cameron 8e67875141 staging:iio:gyro: adis16130 cleanup, move to abi and bug fixes.
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-02-28 17:50:15 -08:00
Jonathan Cameron a301d425e6 staging:iio:gyro remove adis16251 driver as now supported by adis16260 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-02-28 17:48:50 -08:00
Jonathan Cameron 03d1b7d3e4 staging:iio:gyro: add adis16251 support to adis16260 driver
These parts are very similar and the adis16260 driver supports
a lot of additional functionality.

Precursor to removal of adis16251 driver.

Note that some supported devices were missing from Kconfig help text
and are also added in this 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-02-28 17:48:49 -08:00
Jonathan Cameron 35d2b6f9b1 staging:iio:gyro: adis16080 cleanup, move to abi and bug fixes.
Moved to standard sysfs naming and got rid of direct register writing
from userspace.

The rx and tx buffers are never used together so just have one and
avoid the need to malloc it by using putting it in the state structure
and using the ____cacheline_aligned trick.

Couple of obvious bug fixes whilst I was here.

I don't have one of these so can't test. This is done off datasheet.
Note that as with the adis16060 driver there are parts that definitely
wouldn't work before this patch.  Now it 'might' assuming I haven't
messed up too badly.

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-02-28 17:48:49 -08:00
Michael Hennerich a2396dfc63 IIO: ADC: AD799x: Update timestamp handling
Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

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-02-28 14:40:56 -08:00
Michael Hennerich dcfb0863ee IIO: ADC: AD7606: Update timestamp handling
Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

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-02-28 14:40:56 -08:00
Michael Hennerich e08d02658c IIO: ADC: AD7887: Update timestamp handling
Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

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-02-28 14:40:55 -08:00
Michael Hennerich 86f702ab1d IIO: ADC: AD7476: Update timestamp handling
Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

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-02-28 14:40:55 -08:00
Michael Hennerich fc7f95a946 IIO: Documentation: iio_utils: fix mask generation
Variable sizeint is used uninitialized.
Remove sizeint completely and use bits_used instead.

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-02-28 14:40:24 -08:00
Michael Hennerich 7ccd4506fa IIO: Documentation: iio_utils: Prevent buffer overflow
The first part of build_channel_array()identifies the number of enabled channels.
Further down this count is used to allocate the ci_array. The next section parses the
scan_elements directory again, and fills ci_array regardless if the channel is enabled or not.
So if less than available channels are enabled ci_array memory is overflowed.

This fix makes sure that we allocate enough memory. But the whole approach looks a bit
cumbersome to me. Why not allocate memory for MAX_CHANNLES, less say 64
(I never seen a part with more than that channels). And skip the first part entirely.

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-02-28 14:40:23 -08:00
Michael Hennerich 2bf99c70ce IIO: Documentation: iio_utils: style consistency fix
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-02-28 14:40:23 -08:00
Michael Hennerich cb771cbdbd IIO: Documentation: iio_utils: Avoid double free()
filename is used and freed later

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-02-28 14:40:22 -08:00
Michael Hennerich 065896e904 IIO: Documentation: generic_buffer example: Avoid NULL pointer dereference
In case optarg n is not given return/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-02-28 14:40:22 -08:00
Michael Hennerich 7c31b984c4 IIO: ADC: New driver for the AD7298 8-channel SPI ADC
This patch adds support for the
AD7298:  8-Channel, 1MSPS, 12-Bit SAR ADC with Temperature Sensor
via SPI bus.

This patch replaces the existing ad7298.c driver completely.
It was necessary since, the old driver did not comply with the
IIO ABI for such devices.

Changes since V1:
IIO: ADC: New driver for the AD7298 8-channel SPI ADC

Add documentation for new sysfs file tempX_input.
Simplify bit defines.
Remove outdated comments.
Fix indention style.
ad7298_show_temp():
	Add locking.
	Simplify temperature calculation.
	Change temperature result from degrees into milli degrees Celsius.
	Rename file according to new sysfs ABI documentation

Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Reviewed-by: Shubhrajyoti <Shubhrajyoti@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 13:39:54 -08:00
Michael Hennerich ea5dbf96db staging: IIO: trigger: New Blackfin specific trigger driver iio-trig-bfin-timer
This driver allows any Blackfin system timer to be used as IIO trigger.
It supports trigger rates from 0 to 100kHz in Hz resolution.

Changes since V1:
IIO: trigger: Apply review feedback

Add comment explaining Blackfin hardware timer configurations
Fix frequency_store, don't return -EINVAL for frequency set to 0

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-02-23 14:40:04 -08:00
Michael Hennerich 0772268aa9 staging: IIO: DAC: Add support for the AD5543/AD5553
Add support for the AD5543/AD5553 SPI 16-/14-Bit DACs
Fix typo in kconfig description

Changes since V1:
reorder Kconfig help text

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-02-23 14:40:04 -08:00
Michael Hennerich b9618c0cac staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4
This patch adds support for the:
AD7606/AD7606-6/AD7606-4 8/6/4-Channel Data Acquisition
system (DAS) with 16-Bit, Bipolar, Simultaneous Sampling ADC.

Changes since V1:
IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Apply review feedback

Rename sysfs node oversampling to oversampling_ratio.
Kconfig: Add GPIOLIB dependency.
Use range in mV to better match HWMON.
Rename ad7606_check_oversampling.
Fix various comments and style.
Reorder is_visible cases.
Use new gpio_request_one/array and friends.
Drop check for SPI max_speed_hz.

Changes since V2:
IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Apply review feedback

Documentation: specify unit
Avoid raise condition in ad7606_scan_direct()
Check return value of bus ops read_block()

Changes since V3:
IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Add missing include file

Add linux/sched.h

Changes since V4:
IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Fix kconfig declaration

consistently use tristate to avoid configuration mismatches

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-02-23 14:40:03 -08:00
Greg Kroah-Hartman ecc1058aec Revert "staging: iio: ak8975: add platform data."
This reverts commit f2f1794835.

It should not be putting code into the include/input/ directory, and
lots of other people have complained about it.

Cc: Tony SIM <chinyeow.sim.xt@renesas.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:12:25 -08:00
Jonathan Cameron 7a9f437af9 staging:iio:gyro:adis16130 stub removal and cleanup
Get rid of unused stubs for trigger and buffer support.
Fix line length issues.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:24:19 -08:00
Jonathan Cameron 8d016b43c9 staging:iio:gyro:adis16080 unused stub removal and cleanup
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:24:18 -08:00
Jonathan Cameron d14ae859bb staging:iio:gyro:adis16060 cleanup and dead code removal
Removed stubs related to buffering and triggering. Put them back
when they are actually needed.
Fixed line length issues.
Made a number of functions static as no longer in header.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:24:18 -08:00
Jonathan Cameron 3faa4d3f88 staging:iio:meter remove stubs from ade7854.
General cleanup and use of standard functions to simplfy some spi reads
as well.

Also added a device id table to the spi version.

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-02-18 13:23:50 -08:00
Jonathan Cameron 3859faca5e staging:iio:meter remove stubs from ade7759.
General cleanup and use of standard functions to simplfy some spi reads
as well.

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-02-18 13:23:50 -08:00
Jonathan Cameron 5a0326d9f8 staging:iio:meter remove stubs from ade7754.
General cleanup and use of standard functions to simplfy some spi reads
as well.

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-02-18 13:23:49 -08:00
Jonathan Cameron 72db6eb674 staging:iio:meter remove stubs from ade7753.
General cleanup and use of standard functions to simplfy some spi reads
as well.

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-02-18 13:23:49 -08:00
Jonathan Cameron 96df9799a4 staging:iio: buffer example - add lots more runtime parameters
Add ability to control delay for event free buffers
Add ability to control length of buffer
Add ability to control how many read cycles occur

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:52 -08:00
Jonathan Cameron 30268a3da9 staging:iio: update example to handle case with no ring events
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:51 -08:00
Jonathan Cameron b949793b2c staging:iio:lis3l02dq allow buffer implementation selection
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:51 -08:00
Jonathan Cameron b174baf4b7 staging:iio:kfifo buffer implementation
A very simple use of a kfifo as an alternative for the ring_sw

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:51 -08:00
Jonathan Cameron d5857d65b5 staging:iio:buffering move the copy to user on rip down into implementations
The current interface is not as adaptable as it should be. Moving
this complexity into the implementations makes it easier to add
new implementations.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:50 -08:00
Tony SIM f2f1794835 staging: iio: ak8975: add platform data.
As some of the platform not support irq_to_gpio, we pass gpio port
by platform data.

Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Signed-off-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:21:57 -08:00
Michael Hennerich ea707584ba Staging: IIO: DDS: AD9832 / AD9835 driver
This is a complete rewrite of the AD9832/35 driver.
Purpose was to move this driver to the recently
created API for such devices.

Changes since V1:
IIO: DDS: AD9832 / AD9835 driver: Apply review feedback

Save a few bytes, use union for data allocated for spi buffers.
Remove use of device IDs.
Fix comments.
Make master clock mclk always type unsigned long.

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-02-09 14:58:57 -08:00
Michael Hennerich f9a7e9b2f0 Staging: IIO: TRIGGER: New sysfs based trigger
This patch adds a new trigger that can be invoked by writing
the sysfs file: trigger_now. This approach can be valuable during
automated testing or in situations, where other trigger methods
are not applicable. For example no RTC or spare GPIOs.
Last but not least we can allow user space applications to produce triggers.

IIO: TRIGGER: Apply review feedback by Greg Kroah-Hartman

Changes since v1:

Add sysfs documentation.
Change license notice.
Add module alias.
Add more Kconfig help text

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-02-09 14:56:42 -08:00
Greg Kroah-Hartman 949c3676cd Staging: Merge branch 'staging-next' into 2.6.38-rc3
This was done to resolve conflicts in the following files due
to patches in Linus's tree and in the staging-next tree:
	drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
	drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 13:35:58 -08:00
Roland Stigge ae639830fe Staging: iio: ad7476_core.c: Fixed i2c -> spi documentation typo
ad7476_core.c: Fixed i2c -> spi documentation typo

Minor documentation fix in comment

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 14:12:18 -08:00
Roland Stigge 826514b4ee Staging: iio: max517.c: Fix client obtainment by using iio_dev_get_devdata()
max517.c: Fix client obtainment by using iio_dev_get_devdata()

This patch uses dev_get_drvdata() and iio_dev_get_devdata() instead of
to_i2c_client() (broken!) to obtain i2c_client data.

Further, some minor typo fixes are included.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 14:12:18 -08:00
Roland Stigge 41135b1ca2 Staging: iio: Aditional fixpoint formatted output bugfix
iio: Additional fixpoint formatted output bugfixes

Fix some ADC/DAC drivers' _scale interface to correct fixpoint formatted output

This patch adds the fixes to ad7887_core.c and ad5446.c

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-22 06:32:21 -08:00
Roland Stigge 6ddc5fb43e Staging: iio: add driver for MAX517/518/519
IIO Driver for Maxim MAX517, MAX518 and MAX519 DAC

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21 12:20:56 -08:00
Roland Stigge 98069c3f1c Staging: iio: Documented output / DAC interface
Added documentation for:
* /sys/bus/iio/devices/deviceX/outY_scale
* /sys/bus/iio/devices/deviceX/outY_raw
* /sys/bus/iio/devices/deviceX/outY&Z_raw

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20 15:59:04 -08:00
roel kluin 267024a9f6 Staging: iio: --/++ confusion in build_channel_array() error cleanup
Fix loop: it should decrement

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20 15:58:17 -08:00
Roland Stigge e71a7fd259 iio: Fixpoint formatted output bugfix
Fix some ADC drivers' _scale interface to correct fixpoint formatted output

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20 12:06:07 -08:00
Michael Hennerich 12b9d5bf76 Staging: IIO: DDS: AD9833 / AD9834 driver
Changes since RFC/v1:
IIO: Apply list review feedback

Apply list review feedback:
	Rename attributes to fit IIO convention used in other drivers.
	Fix typos.
	Provide ddsX_out_enable as opposed to ddsX_out_disable.
	Use proper __devexit marking.
	Use strict_strtoul() to avoid negatives.

Changes since v2:
IIO: ad9834.c: Apply more list review feedback

	Update use of dds convenience macros.
	Fix tabbing.
	Remove superfluous brackets.
	Keep output disabled after probe.
	Remove unnecessary code.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Reviewed-by: Datta Shubhrajyoti <shubhrajyoti@ti.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16 12:23:03 -08:00
Michael Hennerich 4851d97d87 Staging: IIO: dds.h convenience macros
Changes since RFC/v1:
IIO: Apply list review feedback

Apply list review feedback:
	Rename attributes to fit IIO convention used in other drivers.
	Provide ddsX_out_enable as opposed to ddsX_out_disable.
	Fix typos.

Changes since v2:
IIO: dds.h: Apply more list review feedback

	Fix mixture of X and [n] notation for indices.
	Remove duplicated descriptions.
	Add store methods to some dds convenience macros.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Reviewed-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16 12:23:03 -08:00
Michael Hennerich f8ce33bbd5 Staging: IIO: Direct digital synthesis abi documentation
Changes since RFC/v1:
IIO: Apply list review feedback:

Apply list review feedback:
	Restructure documentation according to list feedback.
	Rename attributes to fit IIO convention used in other drivers.
	Fix typos.
	Provide ddsX_out_enable as opposed to ddsX_out_disable

Changes since v2:
IIO: sysfs-bus-iio-dds: Apply more list review feedback

	Fix mixture of X and [n] notation for indices.
	Fix some wording in the descriptions.

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>
2010-12-16 12:23:03 -08:00
Greg Kroah-Hartman 983bbfd091 Staging: iio: fix up world writable sysfs files.
You should not be able to write to sysfs files from any user.

Cc: Graf Yang <graf.yang@analog.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-10 10:56:18 -08:00
Greg Kroah-Hartman ea3398a1ae Staging: Merge 2.6.37-rc5 into staging-next
This was done to handle a number of conflicts in the batman-adv
and winbond drivers properly.  It also now allows us to fix up the sysfs
attributes properly that were not in the .37 release due to them being
only in this tree at the time.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07 10:47:56 -08:00
Michael Hennerich 8c66be9203 staging: iio: dds: ad9832: Fix kconfig description
The AD9832 driver doesn't support the AD9833 and AD9834

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>
2010-12-01 14:53:33 -08:00
Michael Hennerich 4f76548299 staging: iio: dac: ad5446: Remove unused sign member from chip specific information structure
Remove unused sign member from chip specific information structure
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>
2010-11-29 11:06:46 -08:00
Michael Hennerich d846263da4 staging: iio: dac: ad5446: Enable driver support for AD5620/AD5640/AD5660 DA converters
Initial support for single channel, 12-/14-/16-Bit nanoDAC with On-Chip Reference

staging: iio: dac: ad5446: Fix according to review feedback

Review feedback by Jonathan Cameron:
	Use kernel doc style to document headers.
	Turn data into a union
	Add some comments for clarity

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>
2010-11-29 11:06:06 -08:00
Jonathan Cameron f386caa3cd staging: iio: documentation rewrite and cleanup of sysfs documetation
Change to capital syntax for documetation e.g. 'inX-inY_raw'
Use multiple 'What:' entries rather than wild cards or options so
as to make the documentation clearer and easier to search.
Some trivial spelling fixes.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29 11:05:36 -08:00
Jonathan Cameron fe34604844 staging: iio: adis16260 add suppport for adis16255 and adis16250.
Unusual element is addition of 'negate' and 'axis' platform data
to ensure we support all the functionality of the adis16255 driver
currently in staging.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Matthias Brugger <mensch0815@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29 11:04:48 -08:00
Jonathan Cameron a9672951a5 staging: iio: adis16260 add id table support
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29 11:04:48 -08:00
Michael Hennerich 2b4756aa36 staging: iio: adc: Enable driver support for ad7887 AD converter
Enable support for AD7887:  SPI Micropower, 2-Channel, 125 kSPS, 12-Bit ADC

staging: iio: adc: Fix according to review feedback

Review feedback by Jonathan Cameron:
	Combine statements.
	Document struct members.
	Remove redundant variable initialization.
	Simplify multichannel scan from ring logic.
	Fix coding style.

[v2]
staging: iio: adc: ad7887: 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>
2010-11-29 11:02:56 -08:00
Michael Hennerich b5a4948175 staging: iio: dac: Enable driver support for AD5444 and AD5446 DA converters
Enable support for AD5444 and AD5446:  12-/14-Bit High Bandwidth
Multiplying DACs with Serial Interface.

staging: iio: dac: Add support for AD5541A, AD5512A digital to analog convertors

staging: iio: dac: Fix according to review feedback

Review feedback by Jonathan Cameron:
	Remove spurious new line.
	Document struct members.
	Remove redundant variable initialization.

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>
2010-11-29 11:02:55 -08:00
Michael Hennerich 24d6050b35 staging: iio: dac: Cleanup style - no functional changes
Stick to the 80 character line limit at least for code

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>
2010-11-19 17:13:38 -08:00
Michael Hennerich ece30c1592 staging: iio: dac: Use spi_device_id
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>
2010-11-19 17:13:38 -08:00
Michael Hennerich df9cd10520 staging: iio: dac: Use spi_write() and handle return value
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>
2010-11-19 17:13:37 -08:00
Michael Hennerich 51f8ad3602 staging: iio: dac: Update drivers to use new attribute naming
Remove depreciated macro from header

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>
2010-11-19 17:13:35 -08:00
Michael Hennerich 5a7f4fddae staging: iio: dac: more consistent DAC sysfs attributes naming
Align DAC sysfs attributes naming with the convention used by ADC

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>
2010-11-19 17:13:23 -08:00
Greg Kroah-Hartman c9e51d9e4b Staging: iio: adis16220: fix up my fixup for some sysfs attribute permissions
They should be writable by root, not readable.
Doh, stupid me with the wrong flags.

Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Barry Song <Barry.Song@analog.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-18 11:27:19 -08:00
Randy Dunlap 0ebce26963 staging: fix iio/gyro typos, build errors
Typo causes build errors.  Did anyone even build this driver?

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:31:49 -08:00
Dan Carpenter 59a126418b Staging: iio/dds: double locking bugs
This is a static checker patch and I don't have this hardware.

This code is unusual because while I've often seen a double lock, this
is the first time I've seen code that takes a lock 11 times in a row.  I
feel like I must have missed something.  But I've looked very carefully
I don't see any way the original code is correct.  Does spi_sync()
somehow release the lock in a way that I can't see?  Even if it does,
the locking would still be wrong.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:31:49 -08:00
Joe Perches 859171ca92 drivers/staging: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:06:47 -08:00
Greg Kroah-Hartman 1d904e8950 Staging: iio: adis16220: fix up some sysfs attribute permissions
They should not be writable by any user

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Barry Song <Barry.Song@analog.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 11:19:53 -08:00
Barry Song e1ffd62b8f staging: iio: adis16209: tuning spi delay to make hardware more stable
Looks like one spot was missed in the previous spi tune patch.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:46 -08:00
Graf Yang 817e5c65c5 staging: iio: resolver: new driver for AD2S1210 devices
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:45 -08:00
Graf Yang ffd7a62f0d staging: iio: resolver: new driver for AD2S1200/1205 devices
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:45 -08:00
Graf Yang f46d9f154a staging: iio: resolver: new driver for AD2S90 devices
This also kicks off the new resolver subsection.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:44 -08:00
Barry Song 5b264a624e staging: iio: meter: new driver for ADE7854/58/68/78 devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:43 -08:00
Barry Song 2919fa54ef staging: iio: meter: new driver for ADE7759 devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:43 -08:00
Barry Song 8210cfe9bd staging: iio: meter: new driver for ADE7758 devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:43 -08:00
Barry Song 8d97a5877b staging: iio: meter: new driver for ADE7754 devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:42 -08:00
Barry Song 09434ef7c2 staging: iio: meter: new driver for ADE7753/6 devices
This also kicks off the new meter subsection.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:42 -08:00
Cliff Cai 0152a05852 staging: iio: dds: new driver for AD9951 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:42 -08:00
Cliff Cai 2996a2dc38 staging: iio: dds: new driver for AD9910 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:41 -08:00
Cliff Cai a886689f6c staging: iio: dds: new driver for AD9852/4 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:41 -08:00
Cliff Cai a82ab27aa7 staging: iio: dds: new driver for AD9850/1 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:41 -08:00
Cliff Cai 4a8e6c33e8 staging: iio: dds: new driver for AD9832/3/4/5 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:40 -08:00
Cliff Cai da6fcbdf76 staging: iio: dds: new driver for AD5930/2 devices
This is the initial driver in the new Direct Digital Synthesis section.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:40 -08:00
Barry Song 6790e29fef staging: iio: dac: new driver for AD5624R devices
This is used to convert digital streams into voltages.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:39 -08:00
Barry Song 7a83f60d7b staging: iio: gyro: new driver for ADIS16130 digital output gyros
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:39 -08:00
Barry Song 1b2f99e1ae staging: iio: gyro: new driver for ADIS16080 digital output gyros
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:38 -08:00
Barry Song e071f6b8e4 staging: iio: gyro: new driver for ADIS16060 digital output gyros
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:38 -08:00
Barry Song 4f0cd86d66 staging: iio: gyro: new driver for ADIS16251 devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:37 -08:00
Sonic Zhang 06b86a75b1 staging: iio: adc: new driver for ADT7410 temperature sensors
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:37 -08:00
Sonic Zhang a5d8c6bc2f staging: iio: adc: new driver for ADT7310 temperature sensors
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:37 -08:00
Sonic Zhang d7713b6c56 staging: iio: adc: new driver for ADT75 temperature sensors
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:37 -08:00
Sonic Zhang 7924425db0 staging: iio: adc: new driver for AD7816 devices
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:36 -08:00
Barry Song 671d85f2aa staging: iio: adc: new driver for AD7745/6/7 devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:36 -08:00
Sonic Zhang f84c26e61e staging: iio: adc: new driver for AD7314 devices
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:36 -08:00
Sonic Zhang e8ada962bc staging: iio: adc: new driver for AD7298 devices
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:35 -08:00
Sonic Zhang ddaecd5ba8 staging: iio: adc: new driver for AD7291 devices
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:35 -08:00
Barry Song a20ebd9300 staging: iio: adc: new driver for AD7152/3 devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:35 -08:00
Barry Song 54c5be349b staging: iio: adc: new driver for AD7150/1/6 devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:34 -08:00
Sonic Zhang 35f6b6b86e staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver
IIO driver for temperature sensor, ADC and DAC devices over SPI and I2C.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:34 -08:00
Barry Song bb6f19eafe staging: iio: new adis16204 driver
IIO driver for Programmable High-g Digital Impact Sensor and Recorder.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:33 -08:00
Barry Song f11ba4f577 staging: iio: new adis16203 driver
IIO driver for Programmable 360 Degrees Inclinometer adis16203 parts.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:33 -08:00
Barry Song f7fe1d1dd5 staging: iio: new adis16201 driver
IIO driver for dual Axis Accelerometer/inclinometer adis16201 parts.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:33 -08:00
Mike Frysinger 6f125f1794 staging: iio: add ADI info to TODO
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:32 -08:00
Michael Hennerich f733d02ab6 staging: iio: gyro: make sure grep can find the ADIS16265 support
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:32 -08:00
Mike Frysinger 61a4295b49 staging: iio: adis16350: add missing reference to temp offset
We declare this attr but never link it in to the attr list.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:31 -08:00
Greg Kroah-Hartman e4c5bf8e3d Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-28 09:44:56 -07:00
Arnd Bergmann 6038f373a3 llseek: automatically add .llseek fop
All file_operations should get a .llseek operation so we can make
nonseekable_open the default for future file operations without a
.llseek pointer.

The three cases that we can automatically detect are no_llseek, seq_lseek
and default_llseek. For cases where we can we can automatically prove that
the file offset is always ignored, we use noop_llseek, which maintains
the current behavior of not returning an error from a seek.

New drivers should normally not use noop_llseek but instead use no_llseek
and call nonseekable_open at open time.  Existing drivers can be converted
to do the same when the maintainer knows for certain that no user code
relies on calling seek on the device file.

The generated code is often incorrectly indented and right now contains
comments that clarify for each added line why a specific variant was
chosen. In the version that gets submitted upstream, the comments will
be gone and I will manually fix the indentation, because there does not
seem to be a way to do that using coccinelle.

Some amount of new code is currently sitting in linux-next that should get
the same modifications, which I will do at the end of the merge window.

Many thanks to Julia Lawall for helping me learn to write a semantic
patch that does all this.

===== begin semantic patch =====
// This adds an llseek= method to all file operations,
// as a preparation for making no_llseek the default.
//
// The rules are
// - use no_llseek explicitly if we do nonseekable_open
// - use seq_lseek for sequential files
// - use default_llseek if we know we access f_pos
// - use noop_llseek if we know we don't access f_pos,
//   but we still want to allow users to call lseek
//
@ open1 exists @
identifier nested_open;
@@
nested_open(...)
{
<+...
nonseekable_open(...)
...+>
}

@ open exists@
identifier open_f;
identifier i, f;
identifier open1.nested_open;
@@
int open_f(struct inode *i, struct file *f)
{
<+...
(
nonseekable_open(...)
|
nested_open(...)
)
...+>
}

@ read disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
<+...
(
   *off = E
|
   *off += E
|
   func(..., off, ...)
|
   E = *off
)
...+>
}

@ read_no_fpos disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
... when != off
}

@ write @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
<+...
(
  *off = E
|
  *off += E
|
  func(..., off, ...)
|
  E = *off
)
...+>
}

@ write_no_fpos @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
... when != off
}

@ fops0 @
identifier fops;
@@
struct file_operations fops = {
 ...
};

@ has_llseek depends on fops0 @
identifier fops0.fops;
identifier llseek_f;
@@
struct file_operations fops = {
...
 .llseek = llseek_f,
...
};

@ has_read depends on fops0 @
identifier fops0.fops;
identifier read_f;
@@
struct file_operations fops = {
...
 .read = read_f,
...
};

@ has_write depends on fops0 @
identifier fops0.fops;
identifier write_f;
@@
struct file_operations fops = {
...
 .write = write_f,
...
};

@ has_open depends on fops0 @
identifier fops0.fops;
identifier open_f;
@@
struct file_operations fops = {
...
 .open = open_f,
...
};

// use no_llseek if we call nonseekable_open
////////////////////////////////////////////
@ nonseekable1 depends on !has_llseek && has_open @
identifier fops0.fops;
identifier nso ~= "nonseekable_open";
@@
struct file_operations fops = {
...  .open = nso, ...
+.llseek = no_llseek, /* nonseekable */
};

@ nonseekable2 depends on !has_llseek @
identifier fops0.fops;
identifier open.open_f;
@@
struct file_operations fops = {
...  .open = open_f, ...
+.llseek = no_llseek, /* open uses nonseekable */
};

// use seq_lseek for sequential files
/////////////////////////////////////
@ seq depends on !has_llseek @
identifier fops0.fops;
identifier sr ~= "seq_read";
@@
struct file_operations fops = {
...  .read = sr, ...
+.llseek = seq_lseek, /* we have seq_read */
};

// use default_llseek if there is a readdir
///////////////////////////////////////////
@ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier readdir_e;
@@
// any other fop is used that changes pos
struct file_operations fops = {
... .readdir = readdir_e, ...
+.llseek = default_llseek, /* readdir is present */
};

// use default_llseek if at least one of read/write touches f_pos
/////////////////////////////////////////////////////////////////
@ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read.read_f;
@@
// read fops use offset
struct file_operations fops = {
... .read = read_f, ...
+.llseek = default_llseek, /* read accesses f_pos */
};

@ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write.write_f;
@@
// write fops use offset
struct file_operations fops = {
... .write = write_f, ...
+	.llseek = default_llseek, /* write accesses f_pos */
};

// Use noop_llseek if neither read nor write accesses f_pos
///////////////////////////////////////////////////////////

@ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
identifier write_no_fpos.write_f;
@@
// write fops use offset
struct file_operations fops = {
...
 .write = write_f,
 .read = read_f,
...
+.llseek = noop_llseek, /* read and write both use no f_pos */
};

@ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write_no_fpos.write_f;
@@
struct file_operations fops = {
... .write = write_f, ...
+.llseek = noop_llseek, /* write uses no f_pos */
};

@ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
@@
struct file_operations fops = {
... .read = read_f, ...
+.llseek = noop_llseek, /* read uses no f_pos */
};

@ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
@@
struct file_operations fops = {
...
+.llseek = noop_llseek, /* no read or write fn */
};
===== End semantic patch =====

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Julia Lawall <julia@diku.dk>
Cc: Christoph Hellwig <hch@infradead.org>
2010-10-15 15:53:27 +02:00
Michael Hennerich 2a28f6cb74 staging: iio: ad7476: fix !CONFIG_IIO_RING_BUFFER build issue reported by Randy Dunlap
Fix function function decalration
Enable CONFIG_IIO_RING_BUFFER for the ad7476 driver

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>
2010-10-14 12:09:23 -07:00
Michael Hennerich 1139df5353 staging: iio: adc: ad799x miscellaneous cleanups
-Simplify by using iio_alloc_pollfunc helper function
-Print in_scale in decimal format.
-Simplify ring pointer dereferences

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>
2010-10-12 08:59:32 -07:00
Michael Hennerich 668413e9e7 staging: iio: adc: ad7476 more list review feedback by Jonathan Cameron
Print in_scale in decimal format.
Kconfig list the names of the parts in full, to ease seraching.
Use st->spi in the call as it is only used the once.

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>
2010-10-12 08:59:32 -07:00
Michael Hennerich 349282d82e staging: iio: adc: ad7476 new SPI ADC driver
New driver handling:
	AD7475, AD7476, AD7477, AD7478, AD7466, AD7467, AD7468, AD7495
SPI micropower and high speed 12-/10-/8-Bit ADCs

staging: iio: adc: ad7476 apply list review feedback by Jonathan Cameron

Changes since last RFC post V1:
	Mainly list review feedback by Jonathan Cameron

-Remove scan_attrs from chip info structure.
-Remove name from chip info structure, use new spi_device_id instead.
-Allow transfer buffers to live in their own cache lines, to avoid DMA/cache coherency issues.
-Move scan el code into the ring buffer file.
-Use helper function to alloc the pollfunc.
-Use regulator framework and get vref_mv from the regulator in case not specified by pdata.
-Devices with buit-in reference use vref from the chip info structure
-Don't error on missing platform_data

-Make vref_mv type unsigned short
-Print in_scale "Vref / 2^(bits)" if fractional.

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>
2010-10-12 08:59:31 -07:00
Jonathan Cameron e58537ccce staging: iio: update example application.
The application is now considerably more generic and should cope
with all devices in tree.  The process function will need to be
extended to handle other type values as needed.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:57 -07:00
Jonathan Cameron 1755b0ae17 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>
2010-10-08 07:17:56 -07:00
Jonathan Cameron 2f3cc667f7 staging: iio: events update documentation to match new abi.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:56 -07:00
Jonathan Cameron f9f0d354cb staging: iio: light remove empty light.h file
We can put this back when there is something to put in it!

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:56 -07:00
Jonathan Cameron 45dd3b340b staging: iio: tsl2563 event attribute name updates
Patch also renames the two raw channels to add numbers
so that we know to which channel the event code applies.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:55 -07:00
Jonathan Cameron d750e375c1 staging: iio: accel remove deprecated and misleading event macros.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:55 -07:00
Jonathan Cameron fc5d0e4254 staging: iio: sca3000 event attribute name updates
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:54 -07:00
Jonathan Cameron c33680c483 staging: iio: lis3l02dq event attribute renames
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:54 -07:00
Jonathan Cameron 4be2de46fb staging: iio: events move buffer codes so they do not clash with new scheme
We could blugeon these more into the scheme I guess, but does it make sense
to do so?

Also remove all remain vestiges of old scheme.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:53 -07:00
Jonathan Cameron da1d8b68af staging: iio: tsl2563 move to new event numbering scheme and remove old definitions
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:53 -07:00
Jonathan Cameron deb02fc574 staging: iio: accel remove old event codes
Signed-off-by: Joanthan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:52 -07:00
Jonathan Cameron de9fe32afc staging: iio: sca3000 move to new event code scheme and add combined orientations
The combined orientations allow handling of typical motion and free fall
detectors to be handled as threshold events just applied to a number of
axes via boolean operations.  So freefall is when x, y and z magnitudes
are all below a threshold for a particular period.  Motion detectors
are typically whether x or y or z are above a particular value.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:52 -07:00
Jonathan Cameron 18e69a9904 staging: iio: lis3l02dq move to new event code scheme
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:52 -07:00
Jonathan Cameron 820e882a87 staging: iio: adc events update to new numbering system
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:51 -07:00
Jonathan Cameron f4704d77fd staging: iio: events define macros for new event code system
These are step one of moving to a systematic numbering for event
codes.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:17:51 -07:00
Rhyland Klein 940428742e staging: iio: light: Adding driver for ISL29018 ALS
adding support for the ISL 29018 ambient light and proximity sensor.

Addressed comments from reviews by Jonathan Cameron and Joe Perches
  * Removed some excess dbg prints that only printed function name
  * Renamed some properties to make them more descriptive
  * Added a property to list available adc resolutions
  * Defined arrays for resolutions/ranges as static const
  * Change loops initialization to memset for extensibility.
    * used sizeof() instead of ARRAY_SIZE() to be safer
  * Added a property to list available adc ranges
  * Fixed warnings and property names.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07 20:12:38 -07:00
Michael Hennerich e968d09504 staging: iio: ring_generic: provide IIO_CONST_ATTR_SCAN_EL_TYPE_WITH_SHIFT
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>
2010-10-07 10:07:01 -07:00
Michael Hennerich 3ba2e4939d staging: iio: adc: ad799x drop in_precision in favor of new in_type
-drop in_precision in favor of new in_type -
This also fixes the bug from the scan elements move (as a side effect)
-add sign and storagebits to struct ad799x_chip_info
-properly mask the results based on ad799x_chip_info:bits

staging: iio: adc: ad799x misc fixed per iio list review

remove new line
remove storagebits from struct ad799x_chip_info
use defined storagebits value for in_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>
2010-10-07 10:07:01 -07:00
Jonathan Cameron a7861ff082 staging: iio: max1363 fix bug due to scan_element directory move.
The device found passed to the attr functions is that of the ring
    buffer, not the the iio_dev so we need to bounce through one more
    hop to get the right address.

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

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07 10:06:44 -07:00
Jonathan Cameron 7aa3baeb97 staging: iio: sca3000 fix bug due to scan_element directory move.
The device found passed to the attr functions is that of the ring
buffer, not the the iio_dev so we need to bounce through one more
hop to get the right address.

Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07 10:06:44 -07:00
Jonathan Cameron 0986452eb4 staging: iio: timestamp_en naming typo fix.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07 10:06:44 -07:00
Michael Hennerich ba6584946e staging: iio: adc: max1363: remove unused variable
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07 10:06:18 -07:00
Michael Hennerich d0a530441e staging: iio: iio_ring_rip_outer return immediately if rip_lots returns <= 0
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07 10:06:18 -07:00
Michael Hennerich aecac19179 staging: iio: adc: ad799x: Address iio list feedback
Address feedback from Shubhrajyoti Datta:
	Cast return value
Michael Hennerich:
	Use i2c_smbus_read_byte_data()
	Fix return value check

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-06 08:22:44 -07:00
Michael Hennerich e1517c00da staging: iio: adc: max1363: prevent buffer overflow
ring->access.read_last() reads the entire datum from
the ring including padding and time stamp.

Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-06 08:21:28 -07:00
Michael Hennerich 858f1ccff1 staging: iio: adc: ad799x: prevent buffer overflow
ring->access.read_last() reads the entire datum from the ring including padding and time stamp.

Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-06 08:21:28 -07:00
Michael Hennerich 30b5309ae5 staging: iio: adc: Address mailing list feedback by Jonathan Cameron
Add missing new line
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>
2010-10-05 11:51:37 -07:00
Michael Hennerich 985dbe776b staging: iio: adc: Enable driver support for ad799x AD converters
Driver for ad7991, ad7995, ad7999, ad7992, ad7993, ad7994, ad7997 and
ad7998 multichannel ADC.

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>
2010-10-05 11:51:13 -07:00
Phillip Kurtenbach 0abd242839 staging: iio: whitespace cleanup
Fixed whitespace coding style issues.

Signed-off-by: Phillip Kurtenbach <pkurtenbach@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-30 04:33:17 -07:00
Jonathan Cameron 10ba8ea9bd staging: iio: sysfs abi documentation. Add _type and _index attrs
Also remove no unused precision attr.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:44 -07:00
Jonathan Cameron 3215e31cc3 staging: iio: remove deprecated form of scan_el attribute naming.
This has been replaced by a separate _index attribute

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:44 -07:00
Jonathan Cameron d16061bb67 staging: iio: sca3000 add _index attribute registration
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:43 -07:00
Jonathan Cameron 77b3d3facf staging: iio: max1363 add _index attribute registration
Also fixes a missing NULL to terminate one of the attribute arrays.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:43 -07:00
Jonathan Cameron 67dd265d44 staging: iio: adis16400 add _index attribute registration
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:43 -07:00
Jonathan Cameron de9b493efb staging: iio: adis16350 add _index attribute registration
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:43 -07:00
Jonathan Cameron 474437496a staging: iio: adis16300 add _index attribute registration
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:42 -07:00
Jonathan Cameron c045e44dfc staging: iio: adis16260 add _index attribute registration
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:42 -07:00
Jonathan Cameron 6d2174f438 staging: iio: adis16240 add _index attribute registration
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:42 -07:00
Jonathan Cameron 49624fa833 staging: iio: adis16209 add _index attribute registration
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:42 -07:00
Jonathan Cameron 13a091abb7 staging: iio: lis3l02dq add _index attribute registration
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:42 -07:00
Jonathan Cameron fc89b38db0 staging: iio: amend macros for SCAN_EL creation to add separate index attr
As Manuel Stahl observed, putting data into the naming of an attribute
(beyond what it is for) breaks the one value per attribute rule (in spirit
at least).  Hence we introduce a separate _index attribute for each scan
element to tell userspace the ordering in output from the buffer.

This will generate a lot of sparse warnings as all drivers will have unused
iio_const_attrs created.  The rest of the set will clean these up.

The final patch will remove the old indexing method. It is not here so
as to maintain one or other interface for all devices as this set
progresses.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:41 -07:00
Jonathan Cameron 44f270de71 staging: iio: Remove unused bit_count from struct iio_scan_el
The job this was intended to do (never implemented) is now done
by explicit definition of _type attributes in all drivers

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:41 -07:00
Jonathan Cameron 5df2145c8c staging: iio: adis16400 add _type attributes for all scan elements
The bit depth of 14 for the supply adc on the datasheet is highly
suspicious.  Confirmation requested from Analog.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:41 -07:00
Jonathan Cameron 3b401a96d5 staging: iio: adis16350 add _type attributes for all scan elements
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:41 -07:00
Jonathan Cameron 88b76d1da5 staging: iio: adis16300 add _type attributes for all scan elements
Note some of the in driver type specifications do not match the
data sheet.  I am assuming the datasheet is correct. This bug
would not have been apparent in the driver as these values were
unusued.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:40 -07:00
Jonathan Cameron 357f0209b4 staging: iio: adis16260 add _type attributes for all scan elements
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:40 -07:00
Jonathan Cameron ef26b83090 staging: iio: sca3000 add _type attributes for all scan elements
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:40 -07:00
Jonathan Cameron be3ebd1f16 staging: iio: adis16240 add _type attributes for all scan elements
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:40 -07:00
Jonathan Cameron 6a4429c85e staging: iio: adis16209 add _type attributes for all scan elements
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:40 -07:00
Jonathan Cameron 8d9c636b60 staging: iio: max1363 add _type attributes for all scan elements
As both signed and unsigned in attributes exist, each element must
be fully specified.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:39 -07:00
Jonathan Cameron 6a36e618b4 staging: iio: lis3l02dq add _type attributes for all scan elements
Also, adds a macro to make defining such attributes simple.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21 10:34:39 -07:00
Manuel Stahl 6267ea655f staging: iio: sca3000 convert byte order of ring buffer data
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:37:58 -07:00
Manuel Stahl b68d58a84b staging: iio: sca3000 fix sca3000_[show,store]_ring_bpse
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:37:58 -07:00
Andrew Chew 3285aae1ed staging: iio: ak8975: Add ak8975 magnetometer sensor
This is for the Asahi Kasei AK8975 3-axis magnetometer.  It resides within
the magnetometer section of the IIO subsystem, and implements the raw
magn_x,y,z_raw attributes, as well as magn_x,y,z_scale attributes for
converting to Gauss.

Changed to use the magn_x,y,z_scale attributes, and made those attributes
give the scale factor to conert to Gauss.  Also applied more fixes from
feedback.

Keeping mode as an unsigned long.  I'm going to add proper power management
at some point anyway, which would deprecate this attribute.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:37:11 -07:00
Andrew Chew 7223234ee0 staging: iio: Change GAIN macros to SCALE.
Per email exchange with Jonathan Cameron, GAIN should instead be SCALE, to
be consistent with documentation.

Resending, since this goes with the 2/2 patch.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:37:10 -07:00
Uwe Kleine-König 6cd5a9a35c staging/trivial: fix typos concerning "access"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:23:25 -07:00
Jonathan Cameron 853098b6e5 staging: iio: documentation - partial update to make more of it true.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:19:02 -07:00
Jonathan Cameron 04b708124a staging: iio: lis3l02dqbuffersimple.c bring example up to date.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:19:02 -07:00
Jonathan Cameron 299475e0d9 staging: iio: remove odd structure definition.
I've no idea where this came from!
Also fixed form -> from in comment

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:19:01 -07:00
Jonathan Cameron 9dbfb6f14a staging: iio: Make use of the convenient IIO_TRIGGER_NAME_ATTR macro
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:19:01 -07:00
Jonathan Cameron 2d7770a942 staging: iio: Remove deprecated ATTR_TEMP in favour of ATTR_TEMP_RAW
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:19:00 -07:00
Jonathan Cameron 99e5dc45b8 staging: iio: Remove long dead function definitions from headers
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:19:00 -07:00
Jonathan Cameron c3e5d410bb staging: iio: unecessary header removal and kernel doc clean up
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:19:00 -07:00
Jonathan Cameron b6e5d69a9e staging: iio: simplify logic in iio_interrupt_handler
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:18:59 -07:00
Jonathan Cameron b156cf70e1 staging: iio: convert idr to ida as pointer never provided
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:18:59 -07:00
Manuel Stahl 11f05c7715 staging: iio: hmc5843 change ABI to comply with documentation
this one completes my last patch set to compile fine for all drivers.

Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Datta, Shubhrajyoti <shubhrajyoti@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:42:48 -07:00
Manuel Stahl 4f64b80144 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>
2010-08-31 11:42:03 -07:00
Manuel Stahl 51a0a5b021 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>
2010-08-31 11:42:02 -07:00
Manuel Stahl 5770b8ffaf staging: iio partial documentation update
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>
2010-08-31 11:42:02 -07:00
Manuel Stahl bf32963cbe staging: iio move scan_elements into ring buffer
tested with sca3000, adis16400

Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:42:02 -07:00