From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:48797 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752478AbbFCBQN (ORCPT ); Tue, 2 Jun 2015 21:16:13 -0400 Subject: Patch "iio: adc: xilinx: Fix VREFN sign" has been added to the 4.0-stable tree To: thomas.betker@rohde-schwarz.com, gregkh@linuxfoundation.org, jic23@kernel.org Cc: , From: Date: Wed, 03 Jun 2015 10:15:06 +0900 Message-ID: <143329410691175@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled iio: adc: xilinx: Fix VREFN sign to the 4.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: iio-adc-xilinx-fix-vrefn-sign.patch and it can be found in the queue-4.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 97ffae1d30c3f6ceee67d5b0d3e540c08c13c744 Mon Sep 17 00:00:00 2001 From: Thomas Betker Date: Wed, 15 Apr 2015 21:11:50 +0200 Subject: iio: adc: xilinx: Fix VREFN sign From: Thomas Betker 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 Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/xilinx-xadc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/adc/xilinx-xadc-core.c +++ b/drivers/iio/adc/xilinx-xadc-core.c @@ -997,7 +997,7 @@ static const struct iio_event_spec xadc_ .num_event_specs = (_alarm) ? ARRAY_SIZE(xadc_voltage_events) : 0, \ .scan_index = (_scan_index), \ .scan_type = { \ - .sign = 'u', \ + .sign = ((_addr) == XADC_REG_VREFN) ? 's' : 'u', \ .realbits = 12, \ .storagebits = 16, \ .shift = 4, \ Patches currently in stable-queue which might be from thomas.betker@rohde-schwarz.com are queue-4.0/iio-adc-xilinx-fix-register-addresses.patch queue-4.0/iio-adc-xilinx-fix-vccaux-channel-.address.patch queue-4.0/iio-adc-xilinx-fix-vrefp-scale.patch queue-4.0/iio-adc-xilinx-fix-vrefn-sign.patch