]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
staging:iio:adis16260: Add scale for the inclination channel
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 3 Aug 2013 17:41:21 +0000 (18:41 +0100)
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>
drivers/staging/iio/gyro/adis16260_core.c

index a140d73f688a5d073bfa407e85317d448bbb1ce6..48b0e63939b172e9d12aca7ea0eadc9ac5fa39de 100644 (file)
@@ -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;