]> git.baikalelectronics.ru Git - kernel.git/commit
iio: pressure: bmp280: fix temp compensation
authorIrina Tirdea <irina.tirdea@intel.com>
Wed, 8 Apr 2015 15:26:12 +0000 (18:26 +0300)
committerJonathan Cameron <jic23@kernel.org>
Thu, 9 Apr 2015 11:54:10 +0000 (12:54 +0100)
commit56959d67390501b21364bd26dbf97b5473e771c3
treee0442b139200afcf71c3f0ff32204d9f3e9d4335
parent6c693f194ee86a6a9d7e28fbce09cfe932dbc5eb
iio: pressure: bmp280: fix temp compensation

Temperature reads on bmp280 device always return 0,
due to a missing step in the compensation formula
(data->tfine is never initialized).

Initialize data->tfine value so we get correct
temperature and pressure values.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/pressure/bmp280.c