mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
iio: adis16400: Report pressure channel scale
commit69ca2d771eupstream. Add the scale for the pressure channel, which is currently missing. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Fixes:76ada52f7f("iio:adis16400: Add support for the adis16448") Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
762965a2f4
commit
3b9f2aa3a7
@@ -438,6 +438,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user