diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/power/isp1704_charger.h | 29 | ||||
-rw-r--r-- | include/linux/power/max8903_charger.h | 57 |
2 files changed, 86 insertions, 0 deletions
diff --git a/include/linux/power/isp1704_charger.h b/include/linux/power/isp1704_charger.h new file mode 100644 index 000000000000..68096a6aa2d7 --- /dev/null +++ b/include/linux/power/isp1704_charger.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * ISP1704 USB Charger Detection driver | ||
3 | * | ||
4 | * Copyright (C) 2011 Nokia Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | |||
22 | #ifndef __ISP1704_CHARGER_H | ||
23 | #define __ISP1704_CHARGER_H | ||
24 | |||
25 | struct isp1704_charger_data { | ||
26 | void (*set_power)(bool on); | ||
27 | }; | ||
28 | |||
29 | #endif | ||
diff --git a/include/linux/power/max8903_charger.h b/include/linux/power/max8903_charger.h new file mode 100644 index 000000000000..24f51db8a83f --- /dev/null +++ b/include/linux/power/max8903_charger.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * max8903_charger.h - Maxim 8903 USB/Adapter Charger Driver | ||
3 | * | ||
4 | * Copyright (C) 2011 Samsung Electronics | ||
5 | * MyungJoo Ham <myungjoo.ham@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef __MAX8903_CHARGER_H__ | ||
24 | #define __MAX8903_CHARGER_H__ | ||
25 | |||
26 | struct max8903_pdata { | ||
27 | /* | ||
28 | * GPIOs | ||
29 | * cen, chg, flt, and usus are optional. | ||
30 | * dok, dcm, and uok are not optional depending on the status of | ||
31 | * dc_valid and usb_valid. | ||
32 | */ | ||
33 | int cen; /* Charger Enable input */ | ||
34 | int dok; /* DC(Adapter) Power OK output */ | ||
35 | int uok; /* USB Power OK output */ | ||
36 | int chg; /* Charger status output */ | ||
37 | int flt; /* Fault output */ | ||
38 | int dcm; /* Current-Limit Mode input (1: DC, 2: USB) */ | ||
39 | int usus; /* USB Suspend Input (1: suspended) */ | ||
40 | |||
41 | /* | ||
42 | * DC(Adapter/TA) is wired | ||
43 | * When dc_valid is true, | ||
44 | * dok and dcm should be valid. | ||
45 | * | ||
46 | * At least one of dc_valid or usb_valid should be true. | ||
47 | */ | ||
48 | bool dc_valid; | ||
49 | /* | ||
50 | * USB is wired | ||
51 | * When usb_valid is true, | ||
52 | * uok should be valid. | ||
53 | */ | ||
54 | bool usb_valid; | ||
55 | }; | ||
56 | |||
57 | #endif /* __MAX8903_CHARGER_H__ */ | ||