]> xenbits.xensource.com Git - arm/linux.git/commitdiff
iio: adc: stm32-dfsdm: fix single conversion
authorOlivier Moysan <olivier.moysan@st.com>
Wed, 27 Nov 2019 13:07:29 +0000 (14:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2020 09:34:36 +0000 (09:34 +0000)
commit dc26935fb60e8da8d59655dd2ec0de47b20d7d8f upstream.

Apply data formatting to single conversion,
as this is already done in continuous and trigger modes.

Fixes: 102afde62937 ("iio: adc: stm32-dfsdm: manage data resolution in trigger mode")
Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Cc: <Stable@vger.kernel.org>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/stm32-dfsdm-adc.c

index e493242c266ef77d4ab854672716a2ffc45a170a..0339ecdd06bdff9061c0a73790ceaf7c367f3aa4 100644 (file)
@@ -1204,6 +1204,8 @@ static int stm32_dfsdm_single_conv(struct iio_dev *indio_dev,
 
        stm32_dfsdm_stop_conv(adc);
 
+       stm32_dfsdm_process_data(adc, res);
+
 stop_dfsdm:
        stm32_dfsdm_stop_dfsdm(adc->dfsdm);