]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iio: adc: xilinx: Fix VREFN sign
authorThomas Betker <thomas.betker@rohde-schwarz.com>
Wed, 15 Apr 2015 19:11:50 +0000 (21:11 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 19 Apr 2015 12:49:54 +0000 (13:49 +0100)
commit97ffae1d30c3f6ceee67d5b0d3e540c08c13c744
tree43e5f8d6be608c740b89a2a7c4745e22059231c5
parent00db4e52f4541965f7fda225eb458a75f892017b
iio: adc: xilinx: Fix VREFN sign

The VREFN channel is bipolar, not unipolar. Small negative values do
occur (e.g., -1mV), and unsigned conversion maps them incorrectly to
large positive values (about +1V), so fix this.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/xilinx-xadc-core.c