stm32l: fix ADC all channels conversion

Reset the DMA status after the end of the conversions,
else we will exit too early at the next call of the function and the
values before they are actually transfered.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=none
BUG=none
TEST=run "adc" command several times and always see proper value for
each ADC.

Change-Id: I7ad335fffa2da34a4b715e9f0c9927bf06baef8f
Reviewed-on: https://chromium-review.googlesource.com/174397
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Vincent Palatin
2013-10-24 17:30:01 -07:00
committed by chrome-internal-fetch
parent 5ef2054c38
commit a88b237729

View File

@@ -196,6 +196,7 @@ int adc_read_all_channels(int *data)
ret = EC_ERROR_UNKNOWN;
goto exit_all_channels;
}
dma_clear_isr(STM32_DMAC_ADC);
for (i = 0; i < ADC_CH_COUNT; ++i) {
adc = adc_channels + i;