diff options
author | Jonghwa Lee <jonghwa3.lee@samsung.com> | 2014-10-01 15:05:11 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 12:00:55 +0900 |
commit | c8a1f8253c5e4293baf077eafae28ac503248df5 (patch) | |
tree | a43f301d339c26989aff06517e1a89b04638160a /include/linux | |
parent | 29e9cfb73c65efdcba444fa2f8eef3b6a772dc1b (diff) | |
download | linux-3.10-c8a1f8253c5e4293baf077eafae28ac503248df5.tar.gz linux-3.10-c8a1f8253c5e4293baf077eafae28ac503248df5.tar.bz2 linux-3.10-c8a1f8253c5e4293baf077eafae28ac503248df5.zip |
power: charger-manager: Rebase charger-manager up-to-date.
Drop all local commits and adjust it to up-to-date version of mainline
to make it easy to maintain.
Change-Id: Id5dc3314afd6498e704bcc1bdebe2c226b8fa07c
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/power/charger-manager.h | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h index f172e2fa95b..07e7945a1ff 100644 --- a/include/linux/power/charger-manager.h +++ b/include/linux/power/charger-manager.h @@ -37,6 +37,8 @@ enum cm_event_types { CM_EVENT_BATT_FULL, CM_EVENT_BATT_IN, CM_EVENT_BATT_OUT, + CM_EVENT_BATT_OVERHEAT, + CM_EVENT_BATT_COLD, CM_EVENT_EXT_PWR_IN_OUT, CM_EVENT_CHG_START_STOP, CM_EVENT_OTHERS, @@ -148,8 +150,6 @@ struct charger_regulator { struct charger_manager *cm; }; -struct charger_manager; - /** * struct charger_desc * @psy_name: the name of power-supply-class for charger manager @@ -169,22 +169,16 @@ struct charger_manager; * it is assumed to be full. * @polling_interval_ms: interval in millisecond at which * charger manager will monitor battery health - * @polling_battery_soc: if TRUE, charger-manager reads battery soc and - * triggers uevent periodcally. * @battery_present: * Specify where information for existance of battery can be obtained * @psy_charger_stat: the names of power-supply for chargers * @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 - * return_value == 0: normal - * return_value < 0: cold + * @thermal_zone : the name of thermal zone for battery + * @temp_min : Minimum battery temperature for charging. + * @temp_max : Maximum battery temperature for charging. + * @temp_diff : Temperature diffential to restart charging. * @measure_battery_temp: * true: measure battery temperature * false: measure ambient temperature @@ -201,8 +195,6 @@ struct charger_desc { enum polling_modes polling_mode; unsigned int polling_interval_ms; - /* For checking battery soc */ - bool polling_battery_soc; unsigned int fullbatt_vchkdrop_ms; unsigned int fullbatt_vchkdrop_uV; @@ -219,11 +211,12 @@ struct charger_desc { const char *psy_fuel_gauge; - int temp_alert_min; - int temp_alert_max; - int temp_alert_diff; + const char *thermal_zone; + + int temp_min; + int temp_max; + int temp_diff; - int (*temperature_out_of_range)(struct charger_manager *); bool measure_battery_temp; u32 charging_max_duration_ms; @@ -239,13 +232,13 @@ struct charger_desc { * @desc: instance of charger_desc * @fuel_gauge: power_supply for fuel gauge * @charger_stat: array of power_supply for chargers + * @tzd_batt : thermal zone device for battery * @charger_enabled: the state of charger * @fullbatt_vchk_jiffies_at: * jiffies at the time full battery check will occur. * @fullbatt_vchk_work: work queue for full battery check * @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: @@ -254,7 +247,6 @@ struct charger_desc { * saved status of battery before entering suspend-to-RAM * @charging_start_time: saved start time of enabling charging * @charging_end_time: saved end time of disabling charging - * @last_batt_soc: Last battery soc. */ struct charger_manager { struct list_head entry; @@ -264,13 +256,15 @@ struct charger_manager { struct power_supply *fuel_gauge; struct power_supply **charger_stat; +#ifdef CONFIG_THERMAL + struct thermal_zone_device *tzd_batt; +#endif bool charger_enabled; unsigned long fullbatt_vchk_jiffies_at; struct delayed_work fullbatt_vchk_work; int emergency_stop; - int last_temp_mC; char psy_name_buf[PSY_NAME_MAX + 1]; struct power_supply charger_psy; @@ -280,8 +274,6 @@ struct charger_manager { u64 charging_start_time; u64 charging_end_time; - - unsigned int last_batt_soc; }; #ifdef CONFIG_CHARGER_MANAGER |