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: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Matt Ranostay 2015-09-26 23:18:57 -07:00 committed by Jonathan Cameron
parent 18a16b5e26
commit d3a21ce0c6
1 changed files with 3 additions and 2 deletions

View File

@ -221,8 +221,9 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
}
break;
case IIO_CHAN_INFO_OFFSET:
*val = -40;
return IIO_VAL_INT;
*val = -3971;
*val2 = 879096;
return IIO_VAL_INT_PLUS_MICRO;
default:
return -EINVAL;
}