Go to the documentation of this file.
15 #ifndef __MFD_WM831X_PMU_H__
16 #define __MFD_WM831X_PMU_H__
21 #define WM831X_CHIP_ON 0x8000
22 #define WM831X_CHIP_ON_MASK 0x8000
23 #define WM831X_CHIP_ON_SHIFT 15
24 #define WM831X_CHIP_ON_WIDTH 1
25 #define WM831X_CHIP_SLP 0x4000
26 #define WM831X_CHIP_SLP_MASK 0x4000
27 #define WM831X_CHIP_SLP_SHIFT 14
28 #define WM831X_CHIP_SLP_WIDTH 1
29 #define WM831X_REF_LP 0x1000
30 #define WM831X_REF_LP_MASK 0x1000
31 #define WM831X_REF_LP_SHIFT 12
32 #define WM831X_REF_LP_WIDTH 1
33 #define WM831X_PWRSTATE_DLY_MASK 0x0C00
34 #define WM831X_PWRSTATE_DLY_SHIFT 10
35 #define WM831X_PWRSTATE_DLY_WIDTH 2
36 #define WM831X_SWRST_DLY 0x0200
37 #define WM831X_SWRST_DLY_MASK 0x0200
38 #define WM831X_SWRST_DLY_SHIFT 9
39 #define WM831X_SWRST_DLY_WIDTH 1
40 #define WM831X_USB100MA_STARTUP_MASK 0x0030
41 #define WM831X_USB100MA_STARTUP_SHIFT 4
42 #define WM831X_USB100MA_STARTUP_WIDTH 2
43 #define WM831X_USB_CURR_STS 0x0008
44 #define WM831X_USB_CURR_STS_MASK 0x0008
45 #define WM831X_USB_CURR_STS_SHIFT 3
46 #define WM831X_USB_CURR_STS_WIDTH 1
47 #define WM831X_USB_ILIM_MASK 0x0007
48 #define WM831X_USB_ILIM_SHIFT 0
49 #define WM831X_USB_ILIM_WIDTH 3
54 #define WM831X_THW_STS 0x8000
55 #define WM831X_THW_STS_MASK 0x8000
56 #define WM831X_THW_STS_SHIFT 15
57 #define WM831X_THW_STS_WIDTH 1
58 #define WM831X_PWR_SRC_BATT 0x0400
59 #define WM831X_PWR_SRC_BATT_MASK 0x0400
60 #define WM831X_PWR_SRC_BATT_SHIFT 10
61 #define WM831X_PWR_SRC_BATT_WIDTH 1
62 #define WM831X_PWR_WALL 0x0200
63 #define WM831X_PWR_WALL_MASK 0x0200
64 #define WM831X_PWR_WALL_SHIFT 9
65 #define WM831X_PWR_WALL_WIDTH 1
66 #define WM831X_PWR_USB 0x0100
67 #define WM831X_PWR_USB_MASK 0x0100
68 #define WM831X_PWR_USB_SHIFT 8
69 #define WM831X_PWR_USB_WIDTH 1
70 #define WM831X_MAIN_STATE_MASK 0x001F
71 #define WM831X_MAIN_STATE_SHIFT 0
72 #define WM831X_MAIN_STATE_WIDTH 5
77 #define WM831X_CHG_ENA 0x8000
78 #define WM831X_CHG_ENA_MASK 0x8000
79 #define WM831X_CHG_ENA_SHIFT 15
80 #define WM831X_CHG_ENA_WIDTH 1
81 #define WM831X_CHG_FRC 0x4000
82 #define WM831X_CHG_FRC_MASK 0x4000
83 #define WM831X_CHG_FRC_SHIFT 14
84 #define WM831X_CHG_FRC_WIDTH 1
85 #define WM831X_CHG_ITERM_MASK 0x1C00
86 #define WM831X_CHG_ITERM_SHIFT 10
87 #define WM831X_CHG_ITERM_WIDTH 3
88 #define WM831X_CHG_FAST 0x0020
89 #define WM831X_CHG_FAST_MASK 0x0020
90 #define WM831X_CHG_FAST_SHIFT 5
91 #define WM831X_CHG_FAST_WIDTH 1
92 #define WM831X_CHG_IMON_ENA 0x0002
93 #define WM831X_CHG_IMON_ENA_MASK 0x0002
94 #define WM831X_CHG_IMON_ENA_SHIFT 1
95 #define WM831X_CHG_IMON_ENA_WIDTH 1
96 #define WM831X_CHG_CHIP_TEMP_MON 0x0001
97 #define WM831X_CHG_CHIP_TEMP_MON_MASK 0x0001
98 #define WM831X_CHG_CHIP_TEMP_MON_SHIFT 0
99 #define WM831X_CHG_CHIP_TEMP_MON_WIDTH 1
104 #define WM831X_CHG_OFF_MSK 0x4000
105 #define WM831X_CHG_OFF_MSK_MASK 0x4000
106 #define WM831X_CHG_OFF_MSK_SHIFT 14
107 #define WM831X_CHG_OFF_MSK_WIDTH 1
108 #define WM831X_CHG_TIME_MASK 0x0F00
109 #define WM831X_CHG_TIME_SHIFT 8
110 #define WM831X_CHG_TIME_WIDTH 4
111 #define WM831X_CHG_TRKL_ILIM_MASK 0x00C0
112 #define WM831X_CHG_TRKL_ILIM_SHIFT 6
113 #define WM831X_CHG_TRKL_ILIM_WIDTH 2
114 #define WM831X_CHG_VSEL_MASK 0x0030
115 #define WM831X_CHG_VSEL_SHIFT 4
116 #define WM831X_CHG_VSEL_WIDTH 2
117 #define WM831X_CHG_FAST_ILIM_MASK 0x000F
118 #define WM831X_CHG_FAST_ILIM_SHIFT 0
119 #define WM831X_CHG_FAST_ILIM_WIDTH 4
124 #define WM831X_BATT_OV_STS 0x8000
125 #define WM831X_BATT_OV_STS_MASK 0x8000
126 #define WM831X_BATT_OV_STS_SHIFT 15
127 #define WM831X_BATT_OV_STS_WIDTH 1
128 #define WM831X_CHG_STATE_MASK 0x7000
129 #define WM831X_CHG_STATE_SHIFT 12
130 #define WM831X_CHG_STATE_WIDTH 3
131 #define WM831X_BATT_HOT_STS 0x0800
132 #define WM831X_BATT_HOT_STS_MASK 0x0800
133 #define WM831X_BATT_HOT_STS_SHIFT 11
134 #define WM831X_BATT_HOT_STS_WIDTH 1
135 #define WM831X_BATT_COLD_STS 0x0400
136 #define WM831X_BATT_COLD_STS_MASK 0x0400
137 #define WM831X_BATT_COLD_STS_SHIFT 10
138 #define WM831X_BATT_COLD_STS_WIDTH 1
139 #define WM831X_CHG_TOPOFF 0x0200
140 #define WM831X_CHG_TOPOFF_MASK 0x0200
141 #define WM831X_CHG_TOPOFF_SHIFT 9
142 #define WM831X_CHG_TOPOFF_WIDTH 1
143 #define WM831X_CHG_ACTIVE 0x0100
144 #define WM831X_CHG_ACTIVE_MASK 0x0100
145 #define WM831X_CHG_ACTIVE_SHIFT 8
146 #define WM831X_CHG_ACTIVE_WIDTH 1
147 #define WM831X_CHG_TIME_ELAPSED_MASK 0x00FF
148 #define WM831X_CHG_TIME_ELAPSED_SHIFT 0
149 #define WM831X_CHG_TIME_ELAPSED_WIDTH 8
151 #define WM831X_CHG_STATE_OFF (0 << WM831X_CHG_STATE_SHIFT)
152 #define WM831X_CHG_STATE_TRICKLE (1 << WM831X_CHG_STATE_SHIFT)
153 #define WM831X_CHG_STATE_FAST (2 << WM831X_CHG_STATE_SHIFT)
154 #define WM831X_CHG_STATE_TRICKLE_OT (3 << WM831X_CHG_STATE_SHIFT)
155 #define WM831X_CHG_STATE_FAST_OT (4 << WM831X_CHG_STATE_SHIFT)
156 #define WM831X_CHG_STATE_DEFECTIVE (5 << WM831X_CHG_STATE_SHIFT)
161 #define WM831X_BKUP_CHG_ENA 0x8000
162 #define WM831X_BKUP_CHG_ENA_MASK 0x8000
163 #define WM831X_BKUP_CHG_ENA_SHIFT 15
164 #define WM831X_BKUP_CHG_ENA_WIDTH 1
165 #define WM831X_BKUP_CHG_STS 0x4000
166 #define WM831X_BKUP_CHG_STS_MASK 0x4000
167 #define WM831X_BKUP_CHG_STS_SHIFT 14
168 #define WM831X_BKUP_CHG_STS_WIDTH 1
169 #define WM831X_BKUP_CHG_MODE 0x1000
170 #define WM831X_BKUP_CHG_MODE_MASK 0x1000
171 #define WM831X_BKUP_CHG_MODE_SHIFT 12
172 #define WM831X_BKUP_CHG_MODE_WIDTH 1
173 #define WM831X_BKUP_BATT_DET_ENA 0x0800
174 #define WM831X_BKUP_BATT_DET_ENA_MASK 0x0800
175 #define WM831X_BKUP_BATT_DET_ENA_SHIFT 11
176 #define WM831X_BKUP_BATT_DET_ENA_WIDTH 1
177 #define WM831X_BKUP_BATT_STS 0x0400
178 #define WM831X_BKUP_BATT_STS_MASK 0x0400
179 #define WM831X_BKUP_BATT_STS_SHIFT 10
180 #define WM831X_BKUP_BATT_STS_WIDTH 1
181 #define WM831X_BKUP_CHG_VLIM 0x0010
182 #define WM831X_BKUP_CHG_VLIM_MASK 0x0010
183 #define WM831X_BKUP_CHG_VLIM_SHIFT 4
184 #define WM831X_BKUP_CHG_VLIM_WIDTH 1
185 #define WM831X_BKUP_CHG_ILIM_MASK 0x0003
186 #define WM831X_BKUP_CHG_ILIM_SHIFT 0
187 #define WM831X_BKUP_CHG_ILIM_WIDTH 2