summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJonghwa Lee <jonghwa3.lee@samsung.com>2014-08-14 22:05:15 +0900
committerJonghwa Lee <jonghwa3.lee@samsung.com>2014-10-10 10:36:08 +0900
commitcf5fac5fef09066d6fb79e9e8b221bf26e074990 (patch)
treeda8a6e068f8bb83fd4e7fb50c184ac2b28732276 /include
parent0833795f0ce638847b4b7a94e4ccd9f667ae856c (diff)
downloadlinux-3.10-cf5fac5fef09066d6fb79e9e8b221bf26e074990.tar.gz
linux-3.10-cf5fac5fef09066d6fb79e9e8b221bf26e074990.tar.bz2
linux-3.10-cf5fac5fef09066d6fb79e9e8b221bf26e074990.zip
power: charger-manager: Use alarmtimer for battery monitoring in suspend.
To guerantee proper charing and managing batteries even in suspend, charger-manager has used rtc device with rtc framework interface. However, it is better to use alarmtimer for cleaner and more appropriate operation. This patch makes driver to use alamtimer for polling work in suspend and removes all deprecated codes related with using rtc interface. Change-Id: I0c84ccd62653b50fc9c9b687fddcaba7ea58e8ca Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/power/charger-manager.h32
1 files changed, 1 insertions, 31 deletions
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h
index 07e7945a1ff..8e111f3ba6f 100644
--- a/include/linux/power/charger-manager.h
+++ b/include/linux/power/charger-manager.h
@@ -17,6 +17,7 @@
#include <linux/power_supply.h>
#include <linux/extcon.h>
+#include <linux/alarmtimer.h>
enum data_source {
CM_BATTERY_PRESENT,
@@ -45,29 +46,6 @@ enum cm_event_types {
};
/**
- * struct charger_global_desc
- * @rtc_name: the name of RTC used to wake up the system from suspend.
- * @rtc_only_wakeup:
- * If the system is woken up by waekup-sources other than the RTC or
- * callbacks, Charger Manager should recognize with
- * rtc_only_wakeup() returning false.
- * If the RTC given to CM is the only wakeup reason,
- * rtc_only_wakeup should return true.
- * @assume_timer_stops_in_suspend:
- * Assume that the jiffy timer stops in suspend-to-RAM.
- * When enabled, CM does not rely on jiffies value in
- * suspend_again and assumes that jiffies value does not
- * change during suspend.
- */
-struct charger_global_desc {
- char *rtc_name;
-
- bool (*rtc_only_wakeup)(void);
-
- bool assume_timer_stops_in_suspend;
-};
-
-/**
* struct charger_cable
* @extcon_name: the name of extcon device.
* @name: the name of charger cable(external connector).
@@ -269,22 +247,14 @@ struct charger_manager {
char psy_name_buf[PSY_NAME_MAX + 1];
struct power_supply charger_psy;
- bool status_save_ext_pwr_inserted;
- bool status_save_batt;
-
u64 charging_start_time;
u64 charging_end_time;
};
#ifdef CONFIG_CHARGER_MANAGER
-extern int setup_charger_manager(struct charger_global_desc *gd);
-extern bool cm_suspend_again(void);
extern void cm_notify_event(struct power_supply *psy,
enum cm_event_types type, char *msg);
#else
-static inline int setup_charger_manager(struct charger_global_desc *gd)
-{ return 0; }
-static inline bool cm_suspend_again(void) { return false; }
static inline void cm_notify_event(struct power_supply *psy,
enum cm_event_types type, char *msg) { }
#endif