Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] iio: adc: stm32-dfsdm: fix single conversion
@ 2019-11-27 13:07 Olivier Moysan
  2019-11-27 16:13 ` Fabrice Gasnier
  0 siblings, 1 reply; 2+ messages in thread
From: Olivier Moysan @ 2019-11-27 13:07 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, mcoquelin.stm32, alexandre.torgue,
	fabrice.gasnier, linux-iio, linux-stm32, linux-arm-kernel,
	linux-kernel, benjamin.gaignard, olivier.moysan

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>
---
changes in version 2:
- correct title
---
 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 e493242c266e..0339ecdd06bd 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);
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] iio: adc: stm32-dfsdm: fix single conversion
  2019-11-27 13:07 [PATCH v2] iio: adc: stm32-dfsdm: fix single conversion Olivier Moysan
@ 2019-11-27 16:13 ` Fabrice Gasnier
  0 siblings, 0 replies; 2+ messages in thread
From: Fabrice Gasnier @ 2019-11-27 16:13 UTC (permalink / raw)
  To: Olivier Moysan, jic23, knaack.h, lars, pmeerw, mcoquelin.stm32,
	alexandre.torgue, linux-iio, linux-stm32, linux-arm-kernel,
	linux-kernel, benjamin.gaignard

On 11/27/19 2:07 PM, Olivier Moysan wrote:
> 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>
Hi Olivier,

Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>

Thanks,
Fabrice

> ---
> changes in version 2:
> - correct title
> ---
>  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 e493242c266e..0339ecdd06bd 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);
>  
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 13:07 [PATCH v2] iio: adc: stm32-dfsdm: fix single conversion Olivier Moysan
2019-11-27 16:13 ` Fabrice Gasnier

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git