summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorChris Lesiak <chris.lesiak@licor.com>2019-11-21 21:39:42 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-12-08 19:10:29 +0100
commit342a6928bd5017edbdae376042d8ad6af3d3b943 (patch)
treeabb4b41afa00741a301dcc97ec440a592da8cba5 /drivers/iio
parentiio: adc: max1027: fix not unregistered iio trigger (diff)
downloadlinux-342a6928bd5017edbdae376042d8ad6af3d3b943.tar.xz
linux-342a6928bd5017edbdae376042d8ad6af3d3b943.zip
iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting
The IIO_HUMIDITYRELATIVE channel was being incorrectly reported back as percent when it should have been milli percent. This is via an incorrect scale value being returned to userspace. Signed-off-by: Chris Lesiak <chris.lesiak@licor.com> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/humidity/hdc100x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index 963ff043eecf..7ecd2ffa3132 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -229,7 +229,7 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
*val2 = 65536;
return IIO_VAL_FRACTIONAL;
} else {
- *val = 100;
+ *val = 100000;
*val2 = 65536;
return IIO_VAL_FRACTIONAL;
}