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.15-rc3~39^2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad44a9f804c1591ba2a2ec0ac8d916a515d2790c;p=thirdparty%2Fkernel%2Flinux.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 203ffb9cad6a2..147a8c14235f3 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;