summaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/abx500/ab8500-bm.h
diff options
context:
space:
mode:
authorLee Jones2012-05-31 16:16:36 +0200
committerLee Jones2013-03-07 05:35:36 +0100
commit93ff722e88530b9719cbf53be4f3197722461394 (patch)
tree7803b080fdf52c91b50aa2719ee82f55a6165bc1 /include/linux/mfd/abx500/ab8500-bm.h
parentabx500-chargalg: Store the AB8500 MFD parent device for platform differentiation (diff)
downloadkernel-qcow2-linux-93ff722e88530b9719cbf53be4f3197722461394.tar.gz
kernel-qcow2-linux-93ff722e88530b9719cbf53be4f3197722461394.tar.xz
kernel-qcow2-linux-93ff722e88530b9719cbf53be4f3197722461394.zip
ab8500-fg: Add power cut feature for ab8505 and ab8540
Add support for a power cut feature which allows user to configure when ab8505 and ab8540 based platforms should shut down system due to low battery. Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/abx500/ab8500-bm.h')
-rw-r--r--include/linux/mfd/abx500/ab8500-bm.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/mfd/abx500/ab8500-bm.h b/include/linux/mfd/abx500/ab8500-bm.h
index 8d35bfe164c8..0efbe0efee7f 100644
--- a/include/linux/mfd/abx500/ab8500-bm.h
+++ b/include/linux/mfd/abx500/ab8500-bm.h
@@ -235,6 +235,14 @@
/* Battery type */
#define BATTERY_UNKNOWN 00
+/* Registers for pcut feature in ab8505 and ab9540 */
+#define AB8505_RTC_PCUT_CTL_STATUS_REG 0x12
+#define AB8505_RTC_PCUT_TIME_REG 0x13
+#define AB8505_RTC_PCUT_MAX_TIME_REG 0x14
+#define AB8505_RTC_PCUT_FLAG_TIME_REG 0x15
+#define AB8505_RTC_PCUT_RESTART_REG 0x16
+#define AB8505_RTC_PCUT_DEBOUNCE_REG 0x17
+
/**
* struct res_to_temp - defines one point in a temp to res curve. To
* be used in battery packs that combines the identification resistor with a
@@ -283,6 +291,11 @@ struct ab8500_fg;
* points.
* @maint_thres This is the threshold where we stop reporting
* battery full while in maintenance, in per cent
+ * @pcut_enable: Enable power cut feature in ab8505
+ * @pcut_max_time: Max time threshold
+ * @pcut_flag_time: Flagtime threshold
+ * @pcut_max_restart: Max number of restarts
+ * @pcut_debunce_time: Sets battery debounce time
*/
struct ab8500_fg_parameters {
int recovery_sleep_timer;
@@ -299,6 +312,11 @@ struct ab8500_fg_parameters {
int battok_raising_th_sel1;
int user_cap_limit;
int maint_thres;
+ bool pcut_enable;
+ u8 pcut_max_time;
+ u8 pcut_flag_time;
+ u8 pcut_max_restart;
+ u8 pcut_debunce_time;
};
/**