Go to the documentation of this file.
15 #define KEY_LCK_EC_STAT 0x03
16 #define Key_EVENTA 0x04
17 #define Key_EVENTB 0x05
18 #define Key_EVENTC 0x06
19 #define Key_EVENTD 0x07
20 #define Key_EVENTE 0x08
21 #define Key_EVENTF 0x09
22 #define Key_EVENTG 0x0A
23 #define Key_EVENTH 0x0B
24 #define Key_EVENTI 0x0C
25 #define Key_EVENTJ 0x0D
26 #define KP_LCK_TMR 0x0E
29 #define GPIO_INT_STAT1 0x11
30 #define GPIO_INT_STAT2 0x12
31 #define GPIO_INT_STAT3 0x13
32 #define GPIO_DAT_STAT1 0x14
33 #define GPIO_DAT_STAT2 0x15
34 #define GPIO_DAT_STAT3 0x16
35 #define GPIO_DAT_OUT1 0x17
36 #define GPIO_DAT_OUT2 0x18
37 #define GPIO_DAT_OUT3 0x19
38 #define GPIO_INT_EN1 0x1A
39 #define GPIO_INT_EN2 0x1B
40 #define GPIO_INT_EN3 0x1C
47 #define GPIO_DIR1 0x23
48 #define GPIO_DIR2 0x24
49 #define GPIO_DIR3 0x25
50 #define GPIO_INT_LVL1 0x26
51 #define GPIO_INT_LVL2 0x27
52 #define GPIO_INT_LVL3 0x28
53 #define Debounce_DIS1 0x29
54 #define Debounce_DIS2 0x2A
55 #define Debounce_DIS3 0x2B
56 #define GPIO_PULL1 0x2C
57 #define GPIO_PULL2 0x2D
58 #define GPIO_PULL3 0x2E
59 #define CMP_CFG_STAT 0x30
60 #define CMP_CONFG_SENS1 0x31
61 #define CMP_CONFG_SENS2 0x32
62 #define CMP1_LVL2_TRIP 0x33
63 #define CMP1_LVL2_HYS 0x34
64 #define CMP1_LVL3_TRIP 0x35
65 #define CMP1_LVL3_HYS 0x36
66 #define CMP2_LVL2_TRIP 0x37
67 #define CMP2_LVL2_HYS 0x38
68 #define CMP2_LVL3_TRIP 0x39
69 #define CMP2_LVL3_HYS 0x3A
70 #define CMP1_ADC_DAT_R1 0x3B
71 #define CMP1_ADC_DAT_R2 0x3C
72 #define CMP2_ADC_DAT_R1 0x3D
73 #define CMP2_ADC_DAT_R2 0x3E
75 #define ADP5588_DEVICE_ID_MASK 0xF
78 #define ADP5588_AUTO_INC (1 << 7)
79 #define ADP5588_GPIEM_CFG (1 << 6)
80 #define ADP5588_OVR_FLOW_M (1 << 5)
81 #define ADP5588_INT_CFG (1 << 4)
82 #define ADP5588_OVR_FLOW_IEN (1 << 3)
83 #define ADP5588_K_LCK_IM (1 << 2)
84 #define ADP5588_GPI_IEN (1 << 1)
85 #define ADP5588_KE_IEN (1 << 0)
88 #define ADP5588_CMP2_INT (1 << 5)
89 #define ADP5588_CMP1_INT (1 << 4)
90 #define ADP5588_OVR_FLOW_INT (1 << 3)
91 #define ADP5588_K_LCK_INT (1 << 2)
92 #define ADP5588_GPI_INT (1 << 1)
93 #define ADP5588_KE_INT (1 << 0)
96 #define ADP5588_K_LCK_EN (1 << 6)
97 #define ADP5588_LCK21 0x30
98 #define ADP5588_KEC 0xF
100 #define ADP5588_MAXGPIO 18
101 #define ADP5588_BANK(offs) ((offs) >> 3)
102 #define ADP5588_BIT(offs) (1u << ((offs) & 0x7))
106 #define ADP5588_KEYMAPSIZE 80
108 #define GPI_PIN_ROW0 97
109 #define GPI_PIN_ROW1 98
110 #define GPI_PIN_ROW2 99
111 #define GPI_PIN_ROW3 100
112 #define GPI_PIN_ROW4 101
113 #define GPI_PIN_ROW5 102
114 #define GPI_PIN_ROW6 103
115 #define GPI_PIN_ROW7 104
116 #define GPI_PIN_COL0 105
117 #define GPI_PIN_COL1 106
118 #define GPI_PIN_COL2 107
119 #define GPI_PIN_COL3 108
120 #define GPI_PIN_COL4 109
121 #define GPI_PIN_COL5 110
122 #define GPI_PIN_COL6 111
123 #define GPI_PIN_COL7 112
124 #define GPI_PIN_COL8 113
125 #define GPI_PIN_COL9 114
127 #define GPI_PIN_ROW_BASE GPI_PIN_ROW0
128 #define GPI_PIN_ROW_END GPI_PIN_ROW7
129 #define GPI_PIN_COL_BASE GPI_PIN_COL0
130 #define GPI_PIN_COL_END GPI_PIN_COL9
132 #define GPI_PIN_BASE GPI_PIN_ROW_BASE
133 #define GPI_PIN_END GPI_PIN_COL_END
135 #define ADP5588_GPIMAPSIZE_MAX (GPI_PIN_END - GPI_PIN_BASE + 1)
164 int gpio,
unsigned ngpio,
167 int gpio,
unsigned ngpio,