]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jun 2015 15:20:55 +0000 (08:20 -0700)
commite8deb37e331584ba923eef712183b0ed75a6683f
treeab8777ddc80eaf993704278e9f96569204938657
parent0f8fc8090cce910c25c521b7cfa307c97f644e86
iio: adc: xilinx: Fix VREFN sign

commit 97ffae1d30c3f6ceee67d5b0d3e540c08c13c744 upstream.

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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/xilinx-xadc-core.c