From 9cc80ff80f5ea5f1ff35122f61afaa7b11ad22ae Mon Sep 17 00:00:00 2001 From: Olivier Moysan Date: Wed, 11 Sep 2019 16:12:07 +0200 Subject: [PATCH] iio: adc: stm32-dfsdm: fix single conversion 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") Change-Id: Ief3dd068cf9eb95afa864bbde9e2c46629137f99 Signed-off-by: Olivier Moysan Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/142921 Reviewed-by: Fabrice GASNIER --- drivers/iio/adc/stm32-dfsdm-adc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c index faefcf6eca0786..ae6b1667ce74fc 100644 --- a/drivers/iio/adc/stm32-dfsdm-adc.c +++ b/drivers/iio/adc/stm32-dfsdm-adc.c @@ -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);