From: Peter Meerwald-Stadler Date: Fri, 27 Oct 2017 19:45:31 +0000 (+0200) Subject: iio: health: max30102: Temperature should be in milli Celsius X-Git-Tag: v4.19~2037^2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad44a9f804c1591ba2a2ec0ac8d916a515d2790c;p=platform%2Fkernel%2Flinux-rpi3.git iio: health: max30102: Temperature should be in milli Celsius As per ABI temperature should be in milli Celsius after scaling, not Celsius Note on stable cc. This driver is breaking the standard IIO ABI. (JC) Signed-off-by: Peter Meerwald-Stadler Acked-by: Matt Ranostay Cc: Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c index 203ffb9..147a8c1 100644 --- a/drivers/iio/health/max30102.c +++ b/drivers/iio/health/max30102.c @@ -371,7 +371,7 @@ static int max30102_read_raw(struct iio_dev *indio_dev, mutex_unlock(&indio_dev->mlock); break; case IIO_CHAN_INFO_SCALE: - *val = 1; /* 0.0625 */ + *val = 1000; /* 62.5 */ *val2 = 16; ret = IIO_VAL_FRACTIONAL; break;