1
2
3
4
5
6
7
8
9
10 #ifndef __MFD_WM831X_GPIO_H__
11 #define __MFD_WM831X_GPIO_H__
12
13
14
15
16 #define WM831X_GPN_DIR 0x8000
17 #define WM831X_GPN_DIR_MASK 0x8000
18 #define WM831X_GPN_DIR_SHIFT 15
19 #define WM831X_GPN_DIR_WIDTH 1
20 #define WM831X_GPN_PULL_MASK 0x6000
21 #define WM831X_GPN_PULL_SHIFT 13
22 #define WM831X_GPN_PULL_WIDTH 2
23 #define WM831X_GPN_INT_MODE 0x1000
24 #define WM831X_GPN_INT_MODE_MASK 0x1000
25 #define WM831X_GPN_INT_MODE_SHIFT 12
26 #define WM831X_GPN_INT_MODE_WIDTH 1
27 #define WM831X_GPN_PWR_DOM 0x0800
28 #define WM831X_GPN_PWR_DOM_MASK 0x0800
29 #define WM831X_GPN_PWR_DOM_SHIFT 11
30 #define WM831X_GPN_PWR_DOM_WIDTH 1
31 #define WM831X_GPN_POL 0x0400
32 #define WM831X_GPN_POL_MASK 0x0400
33 #define WM831X_GPN_POL_SHIFT 10
34 #define WM831X_GPN_POL_WIDTH 1
35 #define WM831X_GPN_OD 0x0200
36 #define WM831X_GPN_OD_MASK 0x0200
37 #define WM831X_GPN_OD_SHIFT 9
38 #define WM831X_GPN_OD_WIDTH 1
39 #define WM831X_GPN_ENA 0x0080
40 #define WM831X_GPN_ENA_MASK 0x0080
41 #define WM831X_GPN_ENA_SHIFT 7
42 #define WM831X_GPN_ENA_WIDTH 1
43 #define WM831X_GPN_TRI 0x0080
44 #define WM831X_GPN_TRI_MASK 0x0080
45 #define WM831X_GPN_TRI_SHIFT 7
46 #define WM831X_GPN_TRI_WIDTH 1
47 #define WM831X_GPN_FN_MASK 0x000F
48 #define WM831X_GPN_FN_SHIFT 0
49 #define WM831X_GPN_FN_WIDTH 4
50
51 #define WM831X_GPIO_PULL_NONE (0 << WM831X_GPN_PULL_SHIFT)
52 #define WM831X_GPIO_PULL_DOWN (1 << WM831X_GPN_PULL_SHIFT)
53 #define WM831X_GPIO_PULL_UP (2 << WM831X_GPN_PULL_SHIFT)
54 #endif