power: pm8921-bms: Enable batt alarm
Set the batt alarm to wake up the system if the
battery voltage falls below a threshold. This is to
make sure that the device does not shutdown abruptly
without any notification.
Hold the low voltage wakelock to prevent the device
from going to sleep immediately after the low voltage
notification.
Change-Id: Ifaeeeb27bd85f9c95f026ac3565681432e247b02
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8960-pmic.c b/arch/arm/mach-msm/board-8960-pmic.c
index f0ba1c9..8c16984 100644
--- a/arch/arm/mach-msm/board-8960-pmic.c
+++ b/arch/arm/mach-msm/board-8960-pmic.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -433,6 +433,8 @@
.chg_term_ua = CHG_TERM_MA * 1000,
.normal_voltage_calc_ms = 20000,
.low_voltage_calc_ms = 1000,
+ .alarm_low_mv = 3400,
+ .alarm_high_mv = 4000,
};
#define PM8921_LC_LED_MAX_CURRENT 4 /* I = 4mA */