summaryrefslogtreecommitdiff
path: root/include/linux/power
diff options
context:
space:
mode:
authorDonggeun Kim <dg77.kim@samsung.com>2011-12-27 18:47:49 +0900
committerAnton Vorontsov <cbouatmailru@gmail.com>2012-01-04 08:08:45 +0400
commitad3d13eee78ec44194bf919a37e2f711e53cbdf0 (patch)
treee7a950b1e1d2642c4fae0a7019ac7ceed5241104 /include/linux/power
parent3bb3dbbd56ea39e5537db8f8041ea95d28f16a7f (diff)
power_supply: Charger-Manager: Add properties for power-supply-class
Charger Manager provides power-supply-class aggregating information from multiple chargers and a fuel-gauge. Signed-off-by: Donggeun Kim <dg77.kim@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'include/linux/power')
-rw-r--r--include/linux/power/charger-manager.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h
index 102c5b3f3325..4f75e531c112 100644
--- a/include/linux/power/charger-manager.h
+++ b/include/linux/power/charger-manager.h
@@ -47,8 +47,12 @@ struct charger_global_desc {
/**
* struct charger_desc
+ * @psy_name: the name of power-supply-class for charger manager
* @polling_mode:
* Determine which polling mode will be used
+ * @fullbatt_uV: voltage in microvolt
+ * If it is not being charged and VBATT >= fullbatt_uV,
+ * it is assumed to be full.
* @polling_interval_ms: interval in millisecond at which
* charger manager will monitor battery health
* @battery_present:
@@ -62,11 +66,18 @@ struct charger_global_desc {
* return_value > 0: overheat
* return_value == 0: normal
* return_value < 0: cold
+ * @measure_battery_temp:
+ * true: measure battery temperature
+ * false: measure ambient temperature
*/
struct charger_desc {
+ char *psy_name;
+
enum polling_modes polling_mode;
unsigned int polling_interval_ms;
+ unsigned int fullbatt_uV;
+
enum data_source battery_present;
char **psy_charger_stat;
@@ -77,6 +88,7 @@ struct charger_desc {
char *psy_fuel_gauge;
int (*temperature_out_of_range)(int *mC);
+ bool measure_battery_temp;
};
#define PSY_NAME_MAX 30
@@ -92,6 +104,8 @@ struct charger_desc {
* @emergency_stop:
* When setting true, stop charging
* @last_temp_mC: the measured temperature in milli-Celsius
+ * @psy_name_buf: the name of power-supply-class for charger manager
+ * @charger_psy: power_supply for charger manager
* @status_save_ext_pwr_inserted:
* saved status of external power before entering suspend-to-RAM
* @status_save_batt:
@@ -110,6 +124,9 @@ struct charger_manager {
int emergency_stop;
int last_temp_mC;
+ char psy_name_buf[PSY_NAME_MAX + 1];
+ struct power_supply charger_psy;
+
bool status_save_ext_pwr_inserted;
bool status_save_batt;
};