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-11-18 11:44:58 +0900
commita51c738a2af8107e391114d73ae5c79c383b2732 (patch)
tree63ed3806eb4105fa3139ea727b7c0a2694607c04 /include
parent47e614255e64ed56e6661021bcaacc5447f8ca1d (diff)
downloadlinux-3.10-a51c738a2af8107e391114d73ae5c79c383b2732.tar.gz
linux-3.10-a51c738a2af8107e391114d73ae5c79c383b2732.tar.bz2
linux-3.10-a51c738a2af8107e391114d73ae5c79c383b2732.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;