iio: mlx96014: Replace offset sign
authorCrt Mori <cmo@melexis.com>
Sun, 5 Jul 2015 18:03:53 +0000 (20:03 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 19 Jul 2015 11:23:39 +0000 (12:23 +0100)
Changed the offset to negative as usual equation is: (raw +
offset)*scale and in this
case offset should be negative (as we deduct 273.15 Kelvin to get temperature
in Celsius).

Signed-off-by: Crt Mori <cmo@melexis.com>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/temperature/mlx90614.c

index cb2e8ad..7a2b639 100644 (file)
@@ -204,7 +204,7 @@ static int mlx90614_read_raw(struct iio_dev *indio_dev,
                *val = ret;
                return IIO_VAL_INT;
        case IIO_CHAN_INFO_OFFSET:
-               *val = 13657;
+               *val = -13657;
                *val2 = 500000;
                return IIO_VAL_INT_PLUS_MICRO;
        case IIO_CHAN_INFO_SCALE: