]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iio: adis16400: Report pressure channel scale
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 15 May 2015 15:18:34 +0000 (17:18 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 16 May 2015 09:54:35 +0000 (10:54 +0100)
Add the scale for the pressure channel, which is currently missing.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Fixes: 76ada52f7f5d ("iio:adis16400: Add support for the adis16448")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/adis16400_core.c

index fa795dcd5f75ec0a1e8de143bc0122ef36bf9409..8de6427121e253ed7d504c6e66bfae1bb51cf5e6 100644 (file)
@@ -405,6 +405,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
                        *val = st->variant->temp_scale_nano / 1000000;
                        *val2 = (st->variant->temp_scale_nano % 1000000);
                        return IIO_VAL_INT_PLUS_MICRO;
+               case IIO_PRESSURE:
+                       /* 20 uBar = 0.002kPascal */
+                       *val = 0;
+                       *val2 = 2000;
+                       return IIO_VAL_INT_PLUS_MICRO;
                default:
                        return -EINVAL;
                }