summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devices/CMakeLists.txt4
-rw-r--r--devices/cpu.c65
-rw-r--r--devices/memory.c61
-rw-r--r--devices/process.c59
-rw-r--r--devices/vibrator.c63
-rw-r--r--hw/display_internal.h40
-rw-r--r--include/device-node.h47
-rw-r--r--include/devman_plugin_intf.h53
-rw-r--r--src/device-plugin.c126
9 files changed, 6 insertions, 512 deletions
diff --git a/devices/CMakeLists.txt b/devices/CMakeLists.txt
index 967849e..975423a 100644
--- a/devices/CMakeLists.txt
+++ b/devices/CMakeLists.txt
@@ -1,10 +1,6 @@
SET(TARGET_SRCS
- devices/cpu.c
devices/display.c
devices/extcon.c
devices/led.c
- devices/memory.c
devices/power.c
- devices/process.c
- devices/vibrator.c
)
diff --git a/devices/cpu.c b/devices/cpu.c
deleted file mode 100644
index 0060081..0000000
--- a/devices/cpu.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * device-node
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <stdio.h>
-#include "device-internal.h"
-
-static int cpu_get_prop(int prop, int *val)
-{
- switch (prop) {
- case PROP_CPU_CPUINFO_MAX_FREQ:
- return PLUGIN_GET(cpufreq_cpuinfo_max_freq, val);
- case PROP_CPU_CPUINFO_MIN_FREQ:
- return PLUGIN_GET(cpufreq_cpuinfo_min_freq, val);
- case PROP_CPU_SCALING_MAX_FREQ:
- return PLUGIN_GET(cpufreq_scaling_max_freq, val);
- case PROP_CPU_SCALING_MIN_FREQ:
- return PLUGIN_GET(cpufreq_scaling_min_freq, val);
- }
-
- return -1;
-}
-
-static int cpu_set_prop(int prop, int val)
-{
- switch (prop) {
- case PROP_CPU_SCALING_MAX_FREQ:
- return PLUGIN_SET(cpufreq_scaling_max_freq, val);
- case PROP_CPU_SCALING_MIN_FREQ:
- return PLUGIN_SET(cpufreq_scaling_min_freq, val);
- }
-
- return -1;
-}
-
-static const struct device cpu = {
- .name = "cpu",
- .set_prop = cpu_set_prop,
- .get_prop = cpu_get_prop,
- .type = DEVICE_TYPE_CPU,
-};
-
-static void __CONSTRUCTOR__ module_init(void)
-{
- add_device(&(cpu.type));
-}
-
-static void __DESTRUCTOR__ module_fini(void)
-{
- remove_device(&(cpu.type));
-}
diff --git a/devices/memory.c b/devices/memory.c
deleted file mode 100644
index 7e11b6a..0000000
--- a/devices/memory.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * device-node
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <stdio.h>
-#include "device-internal.h"
-
-static int memory_get_prop(int prop, int *val)
-{
- switch (prop) {
- case PROP_MEMORY_NODE:
- return PLUGIN_GET(memnotify_node, (char*)val);
- case PROP_MEMORY_VICTIM_TASK:
- return PLUGIN_GET(memnotify_victim_task, val);
- }
-
- return -1;
-}
-
-static int memory_set_prop(int prop, int val)
-{
- switch (prop) {
- case PROP_MEMORY_THRESHOLD_LV1:
- return PLUGIN_SET(memnotify_threshold_lv1, val);
- case PROP_MEMORY_THRESHOLD_LV2:
- return PLUGIN_SET(memnotify_threshold_lv2, val);
- }
-
- return -1;
-}
-
-static const struct device memory = {
- .name = "memory",
- .set_prop = memory_set_prop,
- .get_prop = memory_get_prop,
- .type = DEVICE_TYPE_MEMORY,
-};
-
-static void __CONSTRUCTOR__ module_init(void)
-{
- add_device(&(memory.type));
-}
-
-static void __DESTRUCTOR__ module_fini(void)
-{
- remove_device(&(memory.type));
-}
diff --git a/devices/process.c b/devices/process.c
deleted file mode 100644
index 985f83c..0000000
--- a/devices/process.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * device-node
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <stdio.h>
-#include "device-internal.h"
-
-static int process_get_prop(int prop, int *val)
-{
- switch (prop) {
- case PROP_PROCESS_NODE:
- return PLUGIN_GET(process_monitor_node, (char*)val);
- }
-
- return -1;
-}
-
-static int process_set_prop(int prop, int val)
-{
- switch (prop) {
- case PROP_PROCESS_MP_PNP:
- return PLUGIN_SET(process_monitor_mp_pnp, val);
- case PROP_PROCESS_MP_VIP:
- return PLUGIN_SET(process_monitor_mp_vip, val);
- }
-
- return -1;
-}
-
-static const struct device process = {
- .name = "process",
- .set_prop = process_set_prop,
- .get_prop = process_get_prop,
- .type = DEVICE_TYPE_PROCESS,
-};
-
-static void __CONSTRUCTOR__ module_init(void)
-{
- add_device(&(process.type));
-}
-
-static void __DESTRUCTOR__ module_fini(void)
-{
- remove_device(&(process.type));
-}
diff --git a/devices/vibrator.c b/devices/vibrator.c
deleted file mode 100644
index c447b09..0000000
--- a/devices/vibrator.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * device-node
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <stdio.h>
-#include "device-internal.h"
-
-static int vibrator_get_prop(int prop, int *val)
-{
- switch (prop) {
- case PROP_VIBRATOR_LEVEL:
- return PLUGIN_GET(haptic_vibetones_level, val);
- case PROP_VIBRATOR_LEVEL_MAX:
- return PLUGIN_GET(haptic_vibetones_level_max, val);
- }
-
- return -1;
-}
-
-static int vibrator_set_prop(int prop, int val)
-{
- switch (prop) {
- case PROP_VIBRATOR_ENABLE:
- return PLUGIN_SET(haptic_vibetones_enable, val);
- case PROP_VIBRATOR_LEVEL:
- return PLUGIN_SET(haptic_vibetones_level, val);
- case PROP_VIBRATOR_ONESHOT:
- return PLUGIN_SET(haptic_vibetones_oneshot, val);
- }
-
- return -1;
-}
-
-static const struct device vibrator = {
- .name = "vibrator",
- .set_prop = vibrator_set_prop,
- .get_prop = vibrator_get_prop,
- .type = DEVICE_TYPE_VIBRATOR,
-};
-
-static void __CONSTRUCTOR__ module_init(void)
-{
- add_device(&(vibrator.type));
-}
-
-static void __DESTRUCTOR__ module_fini(void)
-{
- remove_device(&(vibrator.type));
-}
diff --git a/hw/display_internal.h b/hw/display_internal.h
index 125f0d9..ea66be9 100644
--- a/hw/display_internal.h
+++ b/hw/display_internal.h
@@ -36,44 +36,4 @@
*/
#define DISPLAY_INTERNAL_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,2)
-typedef enum display_internal_enhance_mode {
- ENHANCE_MODE_NONE = 1001,
- ENHANCE_MODE_DYNAMIC,
- ENHANCE_MODE_STANDARD,
- ENHANCE_MODE_NATURAL,
- ENHANCE_MODE_GRAYSCALE,
- ENHANCE_MODE_MOVIE,
- ENHANCE_MODE_AUTO,
-} display_internal_enhance_mode_e;
-
-typedef enum display_internal_enhance_scenario {
- ENHANCE_SCENARIO_NONE = 2001,
- ENHANCE_SCENARIO_NORMAL,
- ENHANCE_SCENARIO_GALLERY,
- ENHANCE_SCENARIO_VIDEO,
- ENHANCE_SCENARIO_VTCALL,
- ENHANCE_SCENARIO_CAMERA,
- ENHANCE_SCENARIO_BROWSER,
- ENHANCE_SCENARIO_NEGATIVE,
- ENHANCE_SCENARIO_EMAIL,
- ENHANCE_SCENARIO_EBOOK,
- ENHANCE_SCENARIO_GRAYSCALE,
-} display_intermal_enhance_scenario_e;
-
-struct display_internal_device {
- struct hw_common common;
-
- int (*set_enhance_mode)(display_internal_enhance_mode_e mode);
- int (*get_enhance_mode)(display_internal_enhance_mode_e *mode);
-
- int (*set_enhance_scenario)(display_internal_enhance_scenario_e scenario);
- int (*get_enhance_scenario)(display_internal_enhance_scenario_e *scenario);
-
- int (*set_enhance)(display_internal_enhance_mode_e mode,
- display_internal_enhance_scenario_e scenario);
- int (*get_enhance)(display_internal_enhance_mode_e *mode,
- display_internal_enhance_scenario_e *scenario);
-
-};
-
#endif
diff --git a/include/device-node.h b/include/device-node.h
index 56e4323..cf1d059 100644
--- a/include/device-node.h
+++ b/include/device-node.h
@@ -50,13 +50,9 @@ extern "C" {
enum device_type
{
DEVICE_TYPE_DISPLAY, /**< display */
- DEVICE_TYPE_VIBRATOR, /**< vibrator */
DEVICE_TYPE_EXTCON, /**< extcon - Micro USB, 3.5 pi jack etc */
DEVICE_TYPE_LED, /**< LED */
DEVICE_TYPE_POWER, /**< battery, PMIC, etc about power */
- DEVICE_TYPE_MEMORY, /**< memory */
- DEVICE_TYPE_CPU, /**< cpu */
- DEVICE_TYPE_PROCESS, /**< process */
DEVICE_TYPE_MAX,
};
@@ -82,17 +78,6 @@ enum {
/**
* @par Description:
- * DEVICE_TYPE_HAPTIC property for generic APIs
- */
-enum {
- PROP_VIBRATOR_LEVEL_MAX,
- PROP_VIBRATOR_LEVEL,
- PROP_VIBRATOR_ENABLE,
- PROP_VIBRATOR_ONESHOT,
-};
-
-/**
- * @par Description:
* DEVICE_TYPE_JACK property for generic APIs
*/
enum {
@@ -137,38 +122,6 @@ enum {
};
/**
- * @par Description:
- * DEVICE_TYPE_MEMORY property for generic APIs
- */
-enum {
- PROP_MEMORY_NODE,
- PROP_MEMORY_VICTIM_TASK,
- PROP_MEMORY_THRESHOLD_LV1,
- PROP_MEMORY_THRESHOLD_LV2,
-};
-
-/**
- * @par Description:
- * DEVICE_TYPE_CPU property for generic APIs
- */
-enum {
- PROP_CPU_CPUINFO_MAX_FREQ,
- PROP_CPU_CPUINFO_MIN_FREQ,
- PROP_CPU_SCALING_MAX_FREQ,
- PROP_CPU_SCALING_MIN_FREQ,
-};
-
-/**
- * @par Description:
- * DEVICE_TYPE_PROCESS property for generic APIs
- */
-enum {
- PROP_PROCESS_NODE,
- PROP_PROCESS_MP_PNP,
- PROP_PROCESS_MP_VIP,
-};
-
-/**
* @fn int device_get_property(enum device_type devtype, int property, int *value)
* @par Description:
* This generic API is used to get the property values of supported devices.\n
diff --git a/include/devman_plugin_intf.h b/include/devman_plugin_intf.h
index b4f4c41..7a5ceee 100644
--- a/include/devman_plugin_intf.h
+++ b/include/devman_plugin_intf.h
@@ -20,26 +20,11 @@
#define __DEVMAN_PLUGIN_INTF_H__
enum {
- STATUS_OFFLINE = 0,
- STATUS_ONLINE,
-};
-
-enum {
- STATUS_OFF = 0,
- STATUS_ON,
-};
-
-enum {
PATH_CP = 0,
PATH_AP,
};
enum {
- BATTERY_NOT_FULLY_CHARGED = 0,
- BATTERY_FULLY_CHARGED,
-};
-
-enum {
BATTERY_UNKNOWN = 0,
BATTERY_GOOD,
BATTERY_OVERHEAT,
@@ -56,22 +41,6 @@ enum {
POWER_STATE_POST_RESUME,
};
-enum {
- LUX_DECREMENT,
- LUX_NOCHANGE,
- LUX_INCREMENT,
-};
-
-enum {
- WM_MODE_MIN = 0x00,
- WM_MODE_NORMAL = WM_MODE_MIN,
- WM_MODE_CONSERVATIVE,
- WM_MODE_MEDIUM,
- WM_MODE_AGGRESSIVE,
- WM_MODE_OUTDOOR,
- WM_MODE_MAX = WM_MODE_OUTDOOR
-};
-
typedef struct {
int (*OEM_sys_get_display_count) (int *value);
@@ -110,12 +79,6 @@ typedef struct {
int (*OEM_sys_get_usb_path) (int *value);
int (*OEM_sys_set_usb_path) (int value);
- int (*OEM_sys_get_haptic_vibetones_level_max) (int *value);
- int (*OEM_sys_get_haptic_vibetones_level) (int *value);
- int (*OEM_sys_set_haptic_vibetones_level) (int value);
- int (*OEM_sys_set_haptic_vibetones_enable) (int value);
- int (*OEM_sys_set_haptic_vibetones_oneshot) (int value);
-
int (*OEM_sys_get_battery_capacity) (int *value);
int (*OEM_sys_get_battery_capacity_raw) (int *value);
int (*OEM_sys_get_battery_charge_full) (int *value);
@@ -145,22 +108,6 @@ typedef struct {
int (*OEM_sys_get_power_wakeup_count) (int *value);
int (*OEM_sys_set_power_wakeup_count) (int value);
- int (*OEM_sys_get_memnotify_node) (char *node);
- int (*OEM_sys_get_memnotify_victim_task) (int *value);
- int (*OEM_sys_set_memnotify_threshold_lv1) (int value);
- int (*OEM_sys_set_memnotify_threshold_lv2) (int value);
-
- int (*OEM_sys_get_process_monitor_node) (char *node);
- int (*OEM_sys_set_process_monitor_mp_pnp) (int value);
- int (*OEM_sys_set_process_monitor_mp_vip) (int value);
-
- int (*OEM_sys_get_cpufreq_cpuinfo_max_freq) (int *value);
- int (*OEM_sys_get_cpufreq_cpuinfo_min_freq) (int *value);
- int (*OEM_sys_get_cpufreq_scaling_max_freq) (int *value);
- int (*OEM_sys_set_cpufreq_scaling_max_freq) (int value);
- int (*OEM_sys_get_cpufreq_scaling_min_freq) (int *value);
- int (*OEM_sys_set_cpufreq_scaling_min_freq) (int value);
-
int (*OEM_sys_get_backlight_brightness_by_lux) (int lux, int *value);
int (*OEM_sys_get_whitemagic_mode) (int index, int *value);
diff --git a/src/device-plugin.c b/src/device-plugin.c
index 4289903..6a97129 100644
--- a/src/device-plugin.c
+++ b/src/device-plugin.c
@@ -153,31 +153,6 @@ static int OEM_sys_set_usb_path(int value)
return 0;
}
-static int OEM_sys_get_haptic_vibetones_level_max(int *value)
-{
- return 0;
-}
-
-static int OEM_sys_get_haptic_vibetones_level(int *value)
-{
- return 0;
-}
-
-static int OEM_sys_set_haptic_vibetones_level(int value)
-{
- return 0;
-}
-
-static int OEM_sys_set_haptic_vibetones_enable(int value)
-{
- return 0;
-}
-
-static int OEM_sys_set_haptic_vibetones_oneshot(int value)
-{
- return 0;
-}
-
static int OEM_sys_get_battery_capacity(int *value)
{
return 0;
@@ -288,71 +263,6 @@ static int OEM_sys_set_power_wakeup_count(int value)
return 0;
}
-static int OEM_sys_get_memnotify_node(char *node)
-{
- return 0;
-}
-
-static int OEM_sys_get_memnotify_victim_task(int *value)
-{
- return 0;
-}
-
-static int OEM_sys_set_memnotify_threshold_lv1(int value)
-{
- return 0;
-}
-
-static int OEM_sys_set_memnotify_threshold_lv2(int value)
-{
- return 0;
-}
-
-static int OEM_sys_get_process_monitor_node(char *node)
-{
- return 0;
-}
-
-static int OEM_sys_set_process_monitor_mp_pnp(int value)
-{
- return 0;
-}
-
-static int OEM_sys_set_process_monitor_mp_vip(int value)
-{
- return 0;
-}
-
-static int OEM_sys_get_cpufreq_cpuinfo_max_freq(int *value)
-{
- return 0;
-}
-
-static int OEM_sys_get_cpufreq_cpuinfo_min_freq(int *value)
-{
- return 0;
-}
-
-static int OEM_sys_get_cpufreq_scaling_max_freq(int *value)
-{
- return 0;
-}
-
-static int OEM_sys_set_cpufreq_scaling_max_freq(int value)
-{
- return 0;
-}
-
-static int OEM_sys_get_cpufreq_scaling_min_freq(int *value)
-{
- return 0;
-}
-
-static int OEM_sys_set_cpufreq_scaling_min_freq(int value)
-{
- return 0;
-}
-
static int OEM_sys_get_backlight_brightness_by_lux(int lux, int *value)
{
return 0;
@@ -378,11 +288,13 @@ static int OEM_sys_set_irled_control(char *value)
return 0;
}
-static int OEM_sys_get_hardkey_backlight(int *value){
+static int OEM_sys_get_hardkey_backlight(int *value)
+{
return 0;
}
-static int OEM_sys_set_hardkey_backlight(int value){
+static int OEM_sys_set_hardkey_backlight(int value)
+{
return 0;
}
@@ -426,13 +338,6 @@ const OEM_sys_devman_plugin_interface default_plugin = {
.OEM_sys_get_usb_path = &OEM_sys_get_usb_path,
.OEM_sys_set_usb_path = &OEM_sys_set_usb_path,
- /* Vibrator interfaces */
- .OEM_sys_get_haptic_vibetones_level_max = &OEM_sys_get_haptic_vibetones_level_max,
- .OEM_sys_get_haptic_vibetones_level = &OEM_sys_get_haptic_vibetones_level,
- .OEM_sys_set_haptic_vibetones_level = &OEM_sys_set_haptic_vibetones_level,
- .OEM_sys_set_haptic_vibetones_enable = &OEM_sys_set_haptic_vibetones_enable,
- .OEM_sys_set_haptic_vibetones_oneshot = &OEM_sys_set_haptic_vibetones_oneshot,
-
/* Battery interfaces */
.OEM_sys_get_battery_capacity = &OEM_sys_get_battery_capacity,
.OEM_sys_get_battery_capacity_raw = &OEM_sys_get_battery_capacity_raw,
@@ -440,7 +345,7 @@ const OEM_sys_devman_plugin_interface default_plugin = {
.OEM_sys_get_battery_charge_now = &OEM_sys_get_battery_charge_now,
.OEM_sys_get_battery_present = &OEM_sys_get_battery_present,
.OEM_sys_get_battery_health = &OEM_sys_get_battery_health,
- .OEM_sys_get_battery_polling_required= &OEM_sys_get_battery_polling_required,
+ .OEM_sys_get_battery_polling_required = &OEM_sys_get_battery_polling_required,
.OEM_sys_get_battery_support_insuspend_charging = &OEM_sys_get_battery_support_insuspend_charging,
/* Connection interfaces */
@@ -465,25 +370,6 @@ const OEM_sys_devman_plugin_interface default_plugin = {
.OEM_sys_get_power_wakeup_count = &OEM_sys_get_power_wakeup_count,
.OEM_sys_set_power_wakeup_count = &OEM_sys_set_power_wakeup_count,
- /* OOM interfaces */
- .OEM_sys_get_memnotify_node = &OEM_sys_get_memnotify_node,
- .OEM_sys_get_memnotify_victim_task = &OEM_sys_get_memnotify_victim_task,
- .OEM_sys_set_memnotify_threshold_lv1 = &OEM_sys_set_memnotify_threshold_lv1,
- .OEM_sys_set_memnotify_threshold_lv2 = &OEM_sys_set_memnotify_threshold_lv2,
-
- /* Process monitor interfaces */
- .OEM_sys_get_process_monitor_node = &OEM_sys_get_process_monitor_node,
- .OEM_sys_set_process_monitor_mp_pnp = &OEM_sys_set_process_monitor_mp_pnp,
- .OEM_sys_set_process_monitor_mp_vip = &OEM_sys_set_process_monitor_mp_vip,
-
- /* UART path interfaces */
- .OEM_sys_get_cpufreq_cpuinfo_max_freq = &OEM_sys_get_cpufreq_cpuinfo_max_freq,
- .OEM_sys_get_cpufreq_cpuinfo_min_freq = &OEM_sys_get_cpufreq_cpuinfo_min_freq,
- .OEM_sys_get_cpufreq_scaling_max_freq = &OEM_sys_get_cpufreq_scaling_max_freq,
- .OEM_sys_set_cpufreq_scaling_max_freq = &OEM_sys_set_cpufreq_scaling_max_freq,
- .OEM_sys_get_cpufreq_scaling_min_freq = &OEM_sys_get_cpufreq_scaling_min_freq,
- .OEM_sys_set_cpufreq_scaling_min_freq = &OEM_sys_set_cpufreq_scaling_min_freq,
-
.OEM_sys_get_backlight_brightness_by_lux = &OEM_sys_get_backlight_brightness_by_lux,
.OEM_sys_get_whitemagic_mode = &OEM_sys_get_whitemagic_mode,
@@ -494,5 +380,5 @@ const OEM_sys_devman_plugin_interface default_plugin = {
.OEM_sys_set_irled_control = &OEM_sys_set_irled_control,
.OEM_sys_get_hardkey_backlight = &OEM_sys_get_hardkey_backlight,
- .OEM_sys_set_hardkey_backlight= &OEM_sys_set_hardkey_backlight
+ .OEM_sys_set_hardkey_backlight = &OEM_sys_set_hardkey_backlight
};