commit | 937125aca00e0478c4024afe58bc620a7bbe2a93 | [log] [tgz] |
---|---|---|
author | Ivan T. Ivanov <ivan.ivanov@linaro.org> | Fri Apr 17 17:51:08 2015 +0300 |
committer | Jonathan Cameron <jic23@kernel.org> | Sat Apr 18 17:40:04 2015 +0100 |
tree | 7ceaa11e4a3e80d4e773b9a4a4cdf3cafc5000a9 | |
parent | d0716b0ea4ce11a13477163c14b26e180922ba51 [diff] |
iio: adc: spmi-vadc: Fix overflow in output value normalization With 'dx' equal to 0.625V and 15 bit ADC, calculations overflow when difference against GND is ~20% of the ADC range. Fix this. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Cc: <stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>