Skip to content

Commit 69ca2d7

Browse files
larsclausenjic23
authored andcommitted
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]> Fixes: 76ada52 ("iio:adis16400: Add support for the adis16448") Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent ec94efc commit 69ca2d7

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
@@ -405,6 +405,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
405405
*val = st->variant->temp_scale_nano / 1000000;
406406
*val2 = (st->variant->temp_scale_nano % 1000000);
407407
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;
408413
default:
409414
return -EINVAL;
410415
}

0 commit comments

Comments
 (0)