summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <mranostay@gmail.com>2016-05-26 19:55:06 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-27 08:42:21 -0700
commitf5b3e8171c6249142308542007111a4a559772a8 (patch)
treef2136251fdd4c5f165dc9a2e1fbd265dd7d4759b
parent65a39273cf07603ffe8734557c83ac3ce8917253 (diff)
downloadlinux-stable-f5b3e8171c6249142308542007111a4a559772a8.tar.gz
linux-stable-f5b3e8171c6249142308542007111a4a559772a8.tar.bz2
linux-stable-f5b3e8171c6249142308542007111a4a559772a8.zip
iio: humidity: hdc100x: fix IIO_TEMP channel reporting
commit 09bc0ddaab6cab0fa95a67d5535ec772e2671193 upstream. IIO_TEMP channel was being incorrectly reported back as Celsius when it should have been milliCelsius. This is via an incorrect scale value being returned to userspace. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 59aa1cbdc2fd..30709838dcdc 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -211,7 +211,7 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
return IIO_VAL_INT_PLUS_MICRO;
case IIO_CHAN_INFO_SCALE:
if (chan->type == IIO_TEMP) {
- *val = 165;
+ *val = 165000;
*val2 = 65536 >> 2;
return IIO_VAL_FRACTIONAL;
} else {