Patch "iio: pressure: mpl115: fix temperature offset sign" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: pressure: mpl115: fix temperature offset sign
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iio-pressure-mpl115-fix-temperature-offset-sign.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
431386e783a3a6c8b7707bee32d18c353b8688b2Mon Sep 17 00:00:00 2001
From: Akinobu Mita <[email protected]>
Date: Thu, 21 Jan 2016 01:07:31 +0900
Subject: iio: pressure: mpl115: fix temperature offset sign
From: Akinobu Mita <[email protected]>
commit 431386e783a3a6c8b7707bee32d18c353b8688b2 upstream.
According to the datasheet, the resolusion of temperature sensor is -5.35 counts/C. Temperature ADC is 472 counts at 25C.
(https://www.sparkfun.com/datasheets/Sensors/Pressure/MPL115A1.pdf
NOTE: This is older revision, but this information is removed from the latest datasheet from nxp somehow)
Temp [C] = (Tadc - 472) / -5.35 + 25
= (Tadc - 605.750000) * -0.186915888
So the correct offset is -605.750000.
--- drivers/iio/pressure/mpl115.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/pressure/mpl115.c +1 -1
@@ -117,7 +117,7 @@ static int mpl115_read_raw(struct iio_de *val = ret >>6 ;return IIO_VAL_INT ;case IIO_CHAN_INFO_OFFSET : - *val =605 ; + *val =-605 ; *val2 =750000 ;return IIO_VAL_INT_PLUS_MICRO ;case IIO_CHAN_INFO_SCALE :
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/iio-pressure-mpl115-fix-temperature-offset-sign.patch