]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: stm32: add optional dma support
authorFabrice Gasnier <fabrice.gasnier@st.com>
Thu, 26 Jan 2017 14:28:33 +0000 (15:28 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 29 Jan 2017 12:49:17 +0000 (12:49 +0000)
commita80d0552af9c25df23f29758b98b98ba24965331
tree4447825df088c4ec4737046a4aff4d5519dc165d
parent3151cf1382ed1393bd9931dd47ce3df4b64441e2
iio: adc: stm32: add optional dma support

Add DMA optional support to STM32 ADC, as there is a limited number DMA
channels (request lines) that can be assigned to ADC. This way, driver
may fall back using interrupts when all DMA channels are in use for
other IPs.
Use dma cyclic mode with two periods. Allow to tune period length by
using watermark. Coherent memory is used for dma (max buffer size is
fixed to PAGE_SIZE).

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/Kconfig
drivers/iio/adc/stm32-adc-core.c
drivers/iio/adc/stm32-adc-core.h
drivers/iio/adc/stm32-adc.c