Flemmard | 1c4ca56 | 2013-10-11 16:08:21 +0200 | [diff] [blame] | 1 | #ifndef __MAX8903B_CHARGER_H__ |
| 2 | #define __MAX8903B_CHARGER_H__ |
| 3 | |
| 4 | #define MAX8903B_CONNECTED_PS_AC (1U << 1) |
| 5 | #define MAX8903B_CONNECTED_PS_USB (1U << 2) |
| 6 | #define MAX8903B_CONNECTED_PS_DOCK (1U << 3) |
| 7 | #define MAX8903B_DOCK_DRAW_MA 1400 |
Flemmard | edcfed5 | 2014-02-21 19:15:45 +0100 | [diff] [blame] | 8 | |
| 9 | enum max8903b_current { |
| 10 | CHARGE_DISABLE, |
| 11 | CURRENT_ZERO, |
| 12 | CURRENT_100MA, |
| 13 | CURRENT_500MA, |
| 14 | CURRENT_750MA, |
| 15 | CURRENT_900MA, |
| 16 | CURRENT_1000MA, |
| 17 | CURRENT_1400MA, |
| 18 | CURRENT_1500MA, |
| 19 | CURRENT_2000MA, |
| 20 | }; |
| 21 | |
| 22 | |
| 23 | struct max8903b_platform_data { |
| 24 | int DCM_in; |
| 25 | int DCM_in_polarity; |
| 26 | int IUSB_in; |
| 27 | int IUSB_in_polarity; |
| 28 | int USUS_in; |
| 29 | int USUS_in_polarity; |
| 30 | int CEN_N_in; |
| 31 | int CEN_N_in_polarity; |
| 32 | int DOK_N_out; |
| 33 | int CHG_N_out; |
| 34 | int FLT_N_out; |
| 35 | int (*set_DC_CHG_Mode_current)(enum max8903b_current value); |
| 36 | int (*request_release_gpios)(int request); |
| 37 | void (*suspend_gpio_config)(void); |
| 38 | }; |
| 39 | |
| 40 | void max8903b_set_charge_ma (unsigned ma); |
| 41 | void max8903b_disable_charge (void); |
| 42 | |
Flemmard | 1c4ca56 | 2013-10-11 16:08:21 +0200 | [diff] [blame] | 43 | #endif /* !__MAX8903B_CHARGER_H__ */ |
| 44 | |