summaryrefslogtreecommitdiffstats
path: root/drivers/iio/imu
diff options
context:
space:
mode:
authorLars-Peter Clausen2015-05-15 17:18:34 +0200
committerJonathan Cameron2015-05-16 11:54:35 +0200
commit69ca2d771e4e709c5ae1125858e1246e77ef8b86 (patch)
treed6524419780b382b0aa8a3d066471d8f11cf70b1 /drivers/iio/imu
parentMerge tag 'iio-fixes-for-4.1a-take2' of git://git.kernel.org/pub/scm/linux/ke... (diff)
downloadkernel-qcow2-linux-69ca2d771e4e709c5ae1125858e1246e77ef8b86.tar.gz
kernel-qcow2-linux-69ca2d771e4e709c5ae1125858e1246e77ef8b86.tar.xz
kernel-qcow2-linux-69ca2d771e4e709c5ae1125858e1246e77ef8b86.zip
iio: adis16400: Report pressure channel scale
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>
Diffstat (limited to 'drivers/iio/imu')
-rw-r--r--drivers/iio/imu/adis16400_core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index fa795dcd5f75..8de6427121e2 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -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;
}