+1
−1
Loading
Previously, the driver always used the amount of precision bits of differential input channels to provide the scale to mV. Though, differential and common-mode voltage channels have different amount of precision bits and the correct number of precision bits must be considered to get to a proper mV scale factor for each one. Use channel specific number of precision bits to provide the correct scale value for each channel. Fixes: de67f28a ("iio: adc: ad4030: check scan_type for error") Fixes: 949abd1c ("iio: adc: ad4030: add averaging support") Signed-off-by:Marcelo Schmitt <marcelo.schmitt@analog.com> Reviewed-by:
David Lechner <dlechner@baylibre.com> Cc: <Stable@vger.kernel.org> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>