aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/power/max8907c-charger.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /include/linux/power/max8907c-charger.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'include/linux/power/max8907c-charger.h')
-rw-r--r--include/linux/power/max8907c-charger.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/include/linux/power/max8907c-charger.h b/include/linux/power/max8907c-charger.h
new file mode 100644
index 00000000000..2cebad768b0
--- /dev/null
+++ b/include/linux/power/max8907c-charger.h
@@ -0,0 +1,64 @@
1/* linux/power/max8907c-charger.h
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 as
5 * published by the Free Software Foundation.
6 */
7
8#ifndef __LINUX_MAX8907C_CHARGER_H
9#define __LINUX_MAX8907C_CHARGER_H
10
11/* interrupt */
12#define MAX8907C_VCHG_OVP (1 << 0)
13#define MAX8907C_VCHG_F (1 << 1)
14#define MAX8907C_VCHG_R (1 << 2)
15#define MAX8907C_THM_OK_R (1 << 8)
16#define MAX8907C_THM_OK_F (1 << 9)
17#define MAX8907C_MBATTLOW_F (1 << 10)
18#define MAX8907C_MBATTLOW_R (1 << 11)
19#define MAX8907C_CHG_RST (1 << 12)
20#define MAX8907C_CHG_DONE (1 << 13)
21#define MAX8907C_CHG_TOPOFF (1 << 14)
22#define MAX8907C_CHK_TMR_FAULT (1 << 15)
23
24enum max8907c_charger_topoff_threshold {
25 MAX8907C_TOPOFF_5PERCENT = 0x00,
26 MAX8907C_TOPOFF_10PERCENT = 0x01,
27 MAX8907C_TOPOFF_15PERCENT = 0x02,
28 MAX8907C_TOPOFF_20PERCENT = 0x03,
29};
30
31enum max8907c_charger_restart_hysteresis {
32 MAX8907C_RESTART_100MV = 0x00,
33 MAX8907C_RESTART_150MV = 0x01,
34 MAX8907C_RESTART_200MV = 0x02,
35 MAX8907C_RESTART_FLOAT = 0x03,
36};
37
38enum max8907c_fast_charging_current {
39 MAX8907C_FASTCHARGE_90MA = 0x00,
40 MAX8907C_FASTCHARGE_300MA = 0x01,
41 MAX8907C_FASTCHARGE_460MA = 0x02,
42 MAX8907C_FASTCHARGE_600MA = 0x03,
43 MAX8907C_FASTCHARGE_700MA = 0x04,
44 MAX8907C_FASTCHARGE_800MA = 0x05,
45 MAX8907C_FASTCHARGE_900MA = 0x06,
46 MAX8907C_FASTCHARGE_1000MA = 0x07,
47};
48
49enum max8907c_fast_charger_time {
50 MAX8907C_FCHARGE_TM_8H = 0x00,
51 MAX8907C_FCHARGE_TM_12H = 0x01,
52 MAX8907C_FCHARGE_TM_16H = 0x02,
53 MAX8907C_FCHARGE_TM_OFF = 0x03,
54};
55
56struct max8907c_charger_pdata {
57 int irq;
58 enum max8907c_charger_topoff_threshold topoff_threshold;
59 enum max8907c_charger_restart_hysteresis restart_hysteresis;
60 enum max8907c_charger_restart_hysteresis fast_charging_current;
61 enum max8907c_fast_charger_time fast_charger_time;
62};
63
64#endif