From 06c1a493800745ba16812f25683ccb3743464da9 Mon Sep 17 00:00:00 2001 From: "keewook.lee" Date: Mon, 27 Aug 2012 15:31:13 +0900 Subject: Inset the power state. Signed-off-by: keewook.lee --- include/devman_plugin_intf.h | 3 +++ packaging/device-manager-plugin-exynos.spec | 2 +- src/device_manager_plugin_exynos.c | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/devman_plugin_intf.h b/include/devman_plugin_intf.h index de7fad2..ca76206 100644 --- a/include/devman_plugin_intf.h +++ b/include/devman_plugin_intf.h @@ -52,6 +52,8 @@ enum { enum { POWER_STATE_SUSPEND = 0, + POWER_STATE_PRE_SUSPEND, + POWER_STATE_POST_RESUME, }; typedef struct { @@ -104,6 +106,7 @@ typedef struct { int (*OEM_sys_get_battery_charge_now) (int *value); int (*OEM_sys_get_battery_present) (int *value); int (*OEM_sys_get_battery_health) (int *value); + int (*OEM_sys_get_battery_polling_required) (int *value); int (*OEM_sys_get_jack_charger_online) (int *value); int (*OEM_sys_get_jack_earjack_online) (int *value); diff --git a/packaging/device-manager-plugin-exynos.spec b/packaging/device-manager-plugin-exynos.spec index 425b1a6..32e7991 100644 --- a/packaging/device-manager-plugin-exynos.spec +++ b/packaging/device-manager-plugin-exynos.spec @@ -1,7 +1,7 @@ #sbs-git:slp/pkgs/d/device-manager-plugin-exynos device-manager-plugin-exynos 0.0.1 5bf2e95e0bb15c43ff928f7375e1978b0accb0f8 Name: device-manager-plugin-exynos Summary: Device manager plugin exynos -Version: 0.0.16 +Version: 0.0.19 Release: 0 Group: TO_BE/FILLED_IN License: TO_BE/FILLED_IN diff --git a/src/device_manager_plugin_exynos.c b/src/device_manager_plugin_exynos.c index a31506d..d95d31a 100644 --- a/src/device_manager_plugin_exynos.c +++ b/src/device_manager_plugin_exynos.c @@ -688,6 +688,13 @@ int OEM_sys_get_battery_health(int *value) return -1; } +int OEM_sys_get_battery_polling_required(int *value) +{ + *value = 0; + + return 0; +} + static char uart_node_path[MAX_NAME]; static char usb_node_path[MAX_NAME]; @@ -811,6 +818,10 @@ int OEM_sys_set_power_state(int value) switch (value) { case POWER_STATE_SUSPEND: return sys_set_str(POWER_STATE_PATH, "mem"); + case POWER_STATE_PRE_SUSPEND: + return sys_set_str(POWER_STATE_PATH, "pre_suspend"); + case POWER_STATE_POST_RESUME: + return sys_set_str(POWER_STATE_PATH, "post_resume"); } return -1; @@ -1111,6 +1122,7 @@ EXPORT_API const OEM_sys_devman_plugin_interface *OEM_sys_get_devman_plugin_inte devman_plugin_interface_exynos.OEM_sys_get_battery_charge_now = &OEM_sys_get_battery_charge_now; devman_plugin_interface_exynos.OEM_sys_get_battery_present = &OEM_sys_get_battery_present; devman_plugin_interface_exynos.OEM_sys_get_battery_health = &OEM_sys_get_battery_health; + devman_plugin_interface_exynos.OEM_sys_get_battery_polling_required= &OEM_sys_get_battery_polling_required; devman_plugin_interface_exynos.OEM_sys_get_jack_charger_online = &OEM_sys_get_jack_charger_online; devman_plugin_interface_exynos.OEM_sys_get_jack_earjack_online = &OEM_sys_get_jack_earjack_online; -- cgit v1.2.3