Commit ee365493 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jiri Slaby

iio: adis16400: Report pressure channel scale

commit 69ca2d77 upstream.

Add the scale for the pressure channel, which is currently missing.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Fixes: 76ada52f ("iio:adis16400: Add support for the adis16448")
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 90d8a568
...@@ -438,6 +438,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, ...@@ -438,6 +438,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
*val = st->variant->temp_scale_nano / 1000000; *val = st->variant->temp_scale_nano / 1000000;
*val2 = (st->variant->temp_scale_nano % 1000000); *val2 = (st->variant->temp_scale_nano % 1000000);
return IIO_VAL_INT_PLUS_MICRO; return IIO_VAL_INT_PLUS_MICRO;
case IIO_PRESSURE:
/* 20 uBar = 0.002kPascal */
*val = 0;
*val2 = 2000;
return IIO_VAL_INT_PLUS_MICRO;
default: default:
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment