summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorHyongbin Kim <hyongbink@nvidia.com>2013-07-15 15:09:26 +0900
committerGabby Lee <galee@nvidia.com>2013-08-23 04:47:14 -0700
commit4c00c119bfbf79385da16ed228ce0125b4d9c43a (patch)
treea1ef7f2932f285669429975ffba657673aa1d2e0 /include/linux
parent2ea3fa785bf8d8fe753fa7653b6a5b46eb864f3e (diff)
power: max17048: set current threshold at low SOC
Support current threshold table for prevent sudden power off or freeze under low SOC. Bug 1304204 Bug 1316595 Change-Id: I4374c27a781a96d3f5b6a3f59af2ce3dcd55bbf3 Signed-off-by: Hyongbin Kim <hyongbink@nvidia.com> Reviewed-on: http://git-master/r/249079 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Gabby Lee <galee@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/max17048_battery.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/max17048_battery.h b/include/linux/max17048_battery.h
index 4950f35f29b0..14ecfb459493 100644
--- a/include/linux/max17048_battery.h
+++ b/include/linux/max17048_battery.h
@@ -13,6 +13,7 @@
#include <linux/smb349-charger.h>
#define MAX17048_DATA_SIZE 64
+#define MAX17048_MAX_SOC_STEP 10
struct max17048_battery_model {
uint8_t rcomp;
@@ -34,6 +35,12 @@ struct max17048_battery_model {
struct max17048_platform_data {
struct max17048_battery_model *model_data;
+
+ s32 (*set_current_threshold)(s32 current_threshold, int min_cpu);
+ int current_normal;
+ int current_threshold_num;
+ int current_threshold_soc[MAX17048_MAX_SOC_STEP];
+ int current_threshold[MAX17048_MAX_SOC_STEP];
};
void max17048_battery_status(int status, int chrg_type);