Coverity Fix
[platform/adaptation/emulator/device-manager-plugin-emul.git] / include / devman_define_node_path.h
1 /*
2  * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Contact:
5  * JiHye Kim <jihye1128.kim@samsung.com>
6  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20
21 #ifndef __DEVMAN_DEFINE_NODE_PATH_H
22 #define __DEVMAN_DEFINE_NODE_PATH_H
23
24 #define BACKLIGHT_PATH "/sys/class/backlight/"
25 #define BACKLIGHT_MIN_BRIGHTNESS_PATH   BACKLIGHT_PATH"%s/min_brightness"
26 #define BACKLIGHT_MAX_BRIGHTNESS_PATH   BACKLIGHT_PATH"%s/max_brightness"
27 #define BACKLIGHT_BRIGHTNESS_PATH       BACKLIGHT_PATH"%s/brightness"
28 #define BACKLIGHT_DIMMING_PATH  BACKLIGHT_PATH"%s/dimming"
29 #define LCD_PATH  "/sys/class/lcd/"
30 #define LCD_ACL_CONTROL_PATH    LCD_PATH"%s/acl_control"
31 #define LCD_POWER_PATH                  LCD_PATH"%s/lcd_power"
32 #define IMAGE_ENHANCE_PATH                      "/sys/class/extension/mdnie/%s"
33 #define IMAGE_ENHANCE_PATH_INFO                 "/sys/class/extension/mdnie"
34
35 //#define DISPLAY_FRAME_RATE_PATH       "/sys/devices/platform/maru-display/devfreq/maru-display/max_freq"
36
37 //#define UART_PATH                     "/sys/devices/platform/uart-select/path"
38 //#define USB_PATH                      "/sys/devices/platform/usb-switch/path"
39
40 #define UART_PATH                       "/sys/devices/virtual/sec/switch/uart_sel"
41 #define USB_PATH                        "/sys/devices/virtual/sec/switch/usb_sel"
42 #define UART_PATH_TRATS                 "/sys/devices/platform/uart-select/path"
43 #define USB_PATH_TRATS                  "/sys/devices/platform/usb-select/path"
44
45 #define HAPTIC_VIBETONES_LEVEL_PATH     "/sys/class/haptic/vibetones/level"
46 #define HAPTIC_VIBETONES_LEVEL_MAX_PATH "/sys/class/haptic/vibetones/level_max"
47 #define HAPTIC_VIBETONES_ENABLE_PATH    "/sys/class/haptic/vibetones/enable"
48 #define HAPTIC_VIBETONES_ONESHOT_PATH   "/sys/class/haptic/vibetones/oneshot"
49
50 #define BATTERY_CAPACITY_PATH           "/sys/class/power_supply/battery/capacity"
51 #define BATTERY_CAPACITY_RAW_PATH       "/sys/class/power_supply/battery/capacity_raw"
52 #define BATTERY_CHARGE_FULL_PATH        "/sys/class/power_supply/battery/charge_full"
53 #define BATTERY_CHARGE_NOW_PATH         "/sys/class/power_supply/battery/charge_now"
54 #define BATTERY_PRESENT_PATH            "/sys/class/power_supply/battery/present"
55 #define BATTERY_HEALTH_PATH             "/sys/class/power_supply/battery/health"
56
57 #define JACK_CHARGER_ONLINE_PATH        "/sys/devices/platform/jack/charger_online"
58 #define JACK_EARJACK_ONLINE_PATH        "/sys/devices/platform/jack/earjack_online"
59 #define JACK_EARKEY_ONLINE_PATH         "/sys/devices/platform/jack/earkey_online"
60 #define JACK_HDMI_ONLINE_PATH           "/sys/devices/platform/jack/hdmi_online"
61 #define JACK_USB_ONLINE_PATH            "/sys/devices/platform/jack/usb_online"
62 #define JACK_CRADLE_ONLINE_PATH         "/sys/devices/platform/jack/cradle_online"
63 #define JACK_TVOUT_ONLINE_PATH          "/sys/devices/platform/jack/tvout_online"
64 #define JACK_KEYBOARD_ONLINE_PATH       "/sys/devices/platform/jack/keyboard_online"
65
66 #define LEDS_TORCH_MAX_BRIGHTNESS_PATH  "/sys/class/leds/leds-torch/max_brightness"
67 #define LEDS_TORCH_BRIGHTNESS_PATH      "/sys/class/leds/leds-torch/brightness"
68 //#define LEDS_TORCH_MAX_BRIGHTNESS_PATH        "/sys/class/camera/flash/max_brightness"
69 //#define LEDS_TORCH_BRIGHTNESS_PATH    "/sys/class/camera/flash/rear_flash"
70
71 #define POWER_STATE_PATH                "/sys/power/state"
72 #define POWER_WAKEUP_COUNT_PATH         "/sys/power/wakeup_count"
73
74 #define MEMNOTIFY_NODE                  "/dev/memnotify"
75 #define MEMNOTIFY_VICTIM_TASK_PATH      "/sys/class/memnotify/victim_task"
76 #define MEMNOTIFY_THRESHOLD_LV1_PATH    "/sys/class/memnotify/threshold_lv1"
77 #define MEMNOTIFY_THRESHOLD_LV2_PATH    "/sys/class/memnotify/threshold_lv2"
78
79 #define TOUCH_EVENT_NODE                "/dev/event2"
80
81 #define PROCESS_MONITOR_NODE            "/dev/pmon"
82 #define PROCESS_MONITOR_MP_PNP_PATH     "/sys/class/pmon/mp_pnp"
83 #define PROCESS_MONITOR_MP_VIP_PATH     "/sys/class/pmon/mp_vip"
84
85 #define CPUFREQ_CPUINFO_MAX_FREQ_PATH   "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"
86 #define CPUFREQ_CPUINFO_MIN_FREQ_PATH   "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq"
87 #define CPUFREQ_SCALING_MAX_FREQ_PATH   "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
88 #define CPUFREQ_SCALING_MIN_FREQ_PATH   "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"
89
90 int sys_get_int(char *fname, int *val);
91 int sys_set_int(char *fname, int val);
92 int sys_get_str(char *fname, char* str);
93 int sys_set_str(char *fname, char *val);
94 int sys_get_node(char *path, char *node);
95 int sys_get_int_wo_convert(char *path, int *value);
96 int sys_set_int_wo_convert(char *path, int value);
97
98 int sys_check_node(char *path);
99
100 #endif /* __DEVMAN_DEFINE_NODE_PATH_H */