diff options
-rw-r--r-- | CMakeLists.txt | 15 | ||||
-rw-r--r-- | include/devman_plugin_intf.h | 168 | ||||
-rw-r--r-- | packaging/device-manager-plugin-odroid.spec | 2 | ||||
-rw-r--r-- | src/device_manager_io.c | 179 | ||||
-rw-r--r-- | src/device_manager_plugin_odroid.c | 311 |
5 files changed, 0 insertions, 675 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ed24f54..14ad48e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,18 +5,3 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX}) ADD_SUBDIRECTORY(hw/usb_gadget) ADD_SUBDIRECTORY(hw/usb_client) - -SET(PROJ_NAME slp_devman_plugin) - -set(SRCS - src/device_manager_plugin_odroid.c - src/device_manager_io.c) - -include(FindPkgConfig) -pkg_check_modules(pkgs REQUIRED devman_plugin) - -include_directories(${pkgs_INCLUDE_DIRS}) - -add_library(${PROJ_NAME} SHARED ${SRCS}) -target_link_libraries(${PROJ_NAME} ${pkgs_LIBRARIES}) -install(TARGETS ${PROJ_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) diff --git a/include/devman_plugin_intf.h b/include/devman_plugin_intf.h deleted file mode 100644 index ff7492f..0000000 --- a/include/devman_plugin_intf.h +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved -* -* 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. -*/ - - - -#ifndef __DEVMAN_PLUGIN_INTF_H__ -#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, - BATTERY_DEAD, - BATTERY_OVERVOLTAGE, - BATTERY_UNSPECIFIED, - BATTERY_COLD, - BATTERY_HEALTH_MAX, -}; - -enum { - POWER_STATE_SUSPEND = 0, - POWER_STATE_PRE_SUSPEND, - POWER_STATE_POST_RESUME, -}; - -enum { - LUX_DECREMENT, - LUX_NOCHANGE, - LUX_INCREMENT, -}; - -typedef struct { - int (*OEM_sys_get_display_count) (int *value); - - int (*OEM_sys_get_backlight_min_brightness) (int index, int *value); - int (*OEM_sys_get_backlight_max_brightness) (int index, int *value); - int (*OEM_sys_get_backlight_brightness) (int index, int *value, int power_saving); - int (*OEM_sys_set_backlight_brightness) (int index, int value, int power_saving); - - int (*OEM_sys_set_backlight_dimming) (int index, int value); - - int (*OEM_sys_get_backlight_acl_control) (int index, int *value); - int (*OEM_sys_set_backlight_acl_control) (int index, int value); - - int (*OEM_sys_get_lcd_power) (int index, int *value); - int (*OEM_sys_set_lcd_power) (int index, int value); - - int (*OEM_sys_get_image_enhance_mode) (int *value); - int (*OEM_sys_set_image_enhance_mode) (int value); - int (*OEM_sys_get_image_enhance_scenario) (int *value); - int (*OEM_sys_set_image_enhance_scenario) (int value); - int (*OEM_sys_get_image_enhance_tone) (int *value); - int (*OEM_sys_set_image_enhance_tone) (int value); - int (*OEM_sys_get_image_enhance_outdoor) (int *value); - int (*OEM_sys_set_image_enhance_outdoor) (int value); - - int (*OEM_sys_get_image_enhance_tune) (int *value); - int (*OEM_sys_set_image_enhance_tune) (int value); - - int (*OEM_sys_image_enhance_info) (int *value); - - int (*OEM_sys_set_display_frame_rate) (int value); - - int (*OEM_sys_get_uart_path) (int *value); - int (*OEM_sys_set_uart_path) (int value); - - int (*OEM_sys_get_usb_path) (int *value); - int (*OEM_sys_set_usb_path) (int value); - - int (*OEM_sys_get_haptic_motor_level_max) (int *value); - int (*OEM_sys_get_haptic_motor_level) (int *value); - int (*OEM_sys_set_haptic_motor_level) (int value); - int (*OEM_sys_set_haptic_motor_enable) (int value); - int (*OEM_sys_set_haptic_motor_oneshot) (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); - 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_battery_support_insuspend_charging) (int *value); - - int (*OEM_sys_get_jack_charger_online) (int *value); - int (*OEM_sys_get_jack_earjack_online) (int *value); - int (*OEM_sys_get_jack_earkey_online) (int *value); - int (*OEM_sys_get_jack_hdmi_online) (int *value); - int (*OEM_sys_get_jack_usb_online) (int *value); - int (*OEM_sys_get_jack_cradle_online) (int *value); - int (*OEM_sys_get_jack_tvout_online) (int *value); - int (*OEM_sys_get_jack_keyboard_online) (int *value); - - int (*OEM_sys_get_hdmi_support) (int *value); - - int (*OEM_sys_get_leds_torch_max_brightness) (int *value); - int (*OEM_sys_get_leds_torch_brightness) (int *value); - int (*OEM_sys_set_leds_torch_brightness) (int value); - - /* TODO: Change args type */ - int (*OEM_sys_set_power_state) (int value); - - /* TODO: Should determine enum values of wakeup_count nodes */ - 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); - -} OEM_sys_devman_plugin_interface; - -const OEM_sys_devman_plugin_interface *OEM_sys_get_devman_plugin_interface(); - -#endif /* __DEVMAN_PLUGIN_INTF_H__ */ diff --git a/packaging/device-manager-plugin-odroid.spec b/packaging/device-manager-plugin-odroid.spec index 7a220c7..388fcc7 100644 --- a/packaging/device-manager-plugin-odroid.spec +++ b/packaging/device-manager-plugin-odroid.spec @@ -9,7 +9,6 @@ Source1: %{name}.manifest Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig BuildRequires: cmake -BuildRequires: pkgconfig(devman_plugin) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(hwcommon) BuildRequires: pkgconfig(glib-2.0) @@ -37,4 +36,3 @@ make %{?jobs:-j%jobs} %{_libdir}/hw/*.so %manifest %{name}.manifest %license LICENSE -%{_libdir}/libslp_devman_plugin.so diff --git a/src/device_manager_io.c b/src/device_manager_io.c deleted file mode 100644 index b3caf8d..0000000 --- a/src/device_manager_io.c +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved -* -* 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 <unistd.h> -#include <stdio.h> -#include <string.h> -#include <fcntl.h> -#include <devman_plugin_intf.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/stat.h> - -#define EXPORT_API __attribute__((visibility("default"))) - -#define BUFF_MAX 255 -#define SUCCESS 0 -#define FAIL 1 - -int sys_check_node(char *path) -{ - int fd = -1; - - fd = open(path, O_RDONLY); - - if (fd == -1) - return -1; - - close(fd); - return 0; -} - -int sys_get_node(char *path, char *node) -{ - if (0 >= snprintf(node, strlen(path) + 1, "%s", path)) - return -1; - - return 0; -} - -int sys_get_int_wo_convert(char *path, int *value) -{ - int fd = -1; - - fd = open(path, O_RDONLY); - if (fd == -1) { - return -1; - } - - if (0 > read(fd, value, sizeof(int))) { - close(fd); - return -1; - } - close (fd); - - return 0; -} - -int sys_set_int_wo_convert(char *path, int value) -{ - int fd = -1; - - fd = open(path, O_WRONLY); - if (fd == -1) { - return -1; - } - - if (0 > write(fd, &value, sizeof(int))) { - close(fd); - return -1; - } - close(fd); - - return 0; -} - -static int sys_read_buf(char *file, char *buf) -{ - int fd; - int r; - - fd = open(file, O_RDONLY); - if (fd == -1) { - return -ENOENT; - } - - r = read(fd, buf, BUFF_MAX); - if ((r >= 0) && (r < BUFF_MAX)) - buf[r] = '\0'; - else { - return -EIO; - } - - close(fd); - - return 0; -} - -static int sys_write_buf(char *file, char *buf) -{ - int fd; - int r; - - fd = open(file, O_WRONLY); - if (fd == -1) { - return -1; - } - - r = write(fd, buf, strlen(buf)); - close(fd); - if (r < 0) { - return -1; - } - - return 0; -} - -int sys_get_int(char *fname, int *val) -{ - char buf[BUFF_MAX]; - - if (sys_read_buf(fname, buf) == 0) { - *val = atoi(buf); - return 0; - } else { - *val = -1; - return -1; - } -} - -int sys_get_str(char *fname, char *str) -{ - char buf[BUFF_MAX] = {0}; - - if (sys_read_buf(fname, buf) == 0) - { - strncpy(str, buf, strlen(buf)); - return 0; - } - - return -1; -} - -int sys_set_int(char *fname, int val) -{ - char buf[BUFF_MAX]; - int r = -1; - snprintf(buf, sizeof(buf), "%d", val); - - if (sys_write_buf(fname, buf) == 0) - r = 0; - - return r; -} - -int sys_set_str(char *fname, char *val) -{ - int r = -1; - - if (val != NULL) { - if (sys_write_buf(fname, val) == 0) - r = 0; - } - - return r; -} diff --git a/src/device_manager_plugin_odroid.c b/src/device_manager_plugin_odroid.c deleted file mode 100644 index d6ea2df..0000000 --- a/src/device_manager_plugin_odroid.c +++ /dev/null @@ -1,311 +0,0 @@ -/* -*- mode: c; c-file-style: "k&r"; c-basic-offset: 4; indent-tabs-mode: nil -*- - * - * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 <errno.h> -#include <devman_plugin_intf.h> - -#define BUFF_MAX 255 - -#define HDMI_STATE_PATH "/sys/class/drm/card0-HDMI-A-1/status" -#define POWER_STATE_PATH "/sys/power/state" -#define POWER_WAKEUP_COUNT_PATH "/sys/power/wakeup_count" - -#define CPUFREQ_CPUINFO_MAX_FREQ_PATH "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" -#define CPUFREQ_CPUINFO_MIN_FREQ_PATH "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq" -#define CPUFREQ_SCALING_MAX_FREQ_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" -#define CPUFREQ_SCALING_MIN_FREQ_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq" - -#define GENERATE_ACCESSORS_INT_RW(_suffix, _item) \ -int OEM_sys_get_##_suffix(int *value) \ -{ \ - return sys_get_int(_item, value); \ -} \ - \ -int OEM_sys_set_##_suffix(int value) \ -{ \ - return sys_set_int(_item, value); \ -} - -#define GENERATE_ACCESSORS_INT_R(_suffix, _item) \ -int OEM_sys_get_##_suffix(int *value) \ -{ \ - return sys_get_int(_item, value); \ -} - -#define GENERATE_ACCESSORS_INT_W(_suffix, _item) \ -int OEM_sys_set_##_suffix(int value) \ -{ \ - return sys_set_int(_item, value); \ -} - -#define GENERATE_GET_UNSUPPORTED_PROPERTY(_suffix) \ -int OEM_sys_get_##_suffix(int *value) \ -{ \ - return -ENOTSUP;\ -} - -#define GENERATE_SET_UNSUPPORTED_PROPERTY(_suffix) \ -int OEM_sys_set_##_suffix(int value) \ -{ \ - return -ENOTSUP;\ -} - -#define GENERATE_GET_UNSUPPORTED_PROPERTY_I(_suffix) \ -int OEM_sys_get_##_suffix(int index, int *value) \ -{ \ - return -ENOTSUP;\ -} - -#define GENERATE_SET_UNSUPPORTED_PROPERTY_I(_suffix) \ -int OEM_sys_set_##_suffix(int index, int value) \ -{ \ - return -ENOTSUP;\ -} - -#define GENERATE_GET_CONSTANT_PROPERTY(_suffix, _value) \ -int OEM_sys_get_##_suffix(int *value) \ -{ \ - *value = _value; \ - return 0; \ -} - -GENERATE_GET_CONSTANT_PROPERTY(display_count, 0) - -GENERATE_GET_UNSUPPORTED_PROPERTY_I(backlight_min_brightness) -GENERATE_GET_UNSUPPORTED_PROPERTY_I(backlight_max_brightness) -int OEM_sys_get_backlight_brightness(int index, int *value, int power_saving) { return -ENOTSUP;} -int OEM_sys_set_backlight_brightness(int index, int value, int power_saving) { return -ENOTSUP;} -GENERATE_SET_UNSUPPORTED_PROPERTY_I(backlight_dimming) -GENERATE_GET_UNSUPPORTED_PROPERTY_I(backlight_acl_control) -GENERATE_SET_UNSUPPORTED_PROPERTY_I(backlight_acl_control) -GENERATE_GET_UNSUPPORTED_PROPERTY_I(lcd_power) -GENERATE_SET_UNSUPPORTED_PROPERTY_I(lcd_power) - -GENERATE_GET_UNSUPPORTED_PROPERTY(image_enhance_mode) -GENERATE_SET_UNSUPPORTED_PROPERTY(image_enhance_mode) -GENERATE_GET_UNSUPPORTED_PROPERTY(image_enhance_scenario) -GENERATE_SET_UNSUPPORTED_PROPERTY(image_enhance_scenario) -GENERATE_GET_UNSUPPORTED_PROPERTY(image_enhance_tone) -GENERATE_SET_UNSUPPORTED_PROPERTY(image_enhance_tone) -GENERATE_GET_UNSUPPORTED_PROPERTY(image_enhance_outdoor) -GENERATE_SET_UNSUPPORTED_PROPERTY(image_enhance_outdoor) -GENERATE_GET_UNSUPPORTED_PROPERTY(image_enhance_tune) -GENERATE_SET_UNSUPPORTED_PROPERTY(image_enhance_tune) - -int OEM_sys_image_enhance_info(int *value) -{ - return -ENOTSUP; -} - -GENERATE_SET_UNSUPPORTED_PROPERTY(display_frame_rate) - -GENERATE_GET_UNSUPPORTED_PROPERTY(uart_path) -GENERATE_SET_UNSUPPORTED_PROPERTY(uart_path) - -GENERATE_GET_UNSUPPORTED_PROPERTY(usb_path) -GENERATE_SET_UNSUPPORTED_PROPERTY(usb_path) - -GENERATE_GET_UNSUPPORTED_PROPERTY(haptic_vibetones_level_max) -GENERATE_GET_UNSUPPORTED_PROPERTY(haptic_vibetones_level) -GENERATE_SET_UNSUPPORTED_PROPERTY(haptic_vibetones_level) -GENERATE_SET_UNSUPPORTED_PROPERTY(haptic_vibetones_enable) -GENERATE_SET_UNSUPPORTED_PROPERTY(haptic_vibetones_oneshot) - -GENERATE_GET_UNSUPPORTED_PROPERTY(battery_capacity) -GENERATE_GET_UNSUPPORTED_PROPERTY(battery_capacity_raw) -GENERATE_GET_UNSUPPORTED_PROPERTY(battery_charge_full) -GENERATE_GET_UNSUPPORTED_PROPERTY(battery_charge_now) -GENERATE_GET_UNSUPPORTED_PROPERTY(battery_present) -GENERATE_GET_UNSUPPORTED_PROPERTY(battery_health) -GENERATE_GET_UNSUPPORTED_PROPERTY(battery_polling_required) -GENERATE_GET_UNSUPPORTED_PROPERTY(battery_support_insuspend_charging) - -GENERATE_GET_UNSUPPORTED_PROPERTY(jack_charger_online) -GENERATE_GET_UNSUPPORTED_PROPERTY(jack_earjack_online) /* TODO: max98090 requires fixing */ -GENERATE_GET_UNSUPPORTED_PROPERTY(jack_earkey_online) - -int OEM_sys_get_jack_hdmi_online(int * value) -{ - char buf[BUFF_MAX] = {0}; - int ret = 0; - - ret = sys_get_str(HDMI_STATE_PATH, buf); - if (ret == -1) - return -ENOTSUP; - - ret = 0; - if (strncmp(buf, "connected", 9) == 0) - *value = 1; - else if (strncmp(buf, "disconnected", 12) == 0) - *value = 0; - else - ret = -EIO; - - return ret; -} - -GENERATE_GET_UNSUPPORTED_PROPERTY(jack_usb_online) /* TODO: kernel supporte is pending */ -GENERATE_GET_UNSUPPORTED_PROPERTY(jack_cradle_online) -GENERATE_GET_UNSUPPORTED_PROPERTY(jack_tvout_online) -GENERATE_GET_UNSUPPORTED_PROPERTY(jack_keyboard_online) /* Does USB keyboard count? */ -GENERATE_GET_CONSTANT_PROPERTY(hdmi_support, 1) - -GENERATE_GET_UNSUPPORTED_PROPERTY(leds_torch_max_brightness) -GENERATE_GET_UNSUPPORTED_PROPERTY(leds_torch_brightness) -GENERATE_SET_UNSUPPORTED_PROPERTY(leds_torch_brightness) - -/* TODO: what to write to POWER_STATE_PATH */ -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: - case POWER_STATE_POST_RESUME: - default: - return -ENOTSUP; - } - return -EINVAL; -} -GENERATE_ACCESSORS_INT_RW(power_wakeup_count, POWER_WAKEUP_COUNT_PATH) - -int OEM_sys_get_memnotify_node(char *node) { return -ENOTSUP;} -GENERATE_GET_UNSUPPORTED_PROPERTY(memnotify_victim_task) -GENERATE_SET_UNSUPPORTED_PROPERTY(memnotify_threshold_lv1) -GENERATE_SET_UNSUPPORTED_PROPERTY(memnotify_threshold_lv2) - -int OEM_sys_get_process_monitor_node(char *node) { return -ENOTSUP;} -GENERATE_SET_UNSUPPORTED_PROPERTY(process_monitor_mp_pnp) -GENERATE_SET_UNSUPPORTED_PROPERTY(process_monitor_mp_vip) - -GENERATE_ACCESSORS_INT_R(cpufreq_cpuinfo_max_freq, CPUFREQ_CPUINFO_MAX_FREQ_PATH) -GENERATE_ACCESSORS_INT_R(cpufreq_cpuinfo_min_freq, CPUFREQ_CPUINFO_MIN_FREQ_PATH) -GENERATE_ACCESSORS_INT_RW(cpufreq_scaling_max_freq, CPUFREQ_SCALING_MAX_FREQ_PATH) -GENERATE_ACCESSORS_INT_RW(cpufreq_scaling_min_freq, CPUFREQ_SCALING_MIN_FREQ_PATH) - -GENERATE_GET_UNSUPPORTED_PROPERTY_I(backlight_brightness_by_lux) -GENERATE_GET_UNSUPPORTED_PROPERTY_I(whitemagic_mode) -GENERATE_SET_UNSUPPORTED_PROPERTY_I(whitemagic_mode) - -static OEM_sys_devman_plugin_interface devman_plugin_interface_odroid; - -const OEM_sys_devman_plugin_interface *OEM_sys_get_devman_plugin_interface() -{ - /* Light interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_display_count = &OEM_sys_get_display_count; - devman_plugin_interface_odroid.OEM_sys_get_backlight_min_brightness = &OEM_sys_get_backlight_min_brightness; - devman_plugin_interface_odroid.OEM_sys_get_backlight_max_brightness = &OEM_sys_get_backlight_max_brightness; - devman_plugin_interface_odroid.OEM_sys_get_backlight_brightness = &OEM_sys_get_backlight_brightness; - devman_plugin_interface_odroid.OEM_sys_set_backlight_brightness = &OEM_sys_set_backlight_brightness; - devman_plugin_interface_odroid.OEM_sys_set_backlight_dimming = &OEM_sys_set_backlight_dimming; - devman_plugin_interface_odroid.OEM_sys_get_backlight_acl_control = &OEM_sys_get_backlight_acl_control; - devman_plugin_interface_odroid.OEM_sys_set_backlight_acl_control = &OEM_sys_set_backlight_acl_control; - - devman_plugin_interface_odroid.OEM_sys_get_lcd_power = &OEM_sys_get_lcd_power; - devman_plugin_interface_odroid.OEM_sys_set_lcd_power = &OEM_sys_set_lcd_power; - - /* Image Ehnhace interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_image_enhance_mode = &OEM_sys_get_image_enhance_mode; - devman_plugin_interface_odroid.OEM_sys_set_image_enhance_mode = &OEM_sys_set_image_enhance_mode; - devman_plugin_interface_odroid.OEM_sys_get_image_enhance_scenario = &OEM_sys_get_image_enhance_scenario; - devman_plugin_interface_odroid.OEM_sys_set_image_enhance_scenario = &OEM_sys_set_image_enhance_scenario; - devman_plugin_interface_odroid.OEM_sys_get_image_enhance_tone = &OEM_sys_get_image_enhance_tone; - devman_plugin_interface_odroid.OEM_sys_set_image_enhance_tone = &OEM_sys_set_image_enhance_tone; - devman_plugin_interface_odroid.OEM_sys_get_image_enhance_outdoor = &OEM_sys_get_image_enhance_outdoor; - devman_plugin_interface_odroid.OEM_sys_set_image_enhance_outdoor = &OEM_sys_set_image_enhance_outdoor; - - devman_plugin_interface_odroid.OEM_sys_get_image_enhance_tune = &OEM_sys_get_image_enhance_tune; - devman_plugin_interface_odroid.OEM_sys_set_image_enhance_tune = &OEM_sys_set_image_enhance_tune; - - devman_plugin_interface_odroid.OEM_sys_image_enhance_info = &OEM_sys_image_enhance_info; - - devman_plugin_interface_odroid.OEM_sys_set_display_frame_rate = &OEM_sys_set_display_frame_rate; - - /* UART path interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_uart_path = &OEM_sys_get_uart_path; - devman_plugin_interface_odroid.OEM_sys_set_uart_path = &OEM_sys_set_uart_path; - - /* USB path interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_usb_path = &OEM_sys_get_usb_path; - devman_plugin_interface_odroid.OEM_sys_set_usb_path = &OEM_sys_set_usb_path; - - /* Vibrator interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_haptic_vibetones_level_max = &OEM_sys_get_haptic_vibetones_level_max; - devman_plugin_interface_odroid.OEM_sys_get_haptic_vibetones_level = &OEM_sys_get_haptic_vibetones_level; - devman_plugin_interface_odroid.OEM_sys_set_haptic_vibetones_level = &OEM_sys_set_haptic_vibetones_level; - devman_plugin_interface_odroid.OEM_sys_set_haptic_vibetones_enable = &OEM_sys_set_haptic_vibetones_enable; - devman_plugin_interface_odroid.OEM_sys_set_haptic_vibetones_oneshot = &OEM_sys_set_haptic_vibetones_oneshot; - - /* Battery interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_battery_capacity = &OEM_sys_get_battery_capacity; - devman_plugin_interface_odroid.OEM_sys_get_battery_capacity_raw = &OEM_sys_get_battery_capacity_raw; - devman_plugin_interface_odroid.OEM_sys_get_battery_charge_full = &OEM_sys_get_battery_charge_full; - devman_plugin_interface_odroid.OEM_sys_get_battery_charge_now = &OEM_sys_get_battery_charge_now; - devman_plugin_interface_odroid.OEM_sys_get_battery_present = &OEM_sys_get_battery_present; - devman_plugin_interface_odroid.OEM_sys_get_battery_health = &OEM_sys_get_battery_health; - devman_plugin_interface_odroid.OEM_sys_get_battery_polling_required= &OEM_sys_get_battery_polling_required; - devman_plugin_interface_odroid.OEM_sys_get_battery_support_insuspend_charging = &OEM_sys_get_battery_support_insuspend_charging; - - /* Connection interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_jack_charger_online = &OEM_sys_get_jack_charger_online; - devman_plugin_interface_odroid.OEM_sys_get_jack_earjack_online = &OEM_sys_get_jack_earjack_online; - devman_plugin_interface_odroid.OEM_sys_get_jack_earkey_online = &OEM_sys_get_jack_earkey_online; - devman_plugin_interface_odroid.OEM_sys_get_jack_hdmi_online = &OEM_sys_get_jack_hdmi_online; - devman_plugin_interface_odroid.OEM_sys_get_jack_usb_online = &OEM_sys_get_jack_usb_online; - devman_plugin_interface_odroid.OEM_sys_get_jack_cradle_online = &OEM_sys_get_jack_cradle_online; - devman_plugin_interface_odroid.OEM_sys_get_jack_tvout_online = &OEM_sys_get_jack_tvout_online; - devman_plugin_interface_odroid.OEM_sys_get_jack_keyboard_online = &OEM_sys_get_jack_keyboard_online; - - devman_plugin_interface_odroid.OEM_sys_get_hdmi_support = &OEM_sys_get_hdmi_support; - - /* Torch interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_leds_torch_max_brightness = &OEM_sys_get_leds_torch_max_brightness; - devman_plugin_interface_odroid.OEM_sys_get_leds_torch_brightness = &OEM_sys_get_leds_torch_brightness; - devman_plugin_interface_odroid.OEM_sys_set_leds_torch_brightness = &OEM_sys_set_leds_torch_brightness; - - /* Power management interfaces */ - devman_plugin_interface_odroid.OEM_sys_set_power_state = &OEM_sys_set_power_state; - devman_plugin_interface_odroid.OEM_sys_get_power_wakeup_count = &OEM_sys_get_power_wakeup_count; - devman_plugin_interface_odroid.OEM_sys_set_power_wakeup_count = &OEM_sys_set_power_wakeup_count; - - /* OOM interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_memnotify_node = &OEM_sys_get_memnotify_node; - devman_plugin_interface_odroid.OEM_sys_get_memnotify_victim_task = &OEM_sys_get_memnotify_victim_task; - devman_plugin_interface_odroid.OEM_sys_set_memnotify_threshold_lv1 = &OEM_sys_set_memnotify_threshold_lv1; - devman_plugin_interface_odroid.OEM_sys_set_memnotify_threshold_lv2 = &OEM_sys_set_memnotify_threshold_lv2; - - /* Process monitor interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_process_monitor_node = &OEM_sys_get_process_monitor_node; - devman_plugin_interface_odroid.OEM_sys_set_process_monitor_mp_pnp = &OEM_sys_set_process_monitor_mp_pnp; - devman_plugin_interface_odroid.OEM_sys_set_process_monitor_mp_vip = &OEM_sys_set_process_monitor_mp_vip; - - /* UART path interfaces */ - devman_plugin_interface_odroid.OEM_sys_get_cpufreq_cpuinfo_max_freq = &OEM_sys_get_cpufreq_cpuinfo_max_freq; - devman_plugin_interface_odroid.OEM_sys_get_cpufreq_cpuinfo_min_freq = &OEM_sys_get_cpufreq_cpuinfo_min_freq; - devman_plugin_interface_odroid.OEM_sys_get_cpufreq_scaling_max_freq = &OEM_sys_get_cpufreq_scaling_max_freq; - devman_plugin_interface_odroid.OEM_sys_set_cpufreq_scaling_max_freq = &OEM_sys_set_cpufreq_scaling_max_freq; - devman_plugin_interface_odroid.OEM_sys_get_cpufreq_scaling_min_freq = &OEM_sys_get_cpufreq_scaling_min_freq; - devman_plugin_interface_odroid.OEM_sys_set_cpufreq_scaling_min_freq = &OEM_sys_set_cpufreq_scaling_min_freq; - - devman_plugin_interface_odroid.OEM_sys_get_backlight_brightness_by_lux = &OEM_sys_get_backlight_brightness_by_lux; - /* OEM_sys_display_info(disp_info); */ - /* OEM_sys_muic_node_path_info(); */ - - return &devman_plugin_interface_odroid; -} |