iio: Fix two mpl3115 issues in measurement conversion
authorPeter Meerwald <pmeerw@pmeerw.net>
Tue, 20 May 2014 07:36:00 +0000 (08:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2014 19:17:36 +0000 (15:17 -0400)
commit5999ec53f60b270adf0a59edb63043fe60bc3464
treeed18d29f683c68fe300d72970fdd7eb4cb5d940f
parent9ab8ee47dd0ebd1b51acaa40bc3281cc58af6f6f
iio: Fix two mpl3115 issues in measurement conversion

commit d29f592929489d0a7c414396fae28119f3d280e1 upstream.

(i) pressure is 20-bit unsigned, not signed; the buffer description
is incorrect; for raw reads, this is just cosmetic

(ii) temperature is 12-bit signed, not 16-bit; this affects
readout of temperatures below zero as the sign bit is incorrectly
processed

reported via private mail

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reported-by: Robert Deliƫn <robert@delien.nl>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/pressure/mpl3115.c