iio: hdc100x: correct IIO_CHAN_INFO_OFFSET value
authorMatt Ranostay <mranostay@gmail.com>
Sun, 27 Sep 2015 06:18:57 +0000 (23:18 -0700)
committerJonathan Cameron <jic23@kernel.org>
Sun, 11 Oct 2015 12:53:20 +0000 (13:53 +0100)
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>
drivers/iio/humidity/hdc100x.c

index 28245782ecfbdac42c0fd09c31c6c107d3eb5d7e..a7f61e881a4901ed7d21b636f4bb0889716a7d62 100644 (file)
@@ -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;
        }
This page took 0.026893 seconds and 5 git commands to generate.