diff options
author | Matt Ranostay <mranostay@gmail.com> | 2016-05-26 22:55:06 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-05-29 14:45:54 -0400 |
commit | 09bc0ddaab6cab0fa95a67d5535ec772e2671193 (patch) | |
tree | 398c6449d0ec6541d760dce49362b480d1f1c661 | |
parent | d43a41152f8e9e4c0d19850884d1fada076dee10 (diff) |
iio: humidity: hdc100x: fix IIO_TEMP channel reporting
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>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/humidity/hdc100x.c | 2 |
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, | |||
211 | return IIO_VAL_INT_PLUS_MICRO; | 211 | return IIO_VAL_INT_PLUS_MICRO; |
212 | case IIO_CHAN_INFO_SCALE: | 212 | case IIO_CHAN_INFO_SCALE: |
213 | if (chan->type == IIO_TEMP) { | 213 | if (chan->type == IIO_TEMP) { |
214 | *val = 165; | 214 | *val = 165000; |
215 | *val2 = 65536 >> 2; | 215 | *val2 = 65536 >> 2; |
216 | return IIO_VAL_FRACTIONAL; | 216 | return IIO_VAL_FRACTIONAL; |
217 | } else { | 217 | } else { |