summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/adc/ad7780.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-08-10 17:36:00 +0100
committerJonathan Cameron <jic23@kernel.org>2012-08-16 20:24:37 +0100
commit4fcbcf95b775acc430742a09fb3334dce08b6c10 (patch)
tree4bf7af6363578ea6bd1e94bf8615d4f422a7f836 /drivers/staging/iio/adc/ad7780.c
parent58cdff6ee71b4ea00a6b822a52ebf9ceb0b6a7d5 (diff)
staging:iio:ad7192: Report offset and scale for temperature channel
The temperature channel reports values in degree Kelvin with sensitivity of 5630 codes per degree. If the chip is configured in bipolar mode there is an additional binary offset of 0x800000 and the sensitivity is divided by two. Currently the driver does the mapping from the raw value to degree Celsius when doing a manual conversion. This has several disadvantages, the major one being that it does not work for buffered mode, also by doing the division by the sensitivity in the driver the precession of the reported value is needlessly reduced. Furthermore the current calculation only works in bipolar mode and the current scale is of by a factor of 1000. This patch modifies the driver to report correct offset and scale values in both unipolar and bipolar mode and to report the raw temperature value for manual conversions. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/adc/ad7780.c')
0 files changed, 0 insertions, 0 deletions