]> git.baikalelectronics.ru Git - kernel.git/commit
iio: st_pressure: Fix data sign
authorMarcin Niestroj <m.niestroj@grinn-global.com>
Mon, 12 Dec 2016 16:58:42 +0000 (17:58 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 30 Dec 2016 11:31:16 +0000 (11:31 +0000)
commit0bc67fad55dfa35e66a4ec87d6e5e976e31db9fd
tree2b29f375893dc56b7d5d235d8a792d1610542600
parent2b71ca94c2cb140fd2c2c702118bc4eb1fa83669
iio: st_pressure: Fix data sign

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.

Fixes: 3baf27c20b34 ("iio:pressure: Add STMicroelectronics pressures driver")
Fixes: cd0fb8b5e5db ("iio: pressure-core: st: Expand and rename LPS331AP's channel descriptor")
Fixes: f0c196fec048 ("iio: pressure: st: Add support for new LPS001WP pressure sensor")
Fixes: fef8b2b1c88d ("iio:st_pressure:initial lps22hb sensor support")
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/pressure/st_pressure_core.c