mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
staging:iio:adis16260: Add scale for the inclination channel
While the inclination channel claims to support reading the scale the driver did not implement this, so trying to read the scale results in a -EINVAL. This patch fixes it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
9aa5aad872
commit
ebdee941e2
1 changed files with 4 additions and 0 deletions
|
@ -241,6 +241,10 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
|
|||
*val2 = IIO_DEGREE_TO_RAD(73260);
|
||||
}
|
||||
return IIO_VAL_INT_PLUS_MICRO;
|
||||
case IIO_INCLI:
|
||||
*val = 0;
|
||||
*val2 = IIO_DEGREE_TO_RAD(36630);
|
||||
return IIO_VAL_INT_PLUS_MICRO;
|
||||
case IIO_VOLTAGE:
|
||||
if (chan->channel == 0) {
|
||||
*val = 1;
|
||||
|
|
Loading…
Reference in a new issue