]> 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)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 9 Jun 2015 18:31:41 +0000 (14:31 -0400)
commit88ee23a99440e0fc5f4abd3748d647486ff93c4f
tree2701f91ba6daa6792d5e05fdb6c2bd367539d1e5
parent3ec936bcf36f91348c08366ebd15d3241298d64f
iio: adc: xilinx: Fix VREFN sign

[ Upstream commit 97ffae1d30c3f6ceee67d5b0d3e540c08c13c744 ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/iio/adc/xilinx-xadc-core.c