diff options
author | Fabrice Gasnier <fabrice.gasnier@st.com> | 2017-01-26 15:28:33 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-01-29 12:49:17 +0000 |
commit | 2763ea0585c999f0bd98d67cbeadee8d872103a2 (patch) | |
tree | 4447825df088c4ec4737046a4aff4d5519dc165d /drivers/iio/adc/stm32-adc-core.h | |
parent | 122b5f4580519b2e2563467a6dc9ac952f1d33da (diff) |
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>
Diffstat (limited to 'drivers/iio/adc/stm32-adc-core.h')
-rw-r--r-- | drivers/iio/adc/stm32-adc-core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/adc/stm32-adc-core.h b/drivers/iio/adc/stm32-adc-core.h index 081fa5f55015..2ec7abbfbcaa 100644 --- a/drivers/iio/adc/stm32-adc-core.h +++ b/drivers/iio/adc/stm32-adc-core.h @@ -42,10 +42,12 @@ /** * struct stm32_adc_common - stm32 ADC driver common data (for all instances) * @base: control registers base cpu addr + * @phys_base: control registers base physical addr * @vref_mv: vref voltage (mv) */ struct stm32_adc_common { void __iomem *base; + phys_addr_t phys_base; int vref_mv; }; |