1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2018, STMicroelectronics - All Rights Reserved
4 * Author: Fabrice Gasnier <fabrice.gasnier@st.com>.
6 * Originally based on the Linux kernel v4.18 drivers/iio/adc/stm32-adc-core.h.
13 * STM32 - ADC global register map
14 * ________________________________________________________
15 * | Offset | Register |
16 * --------------------------------------------------------
17 * | 0x000 | Master ADC1 |
18 * --------------------------------------------------------
19 * | 0x100 | Slave ADC2 |
20 * --------------------------------------------------------
21 * | 0x200 | Slave ADC3 |
22 * --------------------------------------------------------
23 * | 0x300 | Master & Slave common regs |
24 * --------------------------------------------------------
26 #define STM32_ADC_MAX_ADCS 3
27 #define STM32_ADCX_COMN_OFFSET 0x300
34 * struct stm32_adc_common - stm32 ADC driver common data (for all instances)
35 * @base: control registers base cpu addr
36 * @rate: clock rate used for analog circuitry
37 * @aclk: clock for the analog circuitry
38 * @bclk: bus clock common for all ADCs
39 * @vref: regulator reference
40 * @vref_uv: reference supply voltage (uV)
42 struct stm32_adc_common {