summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/gyro
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-07-17 15:44:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-08-03 18:41:21 +0100
commitebdee941e24719b841dd5bd5df4620bdf1bcbe44 (patch)
tree924d9dfe5b99e2887d12145bbe8518e1064fb55c /drivers/staging/iio/gyro
parent9aa5aad8724fc7dd9d57a71d8894415850ed349f (diff)
staging:iio:adis16260: Add scale for the inclination channel
While the inclination channel claims to support reading the scale the driver did not implement this, so trying to read the scale results in a -EINVAL. This patch fixes it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/gyro')
-rw-r--r--drivers/staging/iio/gyro/adis16260_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c
index a140d73f688a..48b0e63939b1 100644
--- a/drivers/staging/iio/gyro/adis16260_core.c
+++ b/drivers/staging/iio/gyro/adis16260_core.c
@@ -241,6 +241,10 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
*val2 = IIO_DEGREE_TO_RAD(73260);
}
return IIO_VAL_INT_PLUS_MICRO;
+ case IIO_INCLI:
+ *val = 0;
+ *val2 = IIO_DEGREE_TO_RAD(36630);
+ return IIO_VAL_INT_PLUS_MICRO;
case IIO_VOLTAGE:
if (chan->channel == 0) {
*val = 1;