diff options
author | Crt Mori <cmo@melexis.com> | 2015-07-05 20:03:53 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-07-19 12:23:39 +0100 |
commit | c68a67b7adeec240bd79780635dc0ce74d0cb61a (patch) | |
tree | e24292057c35b9b0395f0ed46c2d19c9acd582fb /drivers/iio/temperature | |
parent | 354c879dbd9393ac411049f968474f2bf6c2a495 (diff) | |
download | linux-c68a67b7adeec240bd79780635dc0ce74d0cb61a.tar.bz2 |
iio: mlx96014: Replace offset sign
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>
Diffstat (limited to 'drivers/iio/temperature')
-rw-r--r-- | drivers/iio/temperature/mlx90614.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/temperature/mlx90614.c b/drivers/iio/temperature/mlx90614.c index cb2e8ad8bfdc..7a2b639eaa96 100644 --- a/drivers/iio/temperature/mlx90614.c +++ b/drivers/iio/temperature/mlx90614.c @@ -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: |