staging: rtl8188eu: rename HalSetBrateCfg() - style
[linux/fpc-iii.git] / drivers / iio / adc / stm32-adc-core.h
blob8af507b3f32d914d70307bfff7e8819b4284581d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * This file is part of STM32 ADC driver
5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved
6 * Author: Fabrice Gasnier <fabrice.gasnier@st.com>.
8 */
10 #ifndef __STM32_ADC_H
11 #define __STM32_ADC_H
14 * STM32 - ADC global register map
15 * ________________________________________________________
16 * | Offset | Register |
17 * --------------------------------------------------------
18 * | 0x000 | Master ADC1 |
19 * --------------------------------------------------------
20 * | 0x100 | Slave ADC2 |
21 * --------------------------------------------------------
22 * | 0x200 | Slave ADC3 |
23 * --------------------------------------------------------
24 * | 0x300 | Master & Slave common regs |
25 * --------------------------------------------------------
27 #define STM32_ADC_MAX_ADCS 3
28 #define STM32_ADCX_COMN_OFFSET 0x300
30 /**
31 * struct stm32_adc_common - stm32 ADC driver common data (for all instances)
32 * @base: control registers base cpu addr
33 * @phys_base: control registers base physical addr
34 * @rate: clock rate used for analog circuitry
35 * @vref_mv: vref voltage (mv)
37 struct stm32_adc_common {
38 void __iomem *base;
39 phys_addr_t phys_base;
40 unsigned long rate;
41 int vref_mv;
44 #endif