diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-05-15 11:18:34 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-05-16 05:54:35 -0400 |
commit | 69ca2d771e4e709c5ae1125858e1246e77ef8b86 (patch) | |
tree | d6524419780b382b0aa8a3d066471d8f11cf70b1 /drivers/iio | |
parent | ec94efcdadab69f41d257a1054260f8295ab77ef (diff) |
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')
-rw-r--r-- | drivers/iio/imu/adis16400_core.c | 5 |
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, | |||
405 | *val = st->variant->temp_scale_nano / 1000000; | 405 | *val = st->variant->temp_scale_nano / 1000000; |
406 | *val2 = (st->variant->temp_scale_nano % 1000000); | 406 | *val2 = (st->variant->temp_scale_nano % 1000000); |
407 | return IIO_VAL_INT_PLUS_MICRO; | 407 | return IIO_VAL_INT_PLUS_MICRO; |
408 | case IIO_PRESSURE: | ||
409 | /* 20 uBar = 0.002kPascal */ | ||
410 | *val = 0; | ||
411 | *val2 = 2000; | ||
412 | return IIO_VAL_INT_PLUS_MICRO; | ||
408 | default: | 413 | default: |
409 | return -EINVAL; | 414 | return -EINVAL; |
410 | } | 415 | } |