summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Cherry <tcherry@nvidia.com>2011-01-05 11:51:13 -0800
committerVarun Colbert <vcolbert@nvidia.com>2011-02-04 18:13:41 -0800
commita6d56b14462449454f0a6d027acc2664013f1b14 (patch)
treea53807ec5a960ee33d7841e61ab25aa58c931cfd /include
parentc8291043b8eea53a07538888c40ba806c849a0e7 (diff)
max8907c Charger Driver
max8907c Charger Driver from maxim plus nvidia modifications Integration from http://git-master/r/#change,15043 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>
Diffstat (limited to 'include')
-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