blob: c8dc56057ca082fea7c384050b8bc04b2efc7afc [file] [log] [blame]
Flemmard1c4ca562013-10-11 16:08:21 +02001#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
Flemmardedcfed52014-02-21 19:15:45 +01008
9enum 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
23struct 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
40void max8903b_set_charge_ma (unsigned ma);
41void max8903b_disable_charge (void);
42
Flemmard1c4ca562013-10-11 16:08:21 +020043#endif /* !__MAX8903B_CHARGER_H__ */
44