Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
iio: humidity: hdc100x: fix IIO_TEMP channel reporting
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
mranostay authored and jic23 committed May 29, 2016
1 parent d43a411 commit 09bc0dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/humidity/hdc100x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 09bc0dd

Please sign in to comment.