2 * Functions and registers to access AXP20X power management chip.
4 * Copyright (C) 2013, Carlo Caione <carlo@caione.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #ifndef __LINUX_MFD_AXP20X_H
12 #define __LINUX_MFD_AXP20X_H
14 #include <linux/regmap.h>
16 enum axp20x_variants {
30 #define AXP20X_DATACACHE(m) (0x04 + (m))
33 #define AXP152_PWR_OP_MODE 0x01
34 #define AXP152_LDO3456_DC1234_CTRL 0x12
35 #define AXP152_ALDO_OP_MODE 0x13
36 #define AXP152_LDO0_CTRL 0x15
37 #define AXP152_DCDC2_V_OUT 0x23
38 #define AXP152_DCDC2_V_SCAL 0x25
39 #define AXP152_DCDC1_V_OUT 0x26
40 #define AXP152_DCDC3_V_OUT 0x27
41 #define AXP152_ALDO12_V_OUT 0x28
42 #define AXP152_DLDO1_V_OUT 0x29
43 #define AXP152_DLDO2_V_OUT 0x2a
44 #define AXP152_DCDC4_V_OUT 0x2b
45 #define AXP152_V_OFF 0x31
46 #define AXP152_OFF_CTRL 0x32
47 #define AXP152_PEK_KEY 0x36
48 #define AXP152_DCDC_FREQ 0x37
49 #define AXP152_DCDC_MODE 0x80
51 #define AXP20X_PWR_INPUT_STATUS 0x00
52 #define AXP20X_PWR_OP_MODE 0x01
53 #define AXP20X_USB_OTG_STATUS 0x02
54 #define AXP20X_PWR_OUT_CTRL 0x12
55 #define AXP20X_DCDC2_V_OUT 0x23
56 #define AXP20X_DCDC2_LDO3_V_SCAL 0x25
57 #define AXP20X_DCDC3_V_OUT 0x27
58 #define AXP20X_LDO24_V_OUT 0x28
59 #define AXP20X_LDO3_V_OUT 0x29
60 #define AXP20X_VBUS_IPSOUT_MGMT 0x30
61 #define AXP20X_V_OFF 0x31
62 #define AXP20X_OFF_CTRL 0x32
63 #define AXP20X_CHRG_CTRL1 0x33
64 #define AXP20X_CHRG_CTRL2 0x34
65 #define AXP20X_CHRG_BAK_CTRL 0x35
66 #define AXP20X_PEK_KEY 0x36
67 #define AXP20X_DCDC_FREQ 0x37
68 #define AXP20X_V_LTF_CHRG 0x38
69 #define AXP20X_V_HTF_CHRG 0x39
70 #define AXP20X_APS_WARN_L1 0x3a
71 #define AXP20X_APS_WARN_L2 0x3b
72 #define AXP20X_V_LTF_DISCHRG 0x3c
73 #define AXP20X_V_HTF_DISCHRG 0x3d
75 #define AXP22X_PWR_OUT_CTRL1 0x10
76 #define AXP22X_PWR_OUT_CTRL2 0x12
77 #define AXP22X_PWR_OUT_CTRL3 0x13
78 #define AXP22X_DLDO1_V_OUT 0x15
79 #define AXP22X_DLDO2_V_OUT 0x16
80 #define AXP22X_DLDO3_V_OUT 0x17
81 #define AXP22X_DLDO4_V_OUT 0x18
82 #define AXP22X_ELDO1_V_OUT 0x19
83 #define AXP22X_ELDO2_V_OUT 0x1a
84 #define AXP22X_ELDO3_V_OUT 0x1b
85 #define AXP22X_DC5LDO_V_OUT 0x1c
86 #define AXP22X_DCDC1_V_OUT 0x21
87 #define AXP22X_DCDC2_V_OUT 0x22
88 #define AXP22X_DCDC3_V_OUT 0x23
89 #define AXP22X_DCDC4_V_OUT 0x24
90 #define AXP22X_DCDC5_V_OUT 0x25
91 #define AXP22X_DCDC23_V_RAMP_CTRL 0x27
92 #define AXP22X_ALDO1_V_OUT 0x28
93 #define AXP22X_ALDO2_V_OUT 0x29
94 #define AXP22X_ALDO3_V_OUT 0x2a
95 #define AXP22X_CHRG_CTRL3 0x35
97 #define AXP806_STARTUP_SRC 0x00
98 #define AXP806_CHIP_ID 0x03
99 #define AXP806_PWR_OUT_CTRL1 0x10
100 #define AXP806_PWR_OUT_CTRL2 0x11
101 #define AXP806_DCDCA_V_CTRL 0x12
102 #define AXP806_DCDCB_V_CTRL 0x13
103 #define AXP806_DCDCC_V_CTRL 0x14
104 #define AXP806_DCDCD_V_CTRL 0x15
105 #define AXP806_DCDCE_V_CTRL 0x16
106 #define AXP806_ALDO1_V_CTRL 0x17
107 #define AXP806_ALDO2_V_CTRL 0x18
108 #define AXP806_ALDO3_V_CTRL 0x19
109 #define AXP806_DCDC_MODE_CTRL1 0x1a
110 #define AXP806_DCDC_MODE_CTRL2 0x1b
111 #define AXP806_DCDC_FREQ_CTRL 0x1c
112 #define AXP806_BLDO1_V_CTRL 0x20
113 #define AXP806_BLDO2_V_CTRL 0x21
114 #define AXP806_BLDO3_V_CTRL 0x22
115 #define AXP806_BLDO4_V_CTRL 0x23
116 #define AXP806_CLDO1_V_CTRL 0x24
117 #define AXP806_CLDO2_V_CTRL 0x25
118 #define AXP806_CLDO3_V_CTRL 0x26
119 #define AXP806_VREF_TEMP_WARN_L 0xf3
120 #define AXP806_BUS_ADDR_EXT 0xfe
121 #define AXP806_REG_ADDR_EXT 0xff
123 #define AXP803_POLYPHASE_CTRL 0x14
124 #define AXP803_FLDO1_V_OUT 0x1c
125 #define AXP803_FLDO2_V_OUT 0x1d
126 #define AXP803_DCDC1_V_OUT 0x20
127 #define AXP803_DCDC2_V_OUT 0x21
128 #define AXP803_DCDC3_V_OUT 0x22
129 #define AXP803_DCDC4_V_OUT 0x23
130 #define AXP803_DCDC5_V_OUT 0x24
131 #define AXP803_DCDC6_V_OUT 0x25
132 #define AXP803_DCDC_FREQ_CTRL 0x3b
134 /* Other DCDC regulator control registers are the same as AXP803 */
135 #define AXP813_DCDC7_V_OUT 0x26
138 #define AXP152_IRQ1_EN 0x40
139 #define AXP152_IRQ2_EN 0x41
140 #define AXP152_IRQ3_EN 0x42
141 #define AXP152_IRQ1_STATE 0x48
142 #define AXP152_IRQ2_STATE 0x49
143 #define AXP152_IRQ3_STATE 0x4a
145 #define AXP20X_IRQ1_EN 0x40
146 #define AXP20X_IRQ2_EN 0x41
147 #define AXP20X_IRQ3_EN 0x42
148 #define AXP20X_IRQ4_EN 0x43
149 #define AXP20X_IRQ5_EN 0x44
150 #define AXP20X_IRQ6_EN 0x45
151 #define AXP20X_IRQ1_STATE 0x48
152 #define AXP20X_IRQ2_STATE 0x49
153 #define AXP20X_IRQ3_STATE 0x4a
154 #define AXP20X_IRQ4_STATE 0x4b
155 #define AXP20X_IRQ5_STATE 0x4c
156 #define AXP20X_IRQ6_STATE 0x4d
159 #define AXP20X_ACIN_V_ADC_H 0x56
160 #define AXP20X_ACIN_V_ADC_L 0x57
161 #define AXP20X_ACIN_I_ADC_H 0x58
162 #define AXP20X_ACIN_I_ADC_L 0x59
163 #define AXP20X_VBUS_V_ADC_H 0x5a
164 #define AXP20X_VBUS_V_ADC_L 0x5b
165 #define AXP20X_VBUS_I_ADC_H 0x5c
166 #define AXP20X_VBUS_I_ADC_L 0x5d
167 #define AXP20X_TEMP_ADC_H 0x5e
168 #define AXP20X_TEMP_ADC_L 0x5f
169 #define AXP20X_TS_IN_H 0x62
170 #define AXP20X_TS_IN_L 0x63
171 #define AXP20X_GPIO0_V_ADC_H 0x64
172 #define AXP20X_GPIO0_V_ADC_L 0x65
173 #define AXP20X_GPIO1_V_ADC_H 0x66
174 #define AXP20X_GPIO1_V_ADC_L 0x67
175 #define AXP20X_PWR_BATT_H 0x70
176 #define AXP20X_PWR_BATT_M 0x71
177 #define AXP20X_PWR_BATT_L 0x72
178 #define AXP20X_BATT_V_H 0x78
179 #define AXP20X_BATT_V_L 0x79
180 #define AXP20X_BATT_CHRG_I_H 0x7a
181 #define AXP20X_BATT_CHRG_I_L 0x7b
182 #define AXP20X_BATT_DISCHRG_I_H 0x7c
183 #define AXP20X_BATT_DISCHRG_I_L 0x7d
184 #define AXP20X_IPSOUT_V_HIGH_H 0x7e
185 #define AXP20X_IPSOUT_V_HIGH_L 0x7f
188 #define AXP20X_DCDC_MODE 0x80
189 #define AXP20X_ADC_EN1 0x82
190 #define AXP20X_ADC_EN2 0x83
191 #define AXP20X_ADC_RATE 0x84
192 #define AXP20X_GPIO10_IN_RANGE 0x85
193 #define AXP20X_GPIO1_ADC_IRQ_RIS 0x86
194 #define AXP20X_GPIO1_ADC_IRQ_FAL 0x87
195 #define AXP20X_TIMER_CTRL 0x8a
196 #define AXP20X_VBUS_MON 0x8b
197 #define AXP20X_OVER_TMP 0x8f
199 #define AXP22X_PWREN_CTRL1 0x8c
200 #define AXP22X_PWREN_CTRL2 0x8d
203 #define AXP152_GPIO0_CTRL 0x90
204 #define AXP152_GPIO1_CTRL 0x91
205 #define AXP152_GPIO2_CTRL 0x92
206 #define AXP152_GPIO3_CTRL 0x93
207 #define AXP152_LDOGPIO2_V_OUT 0x96
208 #define AXP152_GPIO_INPUT 0x97
209 #define AXP152_PWM0_FREQ_X 0x98
210 #define AXP152_PWM0_FREQ_Y 0x99
211 #define AXP152_PWM0_DUTY_CYCLE 0x9a
212 #define AXP152_PWM1_FREQ_X 0x9b
213 #define AXP152_PWM1_FREQ_Y 0x9c
214 #define AXP152_PWM1_DUTY_CYCLE 0x9d
216 #define AXP20X_GPIO0_CTRL 0x90
217 #define AXP20X_LDO5_V_OUT 0x91
218 #define AXP20X_GPIO1_CTRL 0x92
219 #define AXP20X_GPIO2_CTRL 0x93
220 #define AXP20X_GPIO20_SS 0x94
221 #define AXP20X_GPIO3_CTRL 0x95
223 #define AXP22X_LDO_IO0_V_OUT 0x91
224 #define AXP22X_LDO_IO1_V_OUT 0x93
225 #define AXP22X_GPIO_STATE 0x94
226 #define AXP22X_GPIO_PULL_DOWN 0x95
229 #define AXP20X_CHRG_CC_31_24 0xb0
230 #define AXP20X_CHRG_CC_23_16 0xb1
231 #define AXP20X_CHRG_CC_15_8 0xb2
232 #define AXP20X_CHRG_CC_7_0 0xb3
233 #define AXP20X_DISCHRG_CC_31_24 0xb4
234 #define AXP20X_DISCHRG_CC_23_16 0xb5
235 #define AXP20X_DISCHRG_CC_15_8 0xb6
236 #define AXP20X_DISCHRG_CC_7_0 0xb7
237 #define AXP20X_CC_CTRL 0xb8
238 #define AXP20X_FG_RES 0xb9
241 #define AXP20X_RDC_H 0xba
242 #define AXP20X_RDC_L 0xbb
243 #define AXP20X_OCV(m) (0xc0 + (m))
244 #define AXP20X_OCV_MAX 0xf
246 /* AXP22X specific registers */
247 #define AXP22X_PMIC_TEMP_H 0x56
248 #define AXP22X_PMIC_TEMP_L 0x57
249 #define AXP22X_TS_ADC_H 0x58
250 #define AXP22X_TS_ADC_L 0x59
251 #define AXP22X_BATLOW_THRES1 0xe6
253 /* AXP288/AXP803 specific registers */
254 #define AXP288_POWER_REASON 0x02
255 #define AXP288_BC_GLOBAL 0x2c
256 #define AXP288_BC_VBUS_CNTL 0x2d
257 #define AXP288_BC_USB_STAT 0x2e
258 #define AXP288_BC_DET_STAT 0x2f
259 #define AXP288_PMIC_ADC_H 0x56
260 #define AXP288_PMIC_ADC_L 0x57
261 #define AXP288_TS_ADC_H 0x58
262 #define AXP288_TS_ADC_L 0x59
263 #define AXP288_GP_ADC_H 0x5a
264 #define AXP288_GP_ADC_L 0x5b
265 #define AXP288_ADC_TS_PIN_CTRL 0x84
266 #define AXP288_RT_BATT_V_H 0xa0
267 #define AXP288_RT_BATT_V_L 0xa1
269 #define AXP813_ACIN_PATH_CTRL 0x3a
270 #define AXP813_ADC_RATE 0x85
273 #define AXP288_FG_RDC1_REG 0xba
274 #define AXP288_FG_RDC0_REG 0xbb
275 #define AXP288_FG_OCVH_REG 0xbc
276 #define AXP288_FG_OCVL_REG 0xbd
277 #define AXP288_FG_OCV_CURVE_REG 0xc0
278 #define AXP288_FG_DES_CAP1_REG 0xe0
279 #define AXP288_FG_DES_CAP0_REG 0xe1
280 #define AXP288_FG_CC_MTR1_REG 0xe2
281 #define AXP288_FG_CC_MTR0_REG 0xe3
282 #define AXP288_FG_OCV_CAP_REG 0xe4
283 #define AXP288_FG_CC_CAP_REG 0xe5
284 #define AXP288_FG_LOW_CAP_REG 0xe6
285 #define AXP288_FG_TUNE0 0xe8
286 #define AXP288_FG_TUNE1 0xe9
287 #define AXP288_FG_TUNE2 0xea
288 #define AXP288_FG_TUNE3 0xeb
289 #define AXP288_FG_TUNE4 0xec
290 #define AXP288_FG_TUNE5 0xed
427 AXP152_IRQ_LDO0IN_CONNECT = 1,
428 AXP152_IRQ_LDO0IN_REMOVAL,
429 AXP152_IRQ_ALDO0IN_CONNECT,
430 AXP152_IRQ_ALDO0IN_REMOVAL,
431 AXP152_IRQ_DCDC1_V_LOW,
432 AXP152_IRQ_DCDC2_V_LOW,
433 AXP152_IRQ_DCDC3_V_LOW,
434 AXP152_IRQ_DCDC4_V_LOW,
435 AXP152_IRQ_PEK_SHORT,
438 AXP152_IRQ_PEK_RIS_EDGE,
439 AXP152_IRQ_PEK_FAL_EDGE,
440 AXP152_IRQ_GPIO3_INPUT,
441 AXP152_IRQ_GPIO2_INPUT,
442 AXP152_IRQ_GPIO1_INPUT,
443 AXP152_IRQ_GPIO0_INPUT,
447 AXP20X_IRQ_ACIN_OVER_V = 1,
448 AXP20X_IRQ_ACIN_PLUGIN,
449 AXP20X_IRQ_ACIN_REMOVAL,
450 AXP20X_IRQ_VBUS_OVER_V,
451 AXP20X_IRQ_VBUS_PLUGIN,
452 AXP20X_IRQ_VBUS_REMOVAL,
453 AXP20X_IRQ_VBUS_V_LOW,
454 AXP20X_IRQ_BATT_PLUGIN,
455 AXP20X_IRQ_BATT_REMOVAL,
456 AXP20X_IRQ_BATT_ENT_ACT_MODE,
457 AXP20X_IRQ_BATT_EXIT_ACT_MODE,
459 AXP20X_IRQ_CHARG_DONE,
460 AXP20X_IRQ_BATT_TEMP_HIGH,
461 AXP20X_IRQ_BATT_TEMP_LOW,
462 AXP20X_IRQ_DIE_TEMP_HIGH,
463 AXP20X_IRQ_CHARG_I_LOW,
464 AXP20X_IRQ_DCDC1_V_LONG,
465 AXP20X_IRQ_DCDC2_V_LONG,
466 AXP20X_IRQ_DCDC3_V_LONG,
467 AXP20X_IRQ_PEK_SHORT = 22,
469 AXP20X_IRQ_N_OE_PWR_ON,
470 AXP20X_IRQ_N_OE_PWR_OFF,
471 AXP20X_IRQ_VBUS_VALID,
472 AXP20X_IRQ_VBUS_NOT_VALID,
473 AXP20X_IRQ_VBUS_SESS_VALID,
474 AXP20X_IRQ_VBUS_SESS_END,
475 AXP20X_IRQ_LOW_PWR_LVL1,
476 AXP20X_IRQ_LOW_PWR_LVL2,
478 AXP20X_IRQ_PEK_RIS_EDGE,
479 AXP20X_IRQ_PEK_FAL_EDGE,
480 AXP20X_IRQ_GPIO3_INPUT,
481 AXP20X_IRQ_GPIO2_INPUT,
482 AXP20X_IRQ_GPIO1_INPUT,
483 AXP20X_IRQ_GPIO0_INPUT,
487 AXP22X_IRQ_ACIN_OVER_V = 1,
488 AXP22X_IRQ_ACIN_PLUGIN,
489 AXP22X_IRQ_ACIN_REMOVAL,
490 AXP22X_IRQ_VBUS_OVER_V,
491 AXP22X_IRQ_VBUS_PLUGIN,
492 AXP22X_IRQ_VBUS_REMOVAL,
493 AXP22X_IRQ_VBUS_V_LOW,
494 AXP22X_IRQ_BATT_PLUGIN,
495 AXP22X_IRQ_BATT_REMOVAL,
496 AXP22X_IRQ_BATT_ENT_ACT_MODE,
497 AXP22X_IRQ_BATT_EXIT_ACT_MODE,
499 AXP22X_IRQ_CHARG_DONE,
500 AXP22X_IRQ_BATT_TEMP_HIGH,
501 AXP22X_IRQ_BATT_TEMP_LOW,
502 AXP22X_IRQ_DIE_TEMP_HIGH,
503 AXP22X_IRQ_PEK_SHORT,
505 AXP22X_IRQ_LOW_PWR_LVL1,
506 AXP22X_IRQ_LOW_PWR_LVL2,
508 AXP22X_IRQ_PEK_RIS_EDGE,
509 AXP22X_IRQ_PEK_FAL_EDGE,
510 AXP22X_IRQ_GPIO1_INPUT,
511 AXP22X_IRQ_GPIO0_INPUT,
515 AXP288_IRQ_VBUS_FALL = 2,
516 AXP288_IRQ_VBUS_RISE,
518 AXP288_IRQ_FALLING_ALT,
519 AXP288_IRQ_RISING_ALT,
521 AXP288_IRQ_DONE = 10,
523 AXP288_IRQ_SAFE_QUIT,
524 AXP288_IRQ_SAFE_ENTER,
548 AXP288_IRQ_BC_USB_CHNG,
552 AXP803_IRQ_ACIN_OVER_V = 1,
553 AXP803_IRQ_ACIN_PLUGIN,
554 AXP803_IRQ_ACIN_REMOVAL,
555 AXP803_IRQ_VBUS_OVER_V,
556 AXP803_IRQ_VBUS_PLUGIN,
557 AXP803_IRQ_VBUS_REMOVAL,
558 AXP803_IRQ_BATT_PLUGIN,
559 AXP803_IRQ_BATT_REMOVAL,
560 AXP803_IRQ_BATT_ENT_ACT_MODE,
561 AXP803_IRQ_BATT_EXIT_ACT_MODE,
563 AXP803_IRQ_CHARG_DONE,
564 AXP803_IRQ_BATT_CHG_TEMP_HIGH,
565 AXP803_IRQ_BATT_CHG_TEMP_HIGH_END,
566 AXP803_IRQ_BATT_CHG_TEMP_LOW,
567 AXP803_IRQ_BATT_CHG_TEMP_LOW_END,
568 AXP803_IRQ_BATT_ACT_TEMP_HIGH,
569 AXP803_IRQ_BATT_ACT_TEMP_HIGH_END,
570 AXP803_IRQ_BATT_ACT_TEMP_LOW,
571 AXP803_IRQ_BATT_ACT_TEMP_LOW_END,
572 AXP803_IRQ_DIE_TEMP_HIGH,
574 AXP803_IRQ_LOW_PWR_LVL1,
575 AXP803_IRQ_LOW_PWR_LVL2,
577 AXP803_IRQ_PEK_RIS_EDGE,
578 AXP803_IRQ_PEK_FAL_EDGE,
579 AXP803_IRQ_PEK_SHORT,
581 AXP803_IRQ_PEK_OVER_OFF,
582 AXP803_IRQ_GPIO1_INPUT,
583 AXP803_IRQ_GPIO0_INPUT,
584 AXP803_IRQ_BC_USB_CHNG,
589 AXP806_IRQ_DIE_TEMP_HIGH_LV1,
590 AXP806_IRQ_DIE_TEMP_HIGH_LV2,
591 AXP806_IRQ_DCDCA_V_LOW,
592 AXP806_IRQ_DCDCB_V_LOW,
593 AXP806_IRQ_DCDCC_V_LOW,
594 AXP806_IRQ_DCDCD_V_LOW,
595 AXP806_IRQ_DCDCE_V_LOW,
597 AXP806_IRQ_POK_SHORT,
604 AXP809_IRQ_ACIN_OVER_V = 1,
605 AXP809_IRQ_ACIN_PLUGIN,
606 AXP809_IRQ_ACIN_REMOVAL,
607 AXP809_IRQ_VBUS_OVER_V,
608 AXP809_IRQ_VBUS_PLUGIN,
609 AXP809_IRQ_VBUS_REMOVAL,
610 AXP809_IRQ_VBUS_V_LOW,
611 AXP809_IRQ_BATT_PLUGIN,
612 AXP809_IRQ_BATT_REMOVAL,
613 AXP809_IRQ_BATT_ENT_ACT_MODE,
614 AXP809_IRQ_BATT_EXIT_ACT_MODE,
616 AXP809_IRQ_CHARG_DONE,
617 AXP809_IRQ_BATT_CHG_TEMP_HIGH,
618 AXP809_IRQ_BATT_CHG_TEMP_HIGH_END,
619 AXP809_IRQ_BATT_CHG_TEMP_LOW,
620 AXP809_IRQ_BATT_CHG_TEMP_LOW_END,
621 AXP809_IRQ_BATT_ACT_TEMP_HIGH,
622 AXP809_IRQ_BATT_ACT_TEMP_HIGH_END,
623 AXP809_IRQ_BATT_ACT_TEMP_LOW,
624 AXP809_IRQ_BATT_ACT_TEMP_LOW_END,
625 AXP809_IRQ_DIE_TEMP_HIGH,
626 AXP809_IRQ_LOW_PWR_LVL1,
627 AXP809_IRQ_LOW_PWR_LVL2,
629 AXP809_IRQ_PEK_RIS_EDGE,
630 AXP809_IRQ_PEK_FAL_EDGE,
631 AXP809_IRQ_PEK_SHORT,
633 AXP809_IRQ_PEK_OVER_OFF,
634 AXP809_IRQ_GPIO1_INPUT,
635 AXP809_IRQ_GPIO0_INPUT,
641 unsigned long irq_flags;
642 struct regmap *regmap;
643 struct regmap_irq_chip_data *regmap_irqc;
646 const struct mfd_cell *cells;
647 const struct regmap_config *regmap_cfg;
648 const struct regmap_irq_chip *regmap_irq_chip;
651 /* generic helper function for reading 9-16 bit wide regs */
652 static inline int axp20x_read_variable_width(struct regmap *regmap,
653 unsigned int reg, unsigned int width)
655 unsigned int reg_val, result;
658 err = regmap_read(regmap, reg, ®_val);
662 result = reg_val << (width - 8);
664 err = regmap_read(regmap, reg + 1, ®_val);
674 * axp20x_match_device(): Setup axp20x variant related fields
676 * @axp20x: axp20x device to setup (.dev field must be set)
677 * @dev: device associated with this axp20x device
679 * This lets the axp20x core configure the mfd cells and register maps
682 int axp20x_match_device(struct axp20x_dev *axp20x);
685 * axp20x_device_probe(): Probe a configured axp20x device
687 * @axp20x: axp20x device to probe (must be configured)
689 * This function lets the axp20x core register the axp20x mfd devices
690 * and irqchip. The axp20x device passed in must be fully configured
691 * with axp20x_match_device, its irq set, and regmap created.
693 int axp20x_device_probe(struct axp20x_dev *axp20x);
696 * axp20x_device_remove(): Remove a axp20x device
698 * @axp20x: axp20x device to remove
700 * This tells the axp20x core to remove the associated mfd devices
702 int axp20x_device_remove(struct axp20x_dev *axp20x);
704 #endif /* __LINUX_MFD_AXP20X_H */