Skip to content

Commit e7f87b4

Browse files
committed
iio: adis16400: Report pressure channel scale
Add the scale for the pressure channel, which is currently missing. Signed-off-by: Lars-Peter Clausen <[email protected]>
1 parent 548f9a9 commit e7f87b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/iio/imu/adis16400_core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
404404
*val = st->variant->temp_scale_nano / 1000000;
405405
*val2 = (st->variant->temp_scale_nano % 1000000);
406406
return IIO_VAL_INT_PLUS_MICRO;
407+
case IIO_PRESSURE:
408+
/* 20 uBar = 0.002kPascal */
409+
*val = 0;
410+
*val2 = 2000;
411+
return IIO_VAL_INT_PLUS_MICRO;
407412
default:
408413
return -EINVAL;
409414
}

0 commit comments

Comments
 (0)