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: NIvan T. Ivanov <ivan.ivanov@linaro.org> Cc: <stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
Showing
想要评论请 注册 或 登录