summaryrefslogtreecommitdiff
path: root/include/linux/power
diff options
context:
space:
mode:
authorTom Cherry <tcherry@nvidia.com>2011-01-05 11:51:13 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:43:08 -0800
commit88a2475142fe6044acb50781a44e368782622af8 (patch)
treeb5397122c9a6fc6a21eb4efe5ee50e8d6dd257f6 /include/linux/power
parent0e5eec3307ce47cb03f9405b1c227b400611b24b (diff)
max8907c Charger Driver
max8907c Charger Driver from maxim plus nvidia modifications Integration from http://git-master/r/#change,15043 Original-Change-Id: I8143fee9c99b43ad1089613236410dc8ad5bbca0 Reviewed-on: http://git-master/r/16134 Tested-by: Thomas Cherry <tcherry@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R14961f2b240e4d3019836231b1be9e719b5f478b
Diffstat (limited to 'include/linux/power')
-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 000000000000..2cebad768b0d
--- /dev/null
+++ b/include/linux/power/max8907c-charger.h
@@ -0,0 +1,64 @@
+/* linux/power/max8907c-charger.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __LINUX_MAX8907C_CHARGER_H
+#define __LINUX_MAX8907C_CHARGER_H
+
+/* interrupt */
+#define MAX8907C_VCHG_OVP (1 << 0)
+#define MAX8907C_VCHG_F (1 << 1)
+#define MAX8907C_VCHG_R (1 << 2)
+#define MAX8907C_THM_OK_R (1 << 8)
+#define MAX8907C_THM_OK_F (1 << 9)
+#define MAX8907C_MBATTLOW_F (1 << 10)
+#define MAX8907C_MBATTLOW_R (1 << 11)
+#define MAX8907C_CHG_RST (1 << 12)
+#define MAX8907C_CHG_DONE (1 << 13)
+#define MAX8907C_CHG_TOPOFF (1 << 14)
+#define MAX8907C_CHK_TMR_FAULT (1 << 15)
+
+enum max8907c_charger_topoff_threshold {
+ MAX8907C_TOPOFF_5PERCENT = 0x00,
+ MAX8907C_TOPOFF_10PERCENT = 0x01,
+ MAX8907C_TOPOFF_15PERCENT = 0x02,
+ MAX8907C_TOPOFF_20PERCENT = 0x03,
+};
+
+enum max8907c_charger_restart_hysteresis {
+ MAX8907C_RESTART_100MV = 0x00,
+ MAX8907C_RESTART_150MV = 0x01,
+ MAX8907C_RESTART_200MV = 0x02,
+ MAX8907C_RESTART_FLOAT = 0x03,
+};
+
+enum max8907c_fast_charging_current {
+ MAX8907C_FASTCHARGE_90MA = 0x00,
+ MAX8907C_FASTCHARGE_300MA = 0x01,
+ MAX8907C_FASTCHARGE_460MA = 0x02,
+ MAX8907C_FASTCHARGE_600MA = 0x03,
+ MAX8907C_FASTCHARGE_700MA = 0x04,
+ MAX8907C_FASTCHARGE_800MA = 0x05,
+ MAX8907C_FASTCHARGE_900MA = 0x06,
+ MAX8907C_FASTCHARGE_1000MA = 0x07,
+};
+
+enum max8907c_fast_charger_time {
+ MAX8907C_FCHARGE_TM_8H = 0x00,
+ MAX8907C_FCHARGE_TM_12H = 0x01,
+ MAX8907C_FCHARGE_TM_16H = 0x02,
+ MAX8907C_FCHARGE_TM_OFF = 0x03,
+};
+
+struct max8907c_charger_pdata {
+ int irq;
+ enum max8907c_charger_topoff_threshold topoff_threshold;
+ enum max8907c_charger_restart_hysteresis restart_hysteresis;
+ enum max8907c_charger_restart_hysteresis fast_charging_current;
+ enum max8907c_fast_charger_time fast_charger_time;
+};
+
+#endif