Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c68a67b7 authored by Crt Mori's avatar Crt Mori Committed by Jonathan Cameron
Browse files

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: default avatarCrt Mori <cmo@melexis.com>
Acked-by: default avatarPeter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 354c879d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -204,7 +204,7 @@ static int mlx90614_read_raw(struct iio_dev *indio_dev,
		*val = ret;
		*val = ret;
		return IIO_VAL_INT;
		return IIO_VAL_INT;
	case IIO_CHAN_INFO_OFFSET:
	case IIO_CHAN_INFO_OFFSET:
		*val = 13657;
		*val = -13657;
		*val2 = 500000;
		*val2 = 500000;
		return IIO_VAL_INT_PLUS_MICRO;
		return IIO_VAL_INT_PLUS_MICRO;
	case IIO_CHAN_INFO_SCALE:
	case IIO_CHAN_INFO_SCALE: