summaryrefslogtreecommitdiffstats
path: root/drivers/iio/humidity
diff options
context:
space:
mode:
authorMatt Ranostay <mranostay@gmail.com>2015-09-26 23:18:57 -0700
committerJonathan Cameron <jic23@kernel.org>2015-10-11 13:53:20 +0100
commitd3a21ce0c60365991e59bbe848457c08f0c3c7ca (patch)
tree86cfdefa79aa10a55f541a1898d61507ce7a23f2 /drivers/iio/humidity
parent18a16b5e26c74dda2881c8f2977d702fd0e13fda (diff)
downloadlinux-d3a21ce0c60365991e59bbe848457c08f0c3c7ca.tar.gz
linux-d3a21ce0c60365991e59bbe848457c08f0c3c7ca.tar.bz2
linux-d3a21ce0c60365991e59bbe848457c08f0c3c7ca.zip
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>
Diffstat (limited to 'drivers/iio/humidity')
-rw-r--r--drivers/iio/humidity/hdc100x.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index 28245782ecfb..a7f61e881a49 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -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;
}