]> git.baikalelectronics.ru Git - kernel.git/commit
staging:iio:ad7298: Fix temperature scale and offset
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 15 Nov 2012 13:15:00 +0000 (13:15 +0000)
committerJonathan Cameron <jic23@kernel.org>
Mon, 19 Nov 2012 22:22:14 +0000 (22:22 +0000)
commit085509f38ac65086970f6272c296b9b432510354
tree2413f5793f97443af0511c32f64254e0da84ac72
parent6ec4da2409378b988db4916a406c2bae0ac39574
staging:iio:ad7298: Fix temperature scale and offset

The temperature scale and offset depend on the reference voltage, the current
formula used in the driver assumes a 2.5V reference. This patch modifies the
code to report the unprocessed value for the temperature channel "raw" property
and to provide proper "scale" and "offset" properties which depend on the
selected reference voltage.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7298_core.c