Skip to content

Commit

Permalink
iio: mlx96014: Replace offset sign
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Crt Mori authored and Jonathan Cameron committed Jul 19, 2015
1 parent 354c879 commit c68a67b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/temperature/mlx90614.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c68a67b

Please sign in to comment.