Commit d3a21ce0 authored by Matt Ranostay's avatar Matt Ranostay Committed by Jonathan Cameron

iio: hdc100x: correct IIO_CHAN_INFO_OFFSET value

Previous offset wasn't applied in the correct order and invalid.
This patchset fixes this issue, and also has the correct scale value
applied to the offset.
Signed-off-by: default avatarMatt Ranostay <mranostay@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 18a16b5e
...@@ -221,8 +221,9 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev, ...@@ -221,8 +221,9 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
} }
break; break;
case IIO_CHAN_INFO_OFFSET: case IIO_CHAN_INFO_OFFSET:
*val = -40; *val = -3971;
return IIO_VAL_INT; *val2 = 879096;
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