diff options
author | Jonghwa Lee <jonghwa3.lee@samsung.com> | 2014-07-16 14:07:26 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 12:00:18 +0900 |
commit | 18a33cee27d90d1f04ea206215868b03627fe577 (patch) | |
tree | 1c6886b02f504c751355b287f4e80689c60b4cfa /include/linux | |
parent | e2f44605f7ad53faff09b01e48fbae3a74dac0f2 (diff) | |
download | linux-3.10-18a33cee27d90d1f04ea206215868b03627fe577.tar.gz linux-3.10-18a33cee27d90d1f04ea206215868b03627fe577.tar.bz2 linux-3.10-18a33cee27d90d1f04ea206215868b03627fe577.zip |
power: charger-manager: Notify chainging of battery soc to user
Some system might want to notice changing of battery soc, so this patch
makes charger-manager to trigger uevent whenver battery soc changes.
It is configurable operation via setting flag, 'cm-poll-batt-soc', in dt.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/power/charger-manager.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h index 0f6f574a88c..f172e2fa95b 100644 --- a/include/linux/power/charger-manager.h +++ b/include/linux/power/charger-manager.h @@ -169,6 +169,8 @@ 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 @@ -199,6 +201,8 @@ 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; @@ -250,6 +254,7 @@ 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; @@ -275,6 +280,8 @@ struct charger_manager { u64 charging_start_time; u64 charging_end_time; + + unsigned int last_batt_soc; }; #ifdef CONFIG_CHARGER_MANAGER |