1
2
3
4
5
6
7
8
9 #ifndef __STM32_DAC_CORE_H
10 #define __STM32_DAC_CORE_H
11
12 #include <linux/regmap.h>
13
14
15 #define STM32_DAC_CR 0x00
16 #define STM32_DAC_DHR12R1 0x08
17 #define STM32_DAC_DHR12R2 0x14
18 #define STM32_DAC_DOR1 0x2C
19 #define STM32_DAC_DOR2 0x30
20
21
22 #define STM32_DAC_CR_EN1 BIT(0)
23 #define STM32H7_DAC_CR_HFSEL BIT(15)
24 #define STM32_DAC_CR_EN2 BIT(16)
25
26
27
28
29
30
31
32 struct stm32_dac_common {
33 struct regmap *regmap;
34 int vref_mv;
35 bool hfsel;
36 };
37
38 #endif