diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-09-02 17:14:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-06 16:01:59 -0700 |
commit | bd94c6a8a6d3499e857002b1f445162fba941029 (patch) | |
tree | f851384bb3c6c186c3ad28f78c7d044b37d016d6 /drivers/staging/iio/gyro/adis16260_core.c | |
parent | 8310b86c3cd2f813bb9ed330447bcb2877b8328a (diff) | |
download | linux-bd94c6a8a6d3499e857002b1f445162fba941029.tar.bz2 |
staging:iio:various move default scan mask setting after ring register or remove
The scan mask will be dynamically assigned in register, so don't
use it before that.
In adis16260 I've moved it as I know this driver has userspace code.
Same for sca3000 where it is cost free due to hardware buffer.
Can do that for the others, but in theory userspace code should always
have been checking these and setting them appropriately anyway!
V2: Clear default mask out of adis16400 as reported by Michael
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/gyro/adis16260_core.c')
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_core.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c index 6ea6d58fd1c2..acd17e50df57 100644 --- a/drivers/staging/iio/gyro/adis16260_core.c +++ b/drivers/staging/iio/gyro/adis16260_core.c @@ -636,7 +636,14 @@ static int __devinit adis16260_probe(struct spi_device *spi) printk(KERN_ERR "failed to initialize the ring\n"); goto error_unreg_ring_funcs; } - + if (indio_dev->ring) { + /* Set default scan mode */ + iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_SUPPLY); + iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_GYRO); + iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_AUX_ADC); + iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_TEMP); + iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_ANGL); + } if (spi->irq) { ret = adis16260_probe_trigger(indio_dev); if (ret) |