summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJonghwa Lee <jonghwa3.lee@samsung.com>2013-10-22 17:35:58 +0900
committerChanho Park <chanho61.park@samsung.com>2014-03-20 17:41:08 +0900
commitce53b419e75f6a7d2f0d42f882db76a38d7c8e8f (patch)
treec55bb7af4158bd49c66282ab85d0a7294dfa799c /include
parent00c50188368bb70e2b384cd76d83ee737974fec8 (diff)
downloadlinux-3.10-ce53b419e75f6a7d2f0d42f882db76a38d7c8e8f.tar.gz
linux-3.10-ce53b419e75f6a7d2f0d42f882db76a38d7c8e8f.tar.bz2
linux-3.10-ce53b419e75f6a7d2f0d42f882db76a38d7c8e8f.zip
charger-manager : Add default battery temperature checking funtion.
During the charger manager driver's probing time, it can't succeed if there's no pre-defined .temperature_out_of_range callback function. But if fuel gauge supports battery temperature measurement, we can use it directly. That's what cm_default_get_temp() function does. With flag measure_batter_temp ON, we normally use cm_default_get_temp() for .temperature_out_of_range callback funtion. The TEMP_AMBIENT property is only used for pre-defined one. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/power/charger-manager.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h
index 0e86840eb60..20886197ab3 100644
--- a/include/linux/power/charger-manager.h
+++ b/include/linux/power/charger-manager.h
@@ -148,6 +148,8 @@ struct charger_regulator {
struct charger_manager *cm;
};
+struct charger_manager;
+
/**
* struct charger_desc
* @psy_name: the name of power-supply-class for charger manager
@@ -173,6 +175,9 @@ struct charger_regulator {
* @num_charger_regulator: the number of entries in charger_regulators
* @charger_regulators: array of charger regulators
* @psy_fuel_gauge: the name of power-supply for fuel gauge
+ * @temp_alert_min : Minimum battery temperature to be allowed.
+ * @temp_alert_max : Maximum battery temperature to be allowed.
+ * @temp_alert_diff : Temperature diffential to restart charging.
* @temperature_out_of_range:
* Determine whether the status is overheat or cold or normal.
* return_value > 0: overheat
@@ -210,7 +215,11 @@ struct charger_desc {
char *psy_fuel_gauge;
- int (*temperature_out_of_range)(int *mC);
+ int temp_alert_min;
+ int temp_alert_max;
+ int temp_alert_diff;
+
+ int (*temperature_out_of_range)(struct charger_manager *);
bool measure_battery_temp;
u64 charging_max_duration_ms;