Patch "iio: st_pressure: Fix data sign" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: st_pressure: Fix data sign
to the 4.9-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-st_pressure-fix-data-sign.patch
and it can be found in the queue-4.9 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
1b211d48abaa0e12e6e6177c0316ff55d11fdfceMon Sep 17 00:00:00 2001
From: Marcin Niestroj <[email protected]>
Date: Mon, 12 Dec 2016 17:58:42 +0100
Subject: iio: st_pressure: Fix data sign
From: Marcin Niestroj <[email protected]>
commit 1b211d48abaa0e12e6e6177c0316ff55d11fdfce upstream.
Datasheet of each device (lps331ap, lps25h, lps001wp, lps22hb) says that the pressure and temperature data is a 2's complement.
I'm sending this the slow way, as negative pressures on these are pretty unusual and the nature of the fixing of multiple device introduction patches will make it hard to apply to older kernels - Jonathan.
--- drivers/iio/pressure/st_pressure_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/pressure/st_pressure_core.c +5 -5
@@ -227,7 +227,7 @@ static const struct iio_chan_spec st_pre .address = ST_PRESS_1_OUT_XL_ADDR, .scan_index = 0, .scan_type = { - .sign = 'u', + .sign = 's', .realbits = 24, .storagebits = 32, .endianness = IIO_LE,
@@ -240,7 +240,7 @@ static const struct iio_chan_spec st_pre .address = ST_TEMP_1_OUT_L_ADDR, .scan_index = 1, .scan_type = { - .sign = 'u', + .sign = 's', .realbits = 16, .storagebits = 16, .endianness = IIO_LE,
@@ -259,7 +259,7 @@ static const struct iio_chan_spec st_pre .address = ST_PRESS_LPS001WP_OUT_L_ADDR, .scan_index = 0, .scan_type = { - .sign = 'u', + .sign = 's', .realbits = 16, .storagebits = 16, .endianness = IIO_LE,
@@ -273,7 +273,7 @@ static const struct iio_chan_spec st_pre .address = ST_TEMP_LPS001WP_OUT_L_ADDR, .scan_index = 1, .scan_type = { - .sign = 'u', + .sign = 's', .realbits = 16, .storagebits = 16, .endianness = IIO_LE,
@@ -291,7 +291,7 @@ static const struct iio_chan_spec st_pre .address = ST_PRESS_1_OUT_XL_ADDR, .scan_index = 0, .scan_type = { - .sign = 'u', + .sign = 's', .realbits = 24, .storagebits = 32, .endianness = IIO_LE,
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/iio-st_pressure-fix-data-sign.patch