]> git.baikalelectronics.ru Git - kernel.git/commit
staging:iio:ad7793: Report channel offset
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)
committerJonathan Cameron <jic23@kernel.org>
Thu, 16 Aug 2012 19:24:34 +0000 (20:24 +0100)
commitba81d213fa525e69a0dffad93283ce82f07bc2c3
treef7a1ec3672c23a0d21cd36d82995643566d7bb19
parent3cf3ddae25bb1a9aefb1095e1544bbd4c179eb0e
staging:iio:ad7793: Report channel offset

In bipolar mode there is a a binary offset of 2**(N-1) (with N being the number
of bits) on the reported value. Currently this value is subtracted when doing a
manual read. While this works for manual channel readings it does not work for
buffered mode. So report the offset in the channels offset property, which will
work in both modes.

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